HelpHow would I go about this

Posts 1–15 of 21 · Page 1 of 2
How would I go about this
How would I go about getting just the game from haxball (I cant post links), and showing it inside of a .vb application.
I'm guessing you want to the source? If its coded in VB you could possibly try to Reverse Engineer.
I'll have a look into it, everytime i try to link the SWF in vb it just says invalid server or something like that.
Quote Originally Posted by WSewgwehgwehehhehe4 View Post
I'm guessing you want to the source? If its coded in VB you could possibly try to Reverse Engineer.
Sorry, I dont understand?

Quote Originally Posted by Raow View Post
I'll have a look into it, everytime i try to link the SWF in vb it just says invalid server or something like that.
Thank you very much!
Quote Originally Posted by Mvan12 View Post
Sorry, I dont understand?


Thank you very much!
So, you just want to have the game play in a program, right?
Yes, but just the game, not the entire site, like the bar up the top. Someone has done it with that particular game, but has since left the program un-updated and is more or less useless.
So far I have got this far:



I just need to figure out how to "crop" the web page, and just focus solely on the flash game. Tried getting just the .swf, but give error when trying to open it on its own.
@Mvan12 Are you using a 'WebBrowser' control?

Once the page is loaded you can use GetElementById() to find specific items and then change their properties.

Code:
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WebBrowser1.Document.GetElementById("navigation").Style = "display:none"
        WebBrowser1.Document.GetElementById("donate").Style = "display:none"
        WebBrowser1.Document.GetElementById("social_bookmarking_buttons").Style = "display:none"
        WebBrowser1.Document.GetElementById("ads").Style = "display:none"
        WebBrowser1.Update()
    End Sub



^^obviously the buttons were just for testing...

This will leave the "bar" at the top, but it has no items. Also hides the add image. Might not be exactly what you want, but you might be able to make it work.
I tried simply hiding the "header" div (which contains the nav/donate/social buttons), but didn't quite do what I wanted. Try and see : ) With some tweaking, I think this could give you what you want (assuming you know a little html/css). Gl.
Yeah, Ive done that. Ive got rid of the ads and the top bar, also, ive got a background browser logging into a forum, which then allows to play the flash game, as I want this program to have restricted access to that forum. Logging in is fine, just look for element with name or value what ever, but the log out button doesnt have one?
So find the < a > with your logout url...and navigate to that page.

Code:
        Dim _links As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")

        For Each xx As HtmlElement In _links

            MessageBox.Show("Inner Text: " & xx.InnerText & Environment.NewLine _
                          & "Outer Text: " & xx.OuterText & Environment.NewLine _
                          & "zzzzzzzzzz: " & xx.OuterHtml)
 
        Next
OuterHtml will contain the link, then use string parsing to pull out the data you want.

If xx.OuterHtml.Contains("http://hbans.org / member.php?action=logout&logoutKey=") Then '' maybe .Contains() isn't best for exact matching...
Ok, worked a charm, except I just used InnerText instead. Thanks heaps for your help!!

Another feature im looking to add to the program soon is to be able to see which other users are on the program. Currently ive got it set up so the users username is saved into My.Settings.username.

An example of what im looking for:
"Attachments Pending Approval"

..use [ IMG ] wwwdotimageserverdotcomslashyourimage [ /IMG ] (without spaces)


edit: When you say "able to see which other users are on the program." Please elaborate - people using YOUR program, or "other online players (according to the 'flash game')" ?
Using the program. And I cant post pictures like that as I cannot post links.
Also came across another problem, if you could possibly help out with? Thanks heaps again.
ah. I'm not sure how to interact with the flash object via the WebBrowser. Hopefully someone who does will comment soon. Sorry.

will update when your picture gets approved. *or you could post the link w/ spaces in it and I'll figre out how to view it..
Posts 1–15 of 21 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?