[VB6] Flash Game Load

Discussion in 'Code Snippets and Tutorials' started by ZOMG, Apr 17, 2007.

  1. ZOMG

    ZOMG Level I

    Joined:
    Feb 26, 2007
    Messages:
    122
    Likes Received:
    0
    Location:
    Hipocresy Land
    First off all,, ad the flash component, and all the wrappers,, etc
    Add a Flash Command,, called ,,, Flash (so original xDDD)
    A cmd,, called Command1
    Another cmd called Command2
    And a Timer,, called Timer1
    And a lbl called lblStatus


    And add this code;;

    Code (Visual Basic):
    1. <div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">//////////////////////////////////////////</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Made By OhMyGawd &nbsp; &nbsp; &nbsp; /</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">For</span>;; Neofriends. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Game;; EPC &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">/////////////////////////////////////////</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strHTML <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strID <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strID2 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strPT1 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strPT2 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strPT3 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strArray <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Dim</span> strAns <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> Command1_Click<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">If</span> Timer1.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Timer1.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">lblStatus.<span style="color: #66cc66;">Caption</span> = <span style="color: #ff0000;">"ON"</span> <span style="color: #808080;">'this will show if the cheat is on/off</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Timer1.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">lblStatus.<span style="color: #66cc66;">Caption</span> = <span style="color: #ff0000;">"OFF"</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'cmd2 loads the game</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> Command2_Click<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Command2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strHTML = HTTP.<span style="color: #66cc66;">GetWrapper</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"http://neopets.com/games/play.phtml?game_id="</span> & <span style="color: #ff0000;">"226"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strID = GetStringBetween<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"newWin=window.open('"</span>, <span style="color: #ff0000;">"'+'&width='+width+'&height='+height+'&quality='+quality,"</span> & <span style="color: #ff0000;">"226"</span> & <span style="color: #ff0000;">",params);"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strID = strID & <span style="color: #ff0000;">"&width=550&height=420&quality=high"</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strHTML = HTTP.<span style="color: #66cc66;">GetWrapper</span><span style="color: #66cc66;">(</span>strID, <span style="color: #ff0000;">"http://neopets.com/games/play.phtml?game_id="</span> & <span style="color: #ff0000;">"226"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strID2 = GetStringBetween<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"</script><SCRIPT type="</span> & <span style="color: #b1b100;">ChrW</span>$<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">)</span> & <span style="color: #ff0000;">"text/javascript"</span> & <span style="color: #b1b100;">ChrW</span>$<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">)</span> & <span style="color: #ff0000;">">flash_object("</span> & <span style="color: #b1b100;">ChrW</span>$<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">)</span>, <span style="color: #b1b100;">ChrW</span>$<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">34</span><span style="color: #66cc66;">)</span> & <span style="color: #ff0000;">", '100%', '100%', 'myFlash', 'high', '6', 'exactfit', '', 'white', '', 'always'"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Flash.<span style="color: #66cc66;">Movie</span> = strID2</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Command1.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">Command2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">True</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> Timer1_Timer<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">On</span> <span style="color: #b1b100;">Error</span> <span style="color: #b1b100;">Resume</span> <span style="color: #b1b100;">Next</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strArray = Flash.<span style="color: #66cc66;">GetVariable</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"_level10.aEKZ"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strPT1 = GetStringBetween<span style="color: #66cc66;">(</span>strArray, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">","</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strPT2 = GetStringBetween<span style="color: #66cc66;">(</span>strArray, strPT1 & <span style="color: #ff0000;">","</span>, <span style="color: #ff0000;">","</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strPT3 = GetStringBetween<span style="color: #66cc66;">(</span>strArray, strPT1 & <span style="color: #ff0000;">","</span> & strPT2 & <span style="color: #ff0000;">","</span>, <span style="color: #ff0000;">","</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strAns = <span style="color: #b1b100;">Int</span><span style="color: #66cc66;">(</span>strPT3<span style="color: #66cc66;">)</span> / <span style="color: #b1b100;">Int</span><span style="color: #66cc66;">(</span>strPT1<span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">lblStatus.<span style="color: #66cc66;">Caption</span> = <span style="color: #ff0000;">"Counted: "</span> & strAns &nbsp; &nbsp; &nbsp;<span style="color: #808080;">'this will give you the answer</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li></ol></div>

    This is all,,is commented.
    Please.. dont copy =D
     
  2. Pankirk

    Pankirk Level III

    Joined:
    Nov 12, 2006
    Messages:
    652
    Likes Received:
    28
    Location:
    America
    Yargh now its going to get patched again... Oh well, looks like ill be updating mine in about a week. This is the precise reason that I don't release mine is because Ill have to fix it when someone posts the code to load games. Now TNT can see it. Anwhoo good job on the code, if you made it... And you should point out that the timer in there is and how to call the variables... Yeah.
     
  3. ZOMG

    ZOMG Level I

    Joined:
    Feb 26, 2007
    Messages:
    122
    Likes Received:
    0
    Location:
    Hipocresy Land
    ;) I know,, tnt see it.. but this an example...
    We, learn from examples,, :shock:
     
  4. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    The problem is you can't send score with that method... You will need to use iNet and I'm looking for a working method...
     
  5. ZOMG

    ZOMG Level I

    Joined:
    Feb 26, 2007
    Messages:
    122
    Likes Received:
    0
    Location:
    Hipocresy Land
    I made one with iNet,, but i wont upload the code ;)
     
  6. Pankirk

    Pankirk Level III

    Joined:
    Nov 12, 2006
    Messages:
    652
    Likes Received:
    28
    Location:
    America
    Yeah you can send score with this. And I wouldent recomend sending this to very many forums, as it may get patched soon.
     
  7. Smelly

    Smelly Level IV

    Joined:
    Dec 1, 2006
    Messages:
    2,197
    Likes Received:
    8
    Location:
    England
    yeah i wouldnt. actually id take it down now :)