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 / Flash Actionscript / July 2008



Tip: Looking for answers? Try searching our database.

Help with setting variable within movieClip

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brendanr - 11 Jul 2008 20:04 GMT
I am a relative begginer with ActionScript so please bare with me.

I have a button within a movie clip. I have the following code assign to it:

on (release) {
    _root.gotoAndPlay(1);
    startMovie = "intro";
}

I have a conditional statement at root frame 1 that will load movieClip
"intro"  if startMovie = "intro"

The script executes as is if startMovie is undeclared.

I have tried declaring the value as _root.startMovie = "intro"; as well.

I know I must be missing something simple here.

Any help would be appreciated
kglad - 11 Jul 2008 20:13 GMT
startMovie on the _root timeline and inside that movieclip are two different variables.

try:

on (release) {
_root.gotoAndPlay(1);
_root.startMovie = "intro";
}
brendanr - 11 Jul 2008 20:27 GMT
Thanks kglad.

I did try _root.startMovie = "intro"

Maybe I am missing something else. Here is the code for root timeline:

myProgressBarListener = new Object();
myProgressBarListener = function (eventObject) {
myProgressBar._visible = false;
};
if (!_level0.startMovie) {
myLoader.contentPath = "home.swf";
}
if (_level0.startMovie == "intro") {
myLoader.contentPath = "intro.swf";
}
if (_level0.startMovie == "marketing_print") {
myLoader.contentPath = "marketing_print.swf";
}
myLoader.scaleContent = false;
myProgressBar.addEventListener("complete", myProgressBarListener);
myProgressBar.mode = "polled";
myProgressBar.source = "myLoader";
myProgressBar.conversion = "1";
myProgressBar.label = "LOADING %3%%";
myProgressBar.direction = "right";
myProgressBar.labelPlacement = "bottom";
kglad - 11 Jul 2008 20:46 GMT
if you're loading that swf into another swf, _root may not refer to the main timeline.  use _level0.startMovie in your on(release) handler.
 
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.