Loading Random Animations
Hi all,
Heres a simple one, I want to make a flash movie which contain several different animations( say 5?). How do I make each animation display randomly so that each time someone visits the site a different movie is played?
Thanks Sampy
FlashKit > Flash Help > Flash MX
Posted on: 08-08-2004, 05:10 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Random Animations
hi there, ive got a little problem i was given a code to make these random animations play but i dont know what to do to make it play.
my movie is 1 frame long and but i want these animations to play, they are like 20 frames long.
the person who gave me the code told me to put this in
rightAnimations.gotoAndStop(Math.ceil(Math.random( )*5));
wrongAnimations.gotoAndStop(Math.ceil(Math.random( )*5));
"Now this also assumes that you have your wrong and right animations in seperate movieclips. each having five frames and on each frame a movieclip with a different wrong/right animation. "
that is what i was told to do.
i dont fully understand what im ment to do, and i dont understand how my main timeline should be set out.
i want this character to be standing on the stage, then if the user answers the question correctly i want the character to do one of the 5 right animations, if the answer is wrong i want the character to do one of the 5 wrong animations.
i hope i have made it clear enough for you.
thanking you in advance. peter.
Random Animations
I have 16 different animations in 16 different Movieclips in the Library.
I want them to play in a random order 1 after another from the library and exactly after all 16 play the loop should stop automatically.
I used array and have written the following "for" loop to play this.
----
var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
var selectedNumbers = [];
var j = 1;
var i = 0;
for (var i = 1; i<16; i++) {
myvar = handle.createEmptyMovieClip("mc"+i, i);
handle["mc"+i].attachMovie("movieclip"+i,"movieclip17"+i,i);
var index = random(numbers.length);
_root["movieclip"+i].count.text = numbers[index];
trace(numbers[index]);
selectedNumbers.push(numbers[index]);
numbers.splice(index,1);
}
-----
but when i play, all the 16 animations runs together without any interval.
Please can someone modify this script and suggest how to play only 1 animation at a time?
I am not sure how to place the "setInterval" function which i think will delay the loop each time.
Thanks in advance..
Random Animations
I have 16 different animations in 16 different Movieclips in the Library.
I want them to play in a random order 1 after another from the library and exactly after all 16 play the loop should stop automatically.
I used array and have written the following "for" loop to play this.
----
var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
var selectedNumbers = [];
var j = 1;
var i = 0;
for (var i = 1; i<16; i++) {
myvar = handle.createEmptyMovieClip("mc"+i, i);
handle["mc"+i].attachMovie("movieclip"+i,"movieclip17"+i,i);
var index = random(numbers.length);
_root["movieclip"+i].count.text = numbers[index];
trace(numbers[index]);
selectedNumbers.push(numbers[index]);
numbers.splice(index,1);
}
-----
but when i play, all the 16 animations runs together without any interval.
Please can someone modify this script and suggest how to play only 1 animation at a time?
I am not sure how to place the "setInterval" function which i think will delay the loop each time.
Thanks in advance..
Calling Random Animations
heya guys,
i've been pulling my hair out for hours now!! i'm trying to call a random function that will animate whatever movieClip i pass to it:
code: onClipEvent(load)
{
randomNumber = Math.floor(1+Math.random()*3);
trace(randomNumber);
anim1 = function (clip)
{
clip._x++;
}
anim2 = function (clip)
{
clip._x--;
}
anim3 = function (clip)
{
clip._y++;
}
var animArray=new Array(anim1(),anim2(),anim3());
}
onClipEvent (enterFrame)
{
animArray[randomNumber + (_root.mc1_mc)];
//animArray[randomNumber];
//anim1();
//this["anim"+randomNumber]);
}
can anyone shed some light on the sytax for this please?
thanks!
monkeybrainz
Actionscript Random Animations For .png
Basically I have 4 images I want to fall like snow in a random pattern at a certain speed and rotation. Is this possible with actionscript? I also want to have more than just the 4, like 10 of each, Any directions you guru's can point me in?
Linking Random Animations Within Movie
Hi,
I would appreciate any help on this you can give me as I am just a poor artist with no brain for programming.
What I want to do is have a background with a funny character doing various humorous animations. Thats no problem. Now I want that character (who is a movie clip instance) to have a kind of hierarchial list of random animations within it. Kind of like 'ol Earthworm Jim. Remember him? If you left him alone he would do these random goofy things.
For example: Hobo Joe (The character) walks across the screen and scratches his butt. Then he reaches into his pocket. Now... say there are 5 different things he could pull out of his pocket - say.... a whiskey bottle, a pack of smokes, a mangy rat, a half eaten sandwich, or an anvil.
How do I set it to randomly decide which he will do? And whatever it chooses could lead to new random possibilities.
It seems to me that some kind of basic randomizing script could do the job. I would just have to keep track of the individual movie clips.
Any ideas?
Thanks
How To Display Random Animations/artwork
I'm working in a magic 8 ball game and have it working to generate random phrases when a user enters a question and clicks the 'ask' button. When the user clicks, an animation of the little triangle runs to appear as if it's coming to the surface of the 8 ball window and then the phrase pops in. What I'd like to try is making the triangle and phrase one piece of artwork so they both animate to the surface rather than separately. So I guess I'm asking how to generate the triangle/phrase artwork randomly on a user click. Below is part of the script I'm using to generate the random text.
ballvar=Math.ceil(Math.random()*8) ;
if (ballvar==1){
_root.ballanimated.balltext.text="YES";
}
if (ballvar==2){ _root.ballanimated.balltext.text="NO";
}
if (ballvar==3){ _root.ballanimated.balltext.text="MAYBE";
}
Any help would be most helpful!
Butch
Random Display Of Different Animations On Every Reload Of Page?
Hello,
I am doing an animation of different images on the screen and they want it to come up with a different sequence of animation on every reload of the page. Like I have my first sequence of images that come in and plays and then on down the timeline another set plays and so on. Is there a way to make it random each sequence it plays? Like it might play the second sequence the next time or even the fourth. I know you probably do it through actionscripting but I've been away from Flash for awhile and I am kinda rusty!!
Thanks!
Animations Loading
in an HTML website with flash movies, is it possible to load all the animations from the website at the start?
Loading Animations Randomly?
hello out there.
This is my first time posting/asking a question. Here goes:
I have an animation that is split up into different scenes. One scene moves into the next. In the first scene, I'd like to have this character animate doing different things, so that each time the movie loops and starts at the beginning he's animating in various ways (maybe up to 5 animations).
questions:
1) how do i make these animations load randomly?
2) can i make the animations in movie clips (instead of external swfs) so that they are contained in one movie?
thanks for your help...
Using Animations In Loading Files
i made a button, when pressed, plays the first half of an animation and then loads a swf. now i am trying to make other buttons, which do the same thing, but close anything that is already opened by any other buttons.
the code:
ActionScript Code:
var A1frame:int
var A2frame:int
var A3frame:int
var swfLdr:Loader = new Loader
button1.addEventListener(MouseEvent.CLICK,startA1)
button2.addEventListener(MouseEvent.CLICK,startA2)
button3.addEventListener(MouseEvent.CLICK,startA3)
function startA1 (event:MouseEvent) :void {
animation1.addEventListener(MotionEvent.MOTION_UPDATE,openP1)
animation1.play()
}
function openP1 (event:MotionEvent) :void {
A1frame = animation1.time
if (animation1.isPlaying){
if(A2frame == 10){
closeA2(this.event)
}
if(A3frame == 10){
closeA3(this.event)
}
}
if(A1frame == 10){
animation1.pause()
button1.removeEventListener(MouseEvent.CLICK,startA1)
button1.addEventListener(MouseEvent.CLICK,closeA1)
loadP1(this.event)
}
}
function loadP1 (event:MotionEvent):void{
var p1:URLRequest = newURLRequest("p1.swf")
swfLdr.load(p1)
this.addChild(swfLdr)
}
function closeA1 (event:MouseEvent):void{
this.removeChild(swfLdr)
animation1.removeEventListener(MotionEvent.MOTION_UPDATE,openP1)
button1.removeEventListener(MouseEvent.CLICK,closeA1)
button1.addEventListener(MouseEvent.CLICK,startA1)
animation1.resume()
}
and then similar functions, openP2, closeA2, startA2, etc.
the initial swf loads fine, and then closes when a different button is clicked, but then the animation for that button plays straight through and throws an error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
I dont know what I am not getting, I need at least to know where to look
thanks,
vontie
Help... Loading Swf Files At The End Of Animations
hello,
ok, i've got a flash file containing about 80 frames. each frame has a stop(); on it. Within each frame is an image (making up an animation) and several buttons. what i want is, when you press one of thoes buttons, no matter which frame you are on, the animation plays back to the first frame and then loads another swf.file on top. at the moment i am using this script:
on(release){
_root.onEnterFrame = function(){
this.prevFrame();
}
loadMovieNum("whatever.swf",4);
}
however, what seems to happen is that the new movie just loads straight on top and the animation doesn't play back to the beginning.
My next problem is some what similar:
I have one file, actually it is the same file as above with the buttons on it; when one of the buttons is pressed a new file loads on top contining an animation. The animation plays until the end. At the end of the animation is a button. This button has this scripting on it:
on(release){
_root.onEnterFrame=funtion(){
this.prevFrame();
}
loadMovieNum("whatever2.swf",5);
}
this does the opposite to the other file i discribed above. it rewinds the animation to the begining but doesn't load the other file at the end....
please any help would be very much appriciated!!!
Loading Status Animations
I'd like to insert a little "loading status" animation on certain pages of my site (similar to Macromedia's site), due to the fact some of my dynamic pages have a ton of data, and load time can be an issue. Where on the page would I place the tags, and how would I coordinate it with javascript OnLoad tags (or active script?)
ThanX
X
Problem Loading Animations?
I can't tell if this is a problem with my ISP, server, or my animation. Everytime you visit my web-site ( http://www.visualactive.net/ ) you are lucky to see both flash animation (left and header .swf). Usually you see one, the other, or none. Does anybody have any idea what it might be? I don't think it's a problem with my cache because I increased mine to 500,000kb (500mb lol) and I also used three different computers with 3 different browsers each (Mozilla Firefox and IE 5 and 6). All came up with the same results. Even my friend noticed this issue. You might be able to see both animations if you refresh the page.
---------------------------------------
If you helped... thx.
Use AS For Transition Animations Between Loading Swfs?
I'd like to learn how to get smooth transitions between my site pages and I've checked out the tutorial on this site: http://www.kirupa.com/developer/mx2004/transitions.htm
This tutorial has the basic effect I'm looking for but I'd like to know if anyone has a way of making this process even more modular. Specifically, is it possible to create a separate transition intro animation swf (or outro animation swf) that is loaded when the user clicks a button to load the next page. In the above tutorial, the transition animation is added to the beginning and ending of each swf.
If I'm taking the wrong approach here, please let me know. I just really want to get this down so my site pages aren't jolted in and out.
How do some of you create smooth transitions between loading swfs?
Any tips, tutorials, or general advice would be great!
Use AS For Transition Animations Between Loading Swfs?
I'd like to learn how to get smooth transitions between my site pages so I'm looking for some clarity/help.
The closest tutorial I've found is the one on Kirupa: http://www.kirupa.com/developer/mx2004/transitions.htm
This tutorial has the basic effect I'm looking for but I'd like to know if anyone has a way of making this process even more modular. Specifically, is it possible to create a separate transition intro animation swf (or outro animation swf) that is loaded when the user clicks a button to load the next page, but plays before the page swf is loaded. In the above tutorial, the transition animation is added to the beginning and ending of each swf.
If I'm taking the wrong approach here, please let me know. I just really want to get this down so my site pages aren't jolted in and out.
How do some of you create smooth transitions between loading swfs?
Any tips, tutorials, or advice on this would be great!
thanks!
Creating Loading Animations For Flash Movies?
I'm not sure if this is being posted in the correct section but what I'm wanting to understand how to do is create a loading screen/animation for a Flash movie that immediately runs before the actual movie completes loading and runs. I'm running Flash Professional 8. I'm wanting to understand how to do this because on many of the movies I've created for the web, while simple fades of photos or something similar, still show the basic white space inside the browser before the movie loads (caches) and runs. I've seen loading screens such as what I'm looking to understand how to make all over the web. Some show countdowns or a progress bar. Can someone help me on how to go about doing this for mine? Thanks in advance.
[F8] Loading External Swfs In And Out With Intro/outro Animations...?
Hi there.
Ok I've done a bunch of tutorials, made a couple of mini sites and I want to make something more advanced.
Lets simplify it and say I have 4 movies, all separate swfs:
1 - Main movie
2 - page 1
3 - page 2
4 - page 3
Lets say that all the 'page' movies, when they start, animate onto the stage. And at the end, they animate off.
What I want to happen is that the main movie loads up, the menu pops in. On the menu is a button for page 1, 2 and 3
The external page 1 should then appear on the main stage area, animating on at first and then hitting it's 'stop' frame and remaining static onscreen. The user can then interact with the page 1.
Then say the user clicks page 2. What I want to do then is set a variable called 'nextPage' to 'page2'
Then the page 1 should go to the part of it's movie where it animates off.
Then I want it to load the movie stored as the variable nextPage onto the screen. It should animate in, and users can interact with it.
Hopefully someone understands what I mean. I've followed a tutorial and managed to get external swfs loading into a 'holder' mc on the stage. However, they don't seem to animate. I want them to go through the part where they animate onto the stage.
TONS of thanks to anyone who can help me out with this.
Noobish - Loading External Swfs In And Out With Intro/outro Animations...?
Hi there.
Ok I've done a bunch of tutorials, made a couple of mini sites and I want to make something more advanced.
Lets simplify it and say I have 4 movies, all separate swfs:
1 - Main movie
2 - page 1
3 - page 2
4 - page 3
Lets say that all the 'page' movies, when they start, animate onto the stage. And at the end, they animate off.
What I want to happen is that the main movie loads up, the menu pops in. On the menu is a button for page 1, 2 and 3
The external page 1 should then appear on the main stage area, animating on at first and then hitting it's 'stop' frame and remaining static onscreen. The user can then interact with the page 1.
Then say the user clicks page 2. What I want to do then is set a variable called 'nextPage' to 'page2'
Then the page 1 should go to the part of it's movie where it animates off.
Then I want it to load the movie stored as the variable nextPage onto the screen. It should animate in, and users can interact with it.
Hopefully someone understands what I mean. I've followed a tutorial and managed to get external swfs loading into a 'holder' mc on the stage. However, they don't seem to animate. I want them to go through the part where they animate onto the stage.
TONS of thanks to anyone who can help me out with this.
additionally - obviously as well as the external page movie animating ON to the stage, I will need to specify the 'page' movie to go to the frame where it animates off, then wait till it has animated off the stage before animating the next page on
Sequencial Imagem Loading To Random Loading
I've downloaded a free script that reads several JPG files and it makes a sequencial slideshow.
This is the function used:
ImageFader.prototype.loadXML = function (x) {
var _xml = new XML ();
_xml.ignoreWhite = true;
_xml.path = this;
_xml.load (x);
_xml.onLoad = function () {
for (var a = 0; a < this.firstChild.childNodes.length; a++) {
var _trans = this.firstChild.childNodes[a].attributes.TRANSITION;
var _pause = this.firstChild.attributes.PAUSE
var _img = this.firstChild.childNodes[a].firstChild.nodeValue;
this.path._dataProvider.push ({img:_img, transition:_trans, pause:_pause});
}
this.path.startFading ();
delete this;
};
};
My question is...
How to change that script to it loades random jpg from the xml in stead if loading img1, img2 from xml.
Anyone can help ? Thanks in advance
Animations Playing Over Animations...
Alrighty,
First off I'm not new to flash, however when it comes to scripting, I am. Heres the issue I'm having:
I have a website entirely done in flash. When you select a side link it plays a short animation on the main animation and then loads another animation upon the main one. This way you only load what you need as you need it. When it appears it gives the illusion of all being part of one site. Now, I'm trying to set it up so that you can select a link on this 2nd animation and have it bring up another animation over part of it... I did it... Thing is, whenever I select one of the far off links to the left from the main animation it wont get rid of the tiny animation brought forth by animation 2... It just stays there and wont go away.
Anyhoo, sorry if this issue is a very simple error and the entire question void of all inteligence, but any help woud be great.
-Ashek
Loading Random Swf
Hey
I have created a series of external swf's and everytime somebody comes to my site a different movie must load.
Got some idea on how to do it but need some help
Cheers
ZieST
Loading Random .swf
Can anyone give me the script for a swf to load a random swf into it every time it's loaded/refreshed. Or tell me where I can find it.
thanks.
Random Loading
Vær hilset højtærede flashkit-medlemmer!
does anybody just happens to be in possession of a script that will load any one of a given number of movieclips by random?
it would be quit terrific and ease my Weltschmerz considerably
many greetings Mik
Loading A Random MC
Thanx to Mkit for help me withe following code:
_root.gotoAndPlay(name);
name = "F"+(random(6)+1);
Which allows my movie to jump to random spots using labels.
Now I need to modify it to load a random MC. I'm not to sure on how to naming structure goes.
How does it know to look for the MC in the library?
Do I use load movie to load it into a black MC on the stage?
Any help is apprectiated
Loading Random Swf
I've got 45 swf files from which I have to load 15 random files, but no file twice!
Any idea on what the best method is for picking 15 different numbers from a given 45 numbers?
Loading Random MCs
I have a few MCs that i want to randomly load...there my website sponsers ads. I would want it to change every so many seconds......How would i go about that?
Random Loading
Flash 5
I would like to load random bitmaps and swf's(or just swfs)
into a container movie. The random event would be on the
loading of the index page or swf.
Is there a standard random load scipt?
Would the code in the post above this one work?
Random Pic Loading
Alright. I want to have a random pic loaded up at the title of my SWF. How can i include the size of the .jpg in the preloader variables and make it load before it gets to the title?
the files are named something like
www.mysite.com/1.jpg
www.mysite.com/2.jpg
www.mysite.com/3.jpg
www.mysite.com/4.jpg
etc, etc.
I have had no problems simply loading the jpg onto the title screen, but the command to load it is AT the screen, so it sits there for a sec before the pic is loaded. I'm guessing i have to load it into the SWF at an earlier point, so it loads before it gets to the title, and then have it attach the already loaded pic.
that must've been a pain to read. i wonder how many times i said "load". anyway. thanks in advance.
Loading A Random Jpg
Ok on my stage I have a mc called "content_mc" which I want my jpg to be laoded into. My photos are stored in a folder called "main" and are name "1-10.jpg" Now I thought this script would work but it didn't.
content_mc.loadMovie("main/"+random(9)+1+".jpg");
Anyone have any idea on how I can get this to work?? Thanks in advance.
Random Loading
This one is a bit out of my expertise at the moment so I am hoping that someone can help.
I have a picture gallery that displays two pictures or .swf's at a time.
Is there anyway to get the main movie to randomly load two pictures from a choice of hundreds and to make sure it dosen't load the same picture twice in the same session OR day.
eg.
gallery one: loads two random pictures from a picture folder.
gallery two: loads two random pictures from a picture folder but remembers not to load the two pictures it has already loaded in gallery one.
gallery three: loads two random pictures from a picture folder but
remembers not to load the four pictures it has already loaded in gallerys one and two
etc..
Thanks in advance for any help you can give me. regards.
Random Loading?
Hi there, I am currently making an interactive flash where one must complete a certain amount of scenes/frames to complete this interactive flash.
However, I stumbled to a point where my AS knowledge has hit its dead end.
I currently have 5 files of .swf that I want to randomly load. My basic goal is to randomly load one of the 20 files in the parent flash movie, and once that movie is finished another random file would be chosen instead of the current flash, and once the next flash has been accomplished the movie will end with a great job! (7th) .swf
My files begin
1. intro <-parent flash
2. a.swf
3. b.swf
4. c.swf
5. d.swf
6. e.swf
7. Final Good job.swf
Basically for my first task, I want the movie to begin with
intro, once the button is prssed to assign a random movie:
_root.loadMovie("a.swf, b.swf, c.swf, d.swf, e.swf");
How do I randomize this?
thanks~
Loading Random PNG Using XML ...but
I am trying to do a random load of a transparent PNG images into my current flash movie. I figured out how to do it but the image always loads at the very top of the movie. Is there a way to tell the exact location of where I want the image to load. The only thing I can figure out is by using a button but the image still loads on the top.
Also was wondering by using XML and axtion script if it is possible to do a fade in.
Currently this is the script that I have
Action Script is as follows
Code:
imgXML = new XML();
imgXML.ignoreWhite = true;
imgXML.onLoad = function(ok){
if (ok){
images = imgXML.childNodes[0];
random_img_num = Math.round(Math.random()*(images.childNodes.length-1));
curr_img = images.childNodes[random_img_num];
trace(curr_img);
loadMovieNum(curr_img.attributes.src, 1);
}
};
imgXML.load("images.xml");
Here is my XML code
Code:
<?xml version="1.0" ?>
<images>
<image src="img/01.jpg" />
<image src="img/02.jpg" />
<image src="img/03.jpg" />
<image src="img/04.jpg" />
<image src="img/05.jpg" />
</images>
Loading Random Mc's
I've run into a problem...
I have 10 empty mc's on the stage, and I want to load 10 images into them randomly each time the movie is run, so they are in a different order everytime. I've created my array, but am now stuck...
How would be the best way to have each mc load an image, but without duplicating either so all 10 are there?
Thanks
Loading Random Mc
I feel like I am missing something ridiculously stupid here. I have been tearing my hair out for hours trying to figure out how to do something as simple as load a random mc in AS3.
the linkage names are set as Pic1, Pic2, etc all with a base class of MovieClip.
Here is the code of my movie.
var _pic1:Pic1 = new Pic1();
var _pic2:Pic2 = new Pic2();
var _pic3:Pic3 = new Pic3();
var _pic4:Pic4 = new Pic4();
var _pic5:Pic5 = new Pic5();
var _pic6:Pic6 = new Pic6();
var _pic7:Pic7 = new Pic7();
var newImage:*;
var allImages:Array = new Array();
allImages = ["_pic1", "_pic2", "_pic3", "_pic4", "_pic5", "_pic6", "_pic7"];
function findRandomimage (event:MouseEvent):void
{
newImage = allImages[Math.floor(Math.random() * allImages.length)]
trace(newImage)
addChild(newImage)
}
button.addEventListener (MouseEvent.CLICK, findRandomimage)
And here is the error message I am getting.
TypeError: Error #1034: Type Coercion failed: cannot convert "_pic4" to flash.display.DisplayObject.
at test_fla::MainTimeline/findRandomimage()
I would really appreciate any help. I've been trying to figure out this as3 stuff and still feel like an idiot
Thank you thank you,
bagooshi
Random Loading Plz Help
hai to all
i did 5 swf's and one main movie. i had loaded the small swf's into main movie. everthing is right and loading.
what i want is -> assume no. 4th swf is loaded in main swf againthe same 4th is loading i want a random one should load which is the not previously loaded. it should again do random and load the corresponding swf
it should not load twice the same one after the other same swf.
here is the code which i did here it is again loading the previous one plz help
var x:Number = random(5);
swf = "swf/" add "main" add x add ".swf";
_roothold_mc.loadMovie(swf, 1);
var secs = 3;
var id = setInterval(function () {
clearInterval(id);
play();
}, secs*1000);
stop();
Random Loading Plz Help
hai to all
i did 5 swf's and one main movie. i had loaded the small swf's into main movie. everthing is right and loading.
what i want is -> assume no. 4th swf is loaded in main swf againthe same 4th is loading i want a random one should load which is the not previously loaded. it should again do random and load the corresponding swf
it should not load twice the same one after the other same swf.
here is the code which i did here it is again loading the previous one plz help
var x:Number = random(5);
swf = "swf/" add "main" add x add ".swf";
_roothold_mc.loadMovie(swf, 1);
var secs = 3;
var id = setInterval(function () {
clearInterval(id);
play();
}, secs*1000);
stop();
Help With Loading A Random Jpg
Like the actionscript tutorial Kirupa has for loading a random movie clip I need something similar that loads from a folder containing jpg images randomly when the page is loaded / refreshed. Help on this would be extremely appreciated. Nothing fancy like the masks he has on it, just something plain and simple.
Loading Random .swf's
So I followed the loading random movies tutorial which seems pretty straight forward and simple.
I also tweaked the create a photo gallery tutorial to my liking in order to produce a movie that does automatic fade-in/fade-out transitioning.
I then used the random loader to grab one of my five transitioning .swf's and spit them up on the screen.
So here's the problem...
My random loader loads one of the five .swf's but it only displays the first image of that movie and then just sits there. I can reload the page again and it will load a different .swf, but still it just sits there on the first image of the .swf that is loaded.
Any help or suggestions would be great...
thanks!!
Loading A Random Swf
I want to load a random swf from a group of 6. Basically from the intial page i want the user to press a button and this then displays one of the 6 swfs randomly.
I have saved my swf files as numbers 1-6.swf and saved them in a folder called movies. I need to firstly generate a random number between 1 and 6 and then load this corresponding swf file.
Can anyone help me please?
Random MC Loading
Hi All,
This is my first post here on Kirupa so forgive me for the n00b question!
I am working on a site for a friend of mind, and what he wants is that when the page loads it will load in say 25 random movie clips that I have created. These movie clips should be randomly spread out on the page. And then when you press F5 to reload the page then another say 25 random clips get loaded on to the stage???
I did see the Random movement tutorial on Kirupa but from what I gather it only loads in separate movie movies (.swf) files???
I hope this made sense, and I hope some one out there can help!
Thanks in advance people!
Rob
Help With Loading A Random Jpg
Like the actionscript tutorial Kirupa has for loading a random movie clip I need something similar that loads from a folder containing jpg images randomly when the page is loaded / refreshed. Help on this would be extremely appreciated. Nothing fancy like the masks he has on it, just something plain and simple.
Loading Random FLV
I am building a site where the client wants to have their video (converted to flv) to play as soon as the user loads the site. I have one swf that is the shell for all the other parts of the site, and another swf that contians the video call. How can I have flash pick an flv randomly (from 33 different streaming servers to balance the load) and still only have swf for the video?
I've seen examples of this using playlists where the AS picks a flv from the playlist and plays it as soon as the previous vid has ended, but we only want this video to play once and then fade out (with AS that is already written and working).
Thanks in advance!
Random Loading
Trying to create a quiz that loads questions from an external xml file. Would like to create X number of quizzes and have Flash load the quizzes at random.
Any help appreciated.
Richie
Loading Random Swf Help
I seem to be having problems with some of my random movies loading. I have a main movie and little spiders(external swf's) are loaded randomly. The first one loaded is set in the main movie and after it plays at the last keyframe it loads another random spider swf. At the end of each frame for each spider it loads another random spider swf. The problem I seem to be having is that sometimes (even after the 1st random choice is loaded) it doesn't want to load another choice and stops. I have tried to count them to see if there is any pattern and if the loading stops after a certain amount of them have been loaded but sometimes it will stop after the first and other times it will stop after about 20. Everything works as it should except for when it just fails to load a new swf into that level.
Here is the code that I am using at the end of each spider swf to load the next random:
choice = Math.round(Math.random()*5);
switch (choice) {
case 0 :
loadMovieNum("spider.swf",5);
break;
case 1 :
loadMovieNum("spider1.swf",5);
break;
case 2 :
loadMovieNum("spider2.swf",5);
break;
case 3 :
loadMovieNum("spider3.swf",5);
break;
case 4 :
loadMovieNum("spider4.swf",5);
break;
}
Any help will be greatly appreciated,
Unsung
Loading Random .SWF
How do you load a set of random .swf files dynamically into a targeted movie instance?
I have 5 .swf movies that have tweened animations all of which consist of 500-2,000 frames and I want each individual .swf to play all of its frames before loading the next .swf file into the same targeted movie instance and I want it to load randomly into a movie clip.
Any ideas on how it can be done?
Random Loading Movie
Hello,
I have I main Swf file which is the main site. However i have 2 animations i want them to play randomly. They are not movie clips they are scenes ( actually 3 different files) Is there a way that i can randomly load them at the begining of the main site?
Any help would be greatly appreciated.
Thanks Alot
Jeff
Loading Random Movies
I have a base movie, into which I'd like to load any one of five movies into a higher level randomly. Once the second movie is loaded onto the first, I'd like to unload it when the next replaces it.
Currently, I'm using the If frameisLoaded command to load the next movie. How can I have that call one of the next 5 .swf files randomly? And if I target the same level will it merely replace the current swf in that level, making it unnecessary to use an unloadMovie command?
Thanks much!
Rick
|