Page 1 of 1

Button navigation between frames Very Simple Rate Topic: -----

#1 icedd  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 98
  • Joined: 04-March 08

Post icon  Posted 05 March 2008 - 11:00 PM

Learn how to change frames using buttons, with two alomst identical, but differnt ways.

Flash 8 Pro, AS 1.0 or 2.0
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
Step 1:
Open Flash. Open a new Flash document. On the stage of Frame 1, of your timeline draw 2 shapes. A circle and a square.

Step 2:
Highlight the circle and convert it to a button.
To do so:
A) Select the circle, right click on it > Convert to Symbol, name
it "circle_btn" and make sure you select "Button".
or
B) Select the circle, Modify > Convert to Symbol, name
it "circle_btn" and make sure you select "Button".

Repeat this step for the square naming it "square_btn"

Step 3:
Click on Frame 2 of your timeline and press "F7" to insert a Blank Keyframe, or click Insert > Timeline > Blank Keyframe. Then, on the stage of Frame 2, draw a circle.

Step 4:
Click on Frame 3 of your timeline and press "F7" to insert a Blank Keyframe, or click Insert > Timeline > Blank Keyframe. Then, on the stage of Frame 3, draw a square.

Step 5:
Now go to Frame 1, and we'll add the simple code so that when you click on the circle, it will bring us to frame 2.
Tip: Make sure that you are entering the code onto the "circle_btn" and not the frame. To do so: Click on a blank spot on the stage, then select your circle. Now open the "Actions" panel and type

on(release){
	  gotoAndStop(2);
	  }


Step 6:
Click on frame 3 and in the properties tab where it says "<Frame Label>" type "squarepage". Then go to frame 1 and put this code in the actions panel of your square button

on(release){
	gotoAndStop("squarepage");
}



YOUR DONE
That should do it, Press "Ctrl + Enter" to test it.

Also: I know it could have been explained much shorter, I just like to be thorough.

ICEDD

Is This A Good Question/Topic? 1
  • +

Page 1 of 1