Skip to main content
Participating Frequently
October 9, 2006
Question

Loading Movies on top of another

  • October 9, 2006
  • 5 replies
  • 374 views
I've been working on a spotlight movie for a webpage. What I have is a random movie loading to a set target and then after a short delay (on a subsequent frame) the action of "loadMovie" is repeated.

The code I'm currently using is " loadMovie("media/backgrounds/spotlight"+(Math.ceil(Math.random()*3))+".swf", "TT");"

The problem I'm having is that the new random movie that is being loaded is replacing the current one; so there is a visual jump instead of the new one transitioning in. Is there a way to load the new movie on top of the existing one, so the action is visibly smoother? I need to load the movies to the set target however for the design I've developed to work.

Also is there a way to avoid the random movies from repeating?

What I have so far can be viewed at: http://www.dropik.com/test


Thanks in advance,

Fran
This topic has been closed for replies.

5 replies

fdropikAuthor
Participating Frequently
October 10, 2006
Hmmm that didn't seem to do anything...Did I do something wrong?

Also, I really don't want it to tween between the movie clips as there is a transition already built in. I really just want to try to get them to load on top of one another, but I've never used any of the depth commands in action scripting.

I really appreciate your help – I hope I’m not being a pain.
Known Participant
October 9, 2006
OK I have got it to rotate, but I can't solve the random select with so few images

Here is the code, you will have to substitute "clip"+c for the linkage name your using.

fdropikAuthor
Participating Frequently
October 9, 2006
OK, I've taken your advice and moved the movies to the stage. Using:

_root["spotlight"+Math.floor(Math.random()*3)].gotoAndPlay(2);
stop();
tellTarget ("/timer") {
delay = "3000";
}
gotoAndPlay(1);


I'm still having the problem of them replacing the currently playing movie though and the do occasionally repeat. How can I prevent this?

I've updated the page: www.dropik.com/test
Known Participant
October 9, 2006
Hi

I have almost completed a sample rotator for you, to overcome the not so random selection I think you need to at least double the amount of images. This will give a greater chance of not repeating the same image.

I am trying to set it up so that it never shows the last image again, it always will show a new image.
fdropikAuthor
Participating Frequently
October 9, 2006
I'll give that a try - would I do that through an array?
Known Participant
October 9, 2006
Hi

Cool site, rather than load each swf file randomly why not have all of then on the stage at the same time and tween the alpha and the depth of the randomly selected swf. Its simpler to transitiion alpha's than using bandwidth loading movies.

Hope it helps