Lost Password?


  #1 (permalink)  
Old 09-12-2007, 04:53 AM
travy92's Avatar   
travy92 travy92 is offline
Learning Programmer
 
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 72
Credits: 14
Rep Power: 5
travy92 is on a distinguished road
Send a message via MSN to travy92
Post Tutorial - VB + Flash games!

INTRO

Well in this tutorial we'll be making a Flash game player with some "hacks".

----------------------------------------------------------------

GUI (LAYOUT):

Here is my GUI:




----------------------------------------------------------------

What you need:

Here is what items/buttons you need:

3 Command Buttons with:

#1 Command Button:
Name: cmdCash
Caption: Get Cash

#2 Command Button:
Name: cmdPower
Caption: Get Power

#3 Command Button:
Name: cmdTurrets
Caption: Get Turrets

3 Text Boxes with:

#1 Text Box:
Name: txtCash
Caption (None)

#2 Text Box:
Name: txtPower
Caption: (None)

#3 Text Box:
Name: txtTurrets
Caption: (None)

Quote:

And the last thing you need to add is a ShockwaveFlash item by:

Go to components or just press CTRL+T. Then scroll down to ShockWave Flash and tick it. A new item should appear on your toolbox, it looks like a piece of paper.

Now click it and make a big box because this is what you'll be viewing/playing the flash game with.
Give it the:
Name: Movie


Now to get the flash game playing.....

First go to a flash game site (like miniclips or something) and load up a game. Wait until it's 100% fully loaded and then go into your "Temporary Internet Files" folder and find the game name with the extension ".swf". Right-Click it and then copy the location, in this case mine's:

http://www.funny-base.com/games10/turretdefense.swf


And then go back to VB and click on the Movie box (The thing we just made) and then do this:


And you're done! YAY!

----------------------------------------------------------------

CODE:

Here is the code:

Quote:
Private Sub cmdCash_Click()
Call Movie.SetVariable("_root.money", txtCash.Text)
End Sub

Private Sub cmdPower_Click()
Call Movie.SetVariable("_root.power", txtPower.Text)
End Sub

Private Sub cmdTurrets_Click()
Call Movie.SetVariable("_root.available_turrets", txtTurrets.Text)
End Sub
----------------------------------------------------------------
CODE EXPLANATIONS:

Quote:
Private Sub cmdCash_Click()
Call Movie.SetVariable("_root.money", txtCash.Text)
End Sub
This just means every time you click the "cmdCash" button, it changes the variable (code) number to the number specified in the txtCash Text Box.

----------------------------------------------------------------

Quote:
Private Sub cmdPower_Click()
Call Movie.SetVariable("_root.power", txtPower.Text)
End Sub
This does exactly what the first one does BUT it changes a different code (_root.power).

----------------------------------------------------------------

Quote:
Private Sub cmdTurrets_Click()
Call Movie.SetVariable("_root.available_turrets", txtTurrets.Text)
End Sub
Also does the same as the two other codes! Again, it just changes a different code (_root.available_turrets).

----------------------------------------------------------------

If you need any help with this tutorial/Sothink's SWF Decompiler/Flash games then please feel free to PM me or post in this Thread!

Thanks to TheComputerMaster and Tcm9669 for the ScreenShot programs.

Thanks to you for reading this tutorial!

Made by me, Travy92.

SAMPLES!:
Attached Files To view attachments in this forum your post count must be 1 or greater. You currently have 0 posts.
__________________
C:\Users\Travis\Desktop\Image Converter\Knight1.bmp

Last edited by Jordan; 09-13-2007 at 09:13 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-12-2007, 06:02 PM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Credits: 0
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

Just a question as this is a very good tutorial, let's say that I have another swf game how can I know the variable name, so that when I press the command button the swf game variable changes to that in the text box? In short, how can I know variables like _root.available_turrets or _root.power??

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-12-2007, 08:41 PM
travy92's Avatar   
travy92 travy92 is offline
Learning Programmer
 
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 72
Credits: 14
Rep Power: 5
travy92 is on a distinguished road
Send a message via MSN to travy92
Default

Well you need Sothink's SWF decomiler which you can search on google. Then you go to Action>Main to look at the variables.
__________________
C:\Users\Travis\Desktop\Image Converter\Knight1.bmp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-13-2007, 12:15 PM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Credits: 0
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default

I can't find any Action>Main can you state this into more tdetail please? Thanks.

EDIT: Ok I found it! You are great!! +rep given.

Last edited by TcM; 09-13-2007 at 01:03 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-22-2007, 02:07 PM
khaabas khaabas is offline
Newbie
 
Join Date: Sep 2007
Posts: 4
Credits: 0
Rep Power: 0
khaabas is on a distinguished road
Default

wow very good
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 10-20-2007, 08:08 AM
LOLOL LOLOL is offline
Newbie
 
Join Date: Oct 2007
Posts: 1
Credits: 0
Rep Power: 0
LOLOL is on a distinguished road
Default

Very nice.

* Goes to hax some games for fun.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-03-2007, 02:19 PM
R-Kempik R-Kempik is offline
Newbie
 
Join Date: Nov 2007
Posts: 1
Credits: 0
Rep Power: 0
R-Kempik is on a distinguished road
Default

Gd thts a great tutorial thx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-17-2008, 10:09 PM
Yakuzaku505's Avatar   
Yakuzaku505 Yakuzaku505 is offline
Newbie
 
Join Date: Jan 2008
Posts: 6
Credits: 1
Rep Power: 0
Yakuzaku505 is on a distinguished road
Send a message via Yahoo to Yakuzaku505
Default

Hello Travy I Want To Know How Can I Get Variable Codes For Flash Games Like The _root.available_turrets or _root.power?? I Want To Know How Please Please

(THANKS)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-17-2008, 10:17 PM
travy92's Avatar   
travy92 travy92 is offline
Learning Programmer
 
Join Date: Sep 2007
Location: Australia
Age: 15
Posts: 72
Credits: 14
Rep Power: 5
travy92 is on a distinguished road
Send a message via MSN to travy92
Cool

Quote:
Originally Posted by Yakuzaku505 View Post
Hello Travy I Want To Know How Can I Get Variable Codes For Flash Games Like The _root.available_turrets or _root.power?? I Want To Know How Please Please

(THANKS)
Scroll up, i answered this question already.


Offtopic: First time on in like 5 months!
__________________
C:\Users\Travis\Desktop\Image Converter\Knight1.bmp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-17-2008, 10:41 PM
Yakuzaku505's Avatar   
Yakuzaku505 Yakuzaku505 is offline
Newbie
 
Join Date: Jan 2008
Posts: 6
Credits: 1
Rep Power: 0
Yakuzaku505 is on a distinguished road
Send a message via Yahoo to Yakuzaku505
Default

But I Cant Find The Action>main
I Dont Know Where It Is
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB 6.0: Tutorial, Making a Port Scanner TcM VB Tutorials 90 Yesterday 10:18 PM
VB 6.0: Tutorial, How to Make Glass2K!! TcM VB Tutorials 12 09-28-2008 12:53 PM
VB 6.0: Tutorial, How to make a GIF in your application TcM VB Tutorials 17 07-01-2008 04:26 PM
VB 6.0: Tutorial, Explaining the VB 6.0 GUI TcM VB Tutorials 1 05-18-2007 11:25 AM
John's Java Tutorial Index John Java Tutorials 0 01-11-2007 04:05 PM


All times are GMT -5. The time now is 03:28 AM.

Contest Stats

WingedPanther ........ 2630.54
Xav ........ 2576.41
Brandon W ........ 1697.27
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 959.05
dcs ........ 646.09
Steve.L ........ 475.59
orjan ........ 407.96
chili5 ........ 378.6

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads