Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Randomly Play Movies Within Flash Movie



I have one large photograph and want to have other smaller photographs playing randomly over top in different positions as movie clips/slide show. I've made three different movies within main movie of these smaller photos. Is there a script that says something to the effect "alright play movies one, pause 5 seconds. play movie 2..." and they pplay whereever I dragged them to on screen?



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-01-2002, 11:14 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How To Randomly Play Movies
hi!

I have 8 movie clips on the main timeline (all clips just have some text that fades in and out). Is there a way of playing these clips in a random order? ie: clip1 plays, then clip5, then clip8, then clip3 and so on...

if anyone can help that would be grand!

thanx in advance

:O)

Randomly Play Movies...
Hey,

This is for flash5 by the way...safe.

Ritey-HO...Basically...

Iv got (for example) 4 movie clips...

I wnt these movies clips to play on the main stage in a random order, wiv random lengths of time between them...

So maybe...Movie_1 plays...pause for a second...Movie_4 plays...pause for 0.32 seconds....etc, etc, etc...

Please sum1 tell me how...

So I need summit to randomly select from a predefined selection of movieclips...Not jst randomly play ne movie clip that mite be in the .fla...Thanxs y'all...

Bye,

Mike :|

Randomly Load Different Movies INSIDE A Movie? Flash 4 Or 5
Is it possible to randomly load/display movies inside a .swf? For example, I'll use a simple java ticker effect with say 10 sentences.

Can you randomly have let's say #3 scroll, then fade out (as an independent movie), then when it's done, have another random sentence, let's say #7 scroll, then fade out. And it just keeps randomly looping through those 10 sentences?

I've looked around for a tutorial, but can't find anything.

Can A Movie Be Set Tp Play Randomly?
Is it possible for a movie to play itself randomly. For example, an icon blinks, then maybe 3 seconds pass and it blinks, then 10, then 2...etc... Is this possible? How can I do it?
Thanks.

Play Movie Randomly
I have a movie that has a gleaming effect on it. I want to play this randomly. Here's what I have so far...

onClipEvent (load){
timer = Math.round(random(10)*1);
if (timer = 1){
logo_anim.gotoandPlay(1);
}
}

I know the first problem is that it only executes on load. How do I fix this? Also, the instance name of the movie is 'logo_anim'. Will the rest of the code work?

How To Play Movie Randomly
I have three movies named " mov_0, mov_1, mov_2"
I inserted them in one fla.

I want to play them randomly..

Uff I couldnt do

Need help !!

Movie That Will Randomly Pick Between And Load One Of Two Other Movies
This seems pretty straight forward, I just need the code to put in a movie so that it randomly picks between two other movies to load and put it in its place. So esentially a visitor will have a 50/50 chance of seeing one movie or the other on visiting a site.
Thanks in advance for any help.

Play Randomly Movie Clips
i used this code...

Code:
random = Number(random(9))+1;
tellTarget ("/mc" add random)
gotoAndPlay(1);
}
then this one...

Code:
r=int(Math.random()*9)+1;
_root["mc"+r].gotoAndPlay(1);
}
im using 79 movieclips...they are tiny sqares but they all are different...

i need to play the animation that each square has (change color) without pressing any button...the first code worked pasting it into a button...but second one dindnt worked....

ah!...and with the first code...i can only play randomly the first 9 MC...and then comes and error of level_0

Play Duplicate Movie Randomly?
This is probably very, very simple...but I have looked and am frustrated trying to figure it out being new to this...
but here goes.

I have a movie clip (a square that rotates and fades) that i have duplicated on the stage 50 times to cover the whole stage.I want them to play randomly-dissolving at different times to reveal the background.

do I need to name each one? even if it is the same movie? or is there a actionscript to play it at random times?
Since I am a newbie, any help would be greatly appreciated and where I put the code.

thanks!!

[Help]Play Movie Clip Randomly
I dont really like asking for help but this ones really got me stuck. Im making a little wack a mole type game and I have most of it done. Ive made a timer and loader and every thing i just cant figure out how to make the mole to pop up.

I was thinking of making it so the mole movie clip would play say 10 times a minut randomly. Any thing to even point me in the right direction would be apreciated.

Movie Symbol To Play RANDOMLY, Frames 1-5 Or 6-10
Movie Symbol to play RANDOMLY, frames 1-5 or 6-10


What actionscript do I need to create this?

1--2--3--4--5--6--7--8--9--10 FRAME#
K--------------K------------- K=Keyframes

When I drag this movie symbol into my work i want it to randomly play frames 1-5 or 6-10 and repeat this random selection. Can anyone help me with this?

Thanks!

Displaying Flash Movies Randomly
Hi All,
I have a question regarding flash.
I want to develop my project with the flash.
My project scenario is, I have a total no of 60 (.swf) flash movies and are about to take 4 to 5 minutes each, my aim is to display 20 .swf files randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 flash movies on the screen and when we click for the second time it should display other set of 20 flash movies it may or may not repeat the previous ones. It means every person should be displayed with a different set of flash movies, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please direct me to meet my scenario.

Thank you for your precious time.

Displaying Flash Movies Randomly
Hi All,
I have a question regarding flash.
I want to develop my project with the flash.
My project scenario is, I have a total no of 60 (.swf) flash movies and are about to take 4 to 5 minutes each, my aim is to display 20 .swf files randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 flash movies on the screen and when we click for the second time it should display other set of 20 flash movies it may or may not repeat the previous ones. It means every person should be displayed with a different set of flash movies, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please direct me to meet my scenario.

Thank you for your precious time.

Displaying A Set Of Flash Movies Randomly
Hi All,
I have a question regarding flash.
I want to develop my project with the flash.
My project scenario is, I have total no of 60 (.swf) flash movies and are about to take 4 to 5 minutes each, my aim is to display 20 .swf files randomly at a time on the screen.
i.e., if we click on a button for the first time, it should display a 20 flash movies on the screen and when we click for the second time it should display other set of 20 flash movies it may or may not repeat the previous ones. It means every person should be displayed with a different set of flash movies, no two persons can get the same set of movies. The movies should be randomly selected.
Could you please direct me to meet my scenario.

Thank you for your precious time.

Randomly Picking Flash Movies To Load Based On The Week?
hi there. im working on a site that load a swf onto the time line. is there any way to make it so that each week, the script loads a different swf into that area on the timeline? this way i dont have to manually swap it out every week.

mike@indierockmedia.com

Actionscript Tweens Randomly Won't Play/only Play Halfway
I'm working on a website that can be seen here

I have several tweens created using AS3 and then several tweens created just using motion tweens on the timeline. When I view my website in Firefox (latest version), about 50% of the time, the actionscript tweens will not complete the entire tween or not start altogether. On the other hand, sometimes it works flawlessly. The motion tweens created with the timeline always work in there entirety. When I view it in Safari (also latest version), the tweens work about 90% of the time, but there is a few instances where the tweens won't go all the way through their specified animation.

I was also able to recreate this effect by just testing the movie within flash. In flash, the animations either work fine or the tweens don't start when I click on the corresponding button (unlike browsers where sometime the tweens will only go halfway through their animation). It only happens in flash about 5% of the time when clicking on the nav buttons and there is no apparent pattern as to when it is going to happen or on what nav button it happens on.

Any ideas on what is causing this?

Movies Don't Play Over Every Other Movie In Scene
Hey oh-wiser-ones,

So I've got a scene, which has 6 buttons and 6 corresponding movie clips over them. Essentially you can press a square, and that square opens up and covers much of the screen in a black square which has an input text box in it.

So I have one page where it works correctly; I have an onRelease behavior for each button telling it to play its corresponding movie clip, which is itself opening up and creating the input text field and a close button. When I open each box by pressing the button and playing the movie clip, that movie clip opens over the OTHER five movies and buttons on the stage. And each one successsfully plays over the others.

The second scene has something similar, just with more buttons. My problem with this scene is that only hte first movie clip opens up black over the rest on the stag-- the other eight buttons and movie clips are clicked and upon up from behind the other movie clips on the stage. The layering for each scenes is identical-- I have the background, the buttons, and then the movie clips and actions on top. And it's weird because as you progress, it's in the order that they are on the page that they open in front of.

The .fla was too big to attach-- it seems like a really simple problem but I simply cannot figure it out! Any help is GREATLY appreciated. THANKS!

Can Movies Be Randomly Loaded?
I have a client who wants 5 HTML-formatted + linked text chunks to load randomly each time the page is loaded. I know it's possible to load text strings randomly from an external text file, but that seems to preclude the HTML formatting. Is it possible to randomly load movies on a page load?

Randomly Load Movies
i have a simple card game where the user chooses a card and i have created 4 movies where in one of the movies the cards are wrong. how can i randomly cycle through these movies so the user chooses once and the next time round it could be the right answer or wrong answer for that matter?
~confused~

Loading Two Movies Randomly
loading two movies randomly

i need a script that loads either movie_a.swf or movie_b.swf when main movie loads.

thanks in advanced,
tulex

Loading Movies Randomly
I've created a flash ad banner rotation but can't get the movies to load at random. Can anyone help with this? Thanks

Help How To Randomly Load Movies...
Hi all,

I am developing a Flash site with a specific area designated to load a different little movie each time the user goes to a new section on the site... i understand completely how to load a specific movie with each click, but does anyone know a simple script i can add that will randomly choose from a dozen or so movies, so that each experience is different?

I remember coding in HTML that does this... any help for Flash MX?

much thanks,
jason

Randomly Loading Movies?
Hi, I suck at AS, and I cant figure this out, using the loadMovie command, I want to dynamicly load a random movieclip to my website everytime it is accessed, so theres always something new to look at in the header, anyways, can someone please post the correct syntax for this operation? Thanks for the help

Randomly Play Swf's Help
I have 13 swf's I want to create a random function that would randomly load an swf. Has anyone done something like this already

Randomly Select And Display Movies?
Hi again

I need help with something I need to do guys

Here's what I want...

I want to make a flash movie that includes more movies in it and will start out normally (with a specific starting movie) when the page first loads. Then when the starting animation/movie finishes and stops and just keeps displaying the final image of the animation... I want it to randomly select one of the movies and play it every few seconds. Once it finishes playing each movie, I want it to reverse-play it and get back to the last image of the starting movie. Then after a couple of seconds I want it to again randomly select another movie and play it and the same thing to happen with every movie

Now, I know how to make a movie that includes other movies in it and to play them... but I've no idea how to do the random select and play thing and also how to reverse-play afterwards and the rest.

So could somebody explain please?

Thanks

Randomly Placing Attached Movies..
Here's what I have:


ActionScript Code:
var place:Number = random(200);

 for (i=0; i<4; i++) {
_root.attachMovie("ae_mc2", "ae" + i, i);

//set the location
for(x=0; x<4; x++) {
   
_root["ae"+i]._x = i*place+x;
_root["ae"+i]._y = 380;
 trace(_root["ae"+i]._x);
 }

I don't want the attached movies to be placed evenly. I want the four clips to be placed along an x axis of which the limit is 530, at random positions as well as not overlap each other. I will eventually put this into a function so that new movies can be attached at certain points so I d

I've been through numerous attempts but I can't seem to get the code that utilizes a random number through each loop interation instead of the same random number for all?

In other words, how can I force a random number throughout each loop cycle?

Probably just numbed out..thanks

Loading Into Different Movies Randomly. Is It Possibly
I have some movie clips and i'd like to add some variables to them.
Is it any at all possible to load variables into movie clips in random order. That is: each time they load, they load into the movie clips a different order.

Does this make even remote sense to anyone? Has anyone heard of a problem like this before?

HELP

Loading Into Different Movies Randomly. Is It Possibly
I have some movie clips and i'd like to add some variables to them.
Is it any at all possible to load variables into movie clips in random order. That is: each time they load, they load into the movie clips a different order.

Does this make even remote sense to anyone? Has anyone heard of a problem like this before?

HELP

Randomly Play On X Axis
I have a lightning bolt movie clip I want to randomly play along the x axis whenever the timeline reaches the frame its on. Is this possible, and if so...how?

Thanx

Play A Frame Randomly
I have a series of photos fading in and out of each other (the pictures are tweened graphics).
How do i get this file to 'randomly' start on a different photo/ frame each time the swf is loaded?

Thanks for any suggestions!!

Using AS To Randomly Play A Scene...
Is it possible to randomly play a scene using actions? I am just trying to start a movie from any of 3 scenes using Flash 5. Thanks.

How To Play Scenes Randomly
Hi, I have a file containing 4 diffrent scenes.
I want them to play "randomly". How can I do that?
Is there any action script for that? Please guide me.

Madhura

Play Clip Randomly
Hi all, here's what i want to achieve.

What I have:
-A number of sound files (lets say 5)

What i need to achieve (Part 1):
I want to create a script that will (on page load) randomly choose a sound file and play it, then when that sound is done playing, automatically choose another random sound.

What i need to achieve (Part 2):
Each new sounds will start playing at a random time interval (min & max time). So after each sound, the next one will start 5 secs(or so) later. So the next one will start after3 secs, and so on.

I would like to apply this code to mc's as well

Hope this is too much. Thanks in advanced.

Randomly Play Sounds
I'm wanting to create a flash movie with the sole purpose of randomly playing sounds.

I've set up a supermarket forum and want to play sounds at random intervals to mimic the "tanoy" announcments in supermarkets.

There will be 10-15 recordings which must play at random times, and in random amounts. Say one time a user may log in and hear just one recording, then the next time they log in they may hear 3 or 4.

Is this possiable?

Getting MovieClips To Play Randomly PLEASE HELP
I posted this in the Flash 8 forum, but wonder if I'll have better luck in here. I need to get movie clips to play randomly. Currently, I have actionscript on Frame 1, and a movie clips on the stage in Frame 2. Also in each movie clip as the last frame I have "PlayMC();". Here's the ActionScript I'm using now...can anyone provide insight?

var myNumber;
// return a random number
function getRandomNumber(maximum, minimum) {
return Math.floor(Math.random()*maximum)+minimum;
}
// play a random movieclip
function playMC() {
clearInterval(myInterval);
myNumber = getRandomNumber(3, 1);
_root["mov_"+myNumber].gotoAndPlay(2);
delayMC();
}
// call our playMC function every 15sec
function delayMC() {
myInterval = setInterval(playMC, 15000);
}
// begin our random movieclips
playMC();

Randomly Play Movieclip
tried for a while to find help for this.

what i need is the code to have a movieclip start playing at random, (not to have a random movieclip play) the only thing is i want to be able to choose the minimum gap between it playing

if anyone can help

Thanks

Randomly Play Movieclips
Hi guys,

I want to have a movie clip that plays at random on the stage.

so there would be small lengths of time that it does nothing, then actionscript will tell it to play, then wait another random period of time before playing it again.

Hopefully this can happen on one frame as I imagine.

In the end I want to do this with different movie clips at the same time.

I uploaded a simple .fla if that helps.

Any suggestions welcome, and if this doesn't make sense let me know.

thanks in advance,

- gabe

Randomly Play Sounds
I'm wanting to create a flash movie with the sole purpose of randomly playing sounds.

I've set up a supermarket forum and want to play sounds at random intervals to mimic the "tanoy" announcments in supermarkets.

There will be 10-15 recordings which must play at random times, and in random amounts. Say one time a user may log in and hear just one recording, then the next time they log in they may hear 3 or 4.

Is this possiable?

Randomly Place Movies On Stage - Mx 2004
ok. i have been trying for 2 days to get this one thing right on this project i am working on.

i need to randomly place 8 movie clips on the stage, in fixed positions. they need to remain in place while the frame is loaded. but when the frame is reloaded, they need to be randomly placed again.

maybe someone could help me out with this. it is driving me bloody nuts. thanks a lot.

scriptjet

Playing A Flash Movie Randomly
To whom it may concern:

This is what I need to do:

Each time you click on a external link in a flash movie the linked window will open in a separate window and a flash pop-up window will load in yet another window.

For instance every 1000 click to the external link a pop up window will appear but only once a month. So I guess I would need to be able to reset the code.

Also, along with have the pop-up occur on the 1000 click, in addition I need to be able to assign another click amount (example 450 clicks) which changes every month.

Also, what is some good link tracking software? Does statcounter.com do this?

Please help. Thank you.

-Mark Roffer

Playing A Flash Movie Randomly
To whom it may concern:

This is what I need to do:

Each time you click on a external link in a flash movie the linked window will open in a separate window and a flash pop-up window will load in yet another window.

For instance every 1000 click to the external link a pop up window will appear but only once a month. So I guess I would need to be able to reset the code.

Also, along with have the pop-up occur on the 1000 click, in addition I need to be able to assign another click amount (example 450 clicks) which changes every month.

Also, what is some good link tracking software? Does statcounter.com do this?

Please help. Thank you.

-Mark Roffer

Flash Movie Randomly Restarting
This flash movie i have finsihed now keep jumping back to the first frame randomly and for no reason that I can see.

the movie thats bin loaded is a container, frame one has the lil intro in and that then uses a _root.gotoAndPlay when it reaches its end to make the container move to the next frame which there contains the main site bit.

Playing A Flash Movie Randomly
To whom it may concern:

This is what I need to do:

Each time you click on a external link in a flash movie the linked window will open in a separate window and a flash pop-up window will load in yet another window.

For instance every 1000 click to the external link a pop up window will appear but only once a month. So I guess I would need to be able to reset the code.

Also, along with have the pop-up occur on the 1000 click, in addition I need to be able to assign another click amount (example 450 clicks) which changes every month.

Also, what is some good link tracking software? Does statcounter.com do this?

Please help. Thank you.

-Mark Roffer

Randomly Changing Direction Of MC Play
Okay, so I have a MC that has 150 frames.

I want this MC to play both forwards and backwards, randomly, so it should be sliding back and forth on its timeline randomly.

So I put a stop on the first frame of the MC, then I put the folling actions on it (on the stage, not in the MC):

onClipEvent(load){
direction = "forward";
}
onClipEvent(enterFrame){
//Make random number
randNum = Math.random();
//If random number is lower than .01, change direction
//This should happen once every 100 frames or approx 3 seconds
if (randNum < .01){
if (this.direction == "back"){
this.direction = "forward";
} else if (this.direction == "forward"){
this.direction = "back";
}
}

if (this.direction == "back"){
this.gotoAndStop(prevFrame);
} else if (this.direction == "forward"){
this.gotoAndStop(nextFrame);
}
}

But my MC doesn't do anything at all. Just sits there. Anyone? Thanks,
-L

SWF Randomly Doesn't Initially Play
I think I might be configuring my object and embed tags incorrectly but occasionaly my Flash 6 SWF wont play when loaded.

Here is what I'm using to embed the swf...

<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="750" HEIGHT="99" CODEBASE="http://active.macromedia.com/flash6/cabs/swflash.cab#version=6,0,0,0">
<PARAM NAME="MOVIE" VALUE="flash/navigation.swf">
<PARAM NAME="PLAY" VALUE="true">
<PARAM NAME="LOOP" VALUE="true">
<PARAM NAME="QUALITY" VALUE="high">

<EMBED SRC="flash/navigation.swf" WIDTH="750" HEIGHT="99" PLAY="true" LOOP="true" QUALITY="high" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT>


What seems to be a random times, the swf will load but wont play. The only way to get it to play is by right clicking and going to "Play".

Anyone else have this problem or know how to fix it?

Play Frames Randomly On The Timeline
I have a flash file which consists of 45 images and I would like the timeline to play randomly.

Example:

Normal = plays frames 1, 2, 3, 4, 5, 6, 7, 8, 9 .....
Random = plays frames 1, 6, 3, 9, 5, 6, 7, 3, 2 .....


Please, how can I do this?

[F8]making A Small Mc Play Randomly
basically i mad an intro, and at the end i wish to insert a movieclip that flickers and makes the screen black for 2 frames. However i wish it to do so randomly but i have absolutely no clue which script to use.
can some1 help me achieve this?

Play Movieclips Randomly From Stage
I'm trying to play 10 movieclips randomly from the stage. I have all the movieclips on the stage on frames 2. On frame 1 i have the following code:

var myNumber = getRandomNumber (2, 0);

_root["mov_" + myNumber].gotoAndPlay (2);

// return a random number
function getRandomNumber (maxnum, minnum)
{
return Math.floor (Math.random () * maxnum) + minnum;
}

// play a random movieclip
function playMC ()
{
myNumber = getRandomNumber (2, 0);
_root["mov_" + myNumber].gotoAndPlay (2);
}


// begin our random movieclips
playMC();

For some reason it won't go and play frame 2 which is where the movieclips are. I have all of my movieclips named mov_0, mov_1, mov_2 etc....

THanks!

Randomly Selecting A Scene/swf To Play
Ok, I have two flash movies, both the same size for the same area of my website. I want users to see either flash piece A or B when they go to the site. So basically I want one flash movie with two scenes that chooses which one to display at random. But if there's an alternative way to achieve the same goal I'm game.

I tried doing this but it didn't really work, I put both advertisements on the same timeline, the first starting at frame 10 and the second one starting at frame 70.

if(random(100)>50){
gotoAndPlay(10);
}else{
gotoAndPlay(70);
}

Copyright © 2005-08 www.BigResource.com, All rights reserved