Flash UI component pushbutton

Hello, If a UI component button in first frame is clicked, i would like to move to a second frame. What actionScript do i need and where do i set??

poratl123
portal123Asked:
Who is Participating?
 
Aneesh ChopraCommented:
Hi,

if your Flash UI button component instance name is "myButton"

than here is the script you need to put on first frame (not on button):
---------
var myListener = new Object();
myListener.click = function() {
      _root.gotoAndStop(2);
};
myButton.addEventListener("click", myListener);
---------

IMPORTANT: above script should be copied on first frame not on button instance...

Rgds
Aneesh
0
 
Ramy_atefCommented:
Hi

Yoy can also write this on the button instance itself

on (click) {
      _root.gotoAndStop(2);
}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.