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


button functionality

Posted on 2006-04-12
Medium Priority
Last Modified: 2010-04-03
how can make if i click in button1 make the functionality to button2
Question by:newnewmommon
1 Comment
LVL 34

Accepted Solution

Aneesh Chopra earned 2000 total points
ID: 16442154

I am replying on the following assumption
- you have two buttons, button1 and button 2
- button two does not have any function on any of its event in start,
- you want that on button1 click, button2 event gets populated.

in simple words, if user presses button two in start, it does not reaches,
but if user first click button1 and then click button2 , in this case button2 give response.

if I am correct, here is the solution.
you have two buttons, button1 and button 2 on the first frame of new FLA, no action has been written anywhere till now

now here we will write the code on frame not on buttons,
click on the frame.

press F9 to open action panel..

enter the following code
button1.onPress = function()
      trace("button1 pressed");
      _root.button2.onPress = function()
            trace("button2 pressed");

press CTRL+ENTER to test it



Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question