00:00
00:00
View Profile SketchistGames
Hey. Message me sometime! :)

Age 26, Male

Game Programmer

MIT when i grow up (i hope)

Joined on 3/2/12

Level:
5
Exp Points:
240 / 280
Exp Rank:
> 100,000
Vote Power:
4.37 votes
Rank:
Civilian
Global Rank:
> 100,000
Blams:
3
Saves:
6
B/P Bonus:
0%
Whistle:
Normal
Medals:
447

As3: Simple Navigation Button!

Posted by SketchistGames - March 30th, 2012


The original with out the "help" is here!

This is a tutorial to help support As3:Main ! Here is the step-by-step tutorial!
1. Open Adobe Flash
2. Click on Actionscript 3.0 under the "Create New" branch
3. Create the graphic for your button
4. Select the entire thing and right-click then select "Convert to Symbol..."
5. Put anything for the name (for now I will call this button1)
6. Register the point in the middle
7. Make sure the type is Button.
8. Give button1 the instance name of anything!(we will refer to it from now on as "Btn1")
9. Make a new layer and name it Actions
10. Go to the actions panel (Window/Actions)
11. Type the following

Btn1.addEventListener(MouseEvent.Event, anythinghere); //Identifying the button and giving it a function

function anythinghere(event:MouseEvent):void{ // calling the function to do something
gotoAndPlay(2); // what the function does
} // closes this code

12. Add a blank keyframe
13. go to the actions layer and on both frame add this to the coding:

stop(); // Stops the frame so it doesn't keep on going

14. Test the move (ctrl + enter)
15. You have a working button! Hope I could help!


Comments

Comments ain't a thing here.