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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

action script for recognizing opened mc's 3

Status
Not open for further replies.

disfasia

Programmer
Apr 20, 2001
378
0
0
CA
I have composed a site with two mc's: one is the menue with buttons, the other are the indivual minipages that these buttons call up. they unscroll and rescroll the windows.

You can see this at
I have made invisible buttons which call the scrolling up for each button, but if you notice it makes the site a bit jumpy at times.

What I would like to do is dump the scroll up button and incorporate this in the button itself so that on rollout the scroll up mc keyframe will be called up, but I can only do this wil a variable or if statement in which each button, before scrolling out its page will first scroll up any other open button. How can I do this?

Thanks in advance.

Also, how do I give people stars here? I have no idea how this system works.... : ) Sorry...
 
So Big Dave... You've become an "onClipEvent" freak also! LOL

Regards,
wink4.gif
ldnewbie
 
Nice FAQ Dave.

Just checked your site, you're in Woking right? I'm just down the road in Guildford. Small world etc. etc. (wouldn't like to have to paint it though).

Old - I know about the "eval" thing. I use eval for variables and array notation for MovieClips, helps me debug things faster because I don't have to remember which is which.

I'll have a look at that .fla tonight maybe but Carl's wallpaper is next (after a quick fix for an actual client that is).
 
Wang, if you have a second...

I must be pretty dumb!
Simply can't get this associative array thing going!

Wanting:
_level5.gotoAndPlay(2);

How do I write the damn thing with a variable?

myvar = 5;
_level["myvar"].gotoAndPlay(2);
_level[myvar].gotoAndPlay(2);

None of the above seem to work!

Regards,
wink4.gif
ldnewbie
 
Don't think you can access a level using this notation to be honest.

_level5 (or whatever) is the base level for that movie in the same way that something like...

_root["mc"+i]

...works.

You might have success with eval("_level"+myVar) because it's creating a reference from a string.

Kind of goes against much of the discussion today though :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top