Skip to main content
Inspiring
April 19, 2006
Question

loading two different movie clips in an interval

  • April 19, 2006
  • 2 replies
  • 248 views
So far, I've created a loader swf that just has the action script below in
the first frame.

I do not get a script error, however, it is not loading the wanted swf files
either.

I think it is because I do not have an action to load - I've created a
variable with the loadmovie and then an if statement to change the
variable's value. I then have the code to create the interval.

I am a beginner coder, so I am hoping any help will be done in a manner that
I might learn.

TIA,
Greg

toBePlayed =
loadMovie(" http://www.kfog.com/kfogxml/np_kfog_3_single.swf",self);

if (toBePlayed =
loadMovie(" http://www.kfog.com/kfogxml/np_kfog_3_single.swf",self)){
toBePlayed =
loadMovie(" http://www.kfog.com/kfogxml/onairnow.swf",self);
} else {
toBePlayed =
loadMovie(" http://www.kfog.com/kfogxml/np_kfog_3_single.swf",self);
};


myInterval = setInterval(toBePlayed,30000);


This topic has been closed for replies.

2 replies

Inspiring
April 19, 2006
"sneakyimp" <webforumsuser@macromedia.com> wrote in message
news:e262is$hc5$1@forums.macromedia.com...

> RTFM!

does that mean "read the f'ing manual"?
-gw


Inspiring
April 19, 2006
you can read it as read the *friendly* manual if you like.
Inspiring
April 19, 2006
check the flash docs on loadMovie(). It doesn't return anything.

Furthermore, if you are doing an IF comparison, you should use two equals signs (==) otherwise, you are always going to get true and you are going to actually assign the value of the second item to the first.

if you want to work with intervals, check out setInterval().

RTFM!