|
-
-
Get level1 to set a variable on level0 when if is loaded;
_level0.whichBkd=bkd_a;
and use an if statement to check which background is active.
~mgb
-
This probably sound dumb
But could you please help me with a more detailed example of the script because i never used the IF statement 
I do understand the principle you explained so further i would be able to implement it in the site
but i need some exaple of the actual code
Thanks in advance
-
i tried this with no luck :o(
ON THE LOADED BACKGROUND:
-----------------------------
_level0.whichBkd = backgrnd2;
stop ();
-----------------------------
AND ON THE CONTROLS:
-------------------------------
tellTarget ("_level0") {
if (whichBkd = backgrnd2) {
gotoAndStop (2);
}
}
-------------------------------
this is probably not the way so please give me some info on this MGB 
-
Re: i tried this with no luck :o(
Originally posted by Michel
this is probably not the way so please give me some info on this MGB 
Your idea is basically what I'm on about. On the button or frame event put;
if(_level0.whichBkd == bkgrnd2){
// do some stuff;
} else if (_level0.whichBkd==bkgrnd3){
// do other stuff;
}
On the preloaders of the levels for the background put;
if(_framesloaded==_totalframes){
_level0.whichBkd=bkgrnd2;
}
tell target is deprecated so it's best to use the dot notation.
[Edited by mgb on 04-22-2001 at 10:14 AM]
-
-
Re:
You need to set the variable on level0
in the preloader of the background:
if (_framesloaded == _totalframes) {
_level0.whichBkd = bkgrnd3;
}
do a trace on the variable to see if it's being set...
~mgb
-
-
Re: YES YES YES YES !!!!!!!!!!!!!!!!
Ok, well done! 
~mgb
-
last question
Locally it works just fine
but when i look at the version i uploaded to my isp
it is working after several switches back and forward 
And there is a tick in the animation the second the background icons fall into place (that isn't when tested locally)
Any suggestions?
-
Re: last question
This could be a timing problem where the variable is not set for a few seconds even though the swf is cached. You should also set the whichBkd variable to "" with;
if (_level0.whichBkd=="2"){
// do something;
_level0.whichBkd="";
}
~mgb
-
-
Re: Looked at it more closely
Perhaps it is not necessary to use levels. You could use a movie clip for all your backgrounds an use frames in the clip to set the variable. You could also have the nav mc on the root.
You also might try to figure a way to make the variable reset if the swf is reloaded after it is cached so the ifFrameIsLoaded sets the variable and it is also set if it is reloaded.
~mgb
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|