Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / July 2008



Tip: Looking for answers? Try searching our database.

Can't Understand _root.link

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CipiClaudiu - 08 Jul 2008 10:31 GMT
Hi,

I'm working on a menu bar and I found some code lines that might help me...
thing is I don't understand few lines: _root.link != page and _root["btn" +
_root.link]

Please help me if you can, I need this done right now

[code]on (rollOver)
{
    if (_root.link != page)
    {
        this.gotoAndPlay("over");
    }
}
[/code]

[code]
on (release)
{
    _root["btn" + _root.link].gotoAndPlay("out");
    _root.link = page;
}
[/code]
Cor - 09 Jul 2008 07:49 GMT
The on(rollOver) checks if _root.link is not equal to the page and if
not it gooe to the frame named "over".
If it is equal that button or movieclip does not need to react because
the current page is showing.

The on(release) function plays the gotoAndPlay("out") wich belongs to
the root["btn" + _root.link]
Doing this is the way to reuse the same code for every button or
movieclip.

HTH

Kind regards

Cor
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.