Discussion:
Nav Button State on page load
(too old to reply)
elyas2004
2009-04-01 22:45:36 UTC
Permalink
on my flash movie i have buttons, how can i make the button stay hightlighted
based on page name.

for example if some one clicks on about us page when about us page loads the
about us button stays highlighted.

this ist he button code currently on my flash movie.
-------------------------
onClipEvent (load)
{
num = 8;
}
on (rollOver)
{
if (_root.link != num)
{
this.gotoAndPlay("s1");
} // end if
}
on (releaseOutside, rollOut)
{
if (_root.link != num)
{
this.gotoAndPlay("s2");
} // end if
}
on (release)
{
if (_root.link != num)
{
_root.link_prev = _root.link;
_parent["but" + _root.link].gotoAndPlay("s2");
_root.link = num;
} // end if
}
-------------------------------------------------------------------------------

i am new with flash and i searched online it think this can be done with
passing a varible but i cant seem to work it out.

thanks in advance
NedWebs
2009-04-01 23:59:14 UTC
Permalink
If you are using a button, you can't make it hold a state. But you vould have
something else that acts as a highlight for the button, like a movieclip that
the button tells to show.

To make the button hold a state, you need to create it as a movieclip and tell
it to stop on different frames on different occasions.

Loading...