Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with actionscript

Status
Not open for further replies.

orbitph

Programmer
Feb 23, 2001
35
NL
I'm trying to build a menu bar with different movie clips.
Using Actionscript I want to control the bar, if some clip is loaded it starts an alpha sequence and if another button is pressed the clip should unload an load another(depending on the clip)
Actionscript should check which button is last clicked and if it is the second time it's being clicked.

How to do it? working on flash and vb6
if you have tips or comments send them to me

in the mean time check out or
 
I have a script that recognises the current mc so won't run it the second time (close it). Also, when you click another link it will close the current. Is this what you mean/want? I have a .fla somewhere but not here (at work). I will try and post a link to it in a couple of hours. funkymonk B-)
rod@sameplanet.co.uk

 
Use a variable such as clicked_once and set it to true on the first press. Then include a conditional statement in the on press action.

Something like this:

on (press) {
if (clicked_once == false) {
// ...do something...
clicked_once = true;
} else {
// ...do something else...
}
}

You can also reset clicked_once to false at the end of your clip "something else...", to get a sort of toggle effect on that button.
mywink.gif
ldnewbie
Hope that this
was helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top