Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

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
0
portal123
Asked:
portal123
2 Solutions
 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now