Random Behaviour Of Flash Movies
I developed a flash movie with all text, graphics and sounds in it. When I exported the movie and tried playing, the sound didn't play at all. But when I restarted the movie, I got the sounds but this time with faulty links. No buttons were pointing to their locations. The movie is playing fine sometimes and sometimes not. Does anyone have an idea this scenario? Thanks!
Adobe > Flash General Discussion
Posted on: 11/13/2007 06:41:34 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
HELP Random MovieClip Behaviour
One of the movieClips on my stage keeps dissapearing when i run the fla. Flash is still registering it (i can trace out its co-ordinates, alpha, visible, width, height etc.) but it's not visible on the screen and other movieClips wont interact with it. Iv'e checked its at top of visible area etc. and from all i can tell it should be visible but its not.
The movieClip is using a class file i wrote which was working before.
Basically what happened is it was all working, there was as on the first frame referring to the movieClip. I accidently added a keyframe to the wrong layer (the layer with the mc on, so the mc was no longer present in the first frame). I compiled and tested and i saw what i had done, i presumed it was just becaues the mc was no longer present on the first frame. I undid the changes and now it continues not to work. I've made no other changes and it's really weird. plz help!
EDIT: OK i did some more testing and its as if its no longer registering it's class file, when i try and trace out any of the class variables i just get returned undefined. I still can't figure out whats causing it.
Random Flash Movies On Load
HI,
I have 2 .swf files that need to play randomly when the homepage loads. I don't want them changing randomly once the first one has played.... only one must play continuously per time.
What's the easiest, fastet way to do this?
HELP Need To Load Random Flash Movies
Hey,
I am pretty new to Flash and need to load random flash movies (.swf files) in a sequence of fixed movies. For instance, lets say I have a repearting loop consisting of 5 movies (M1, M2, M3, M4, M5) each calling on one another. However, what I am looking to do is have M1, M3, and M5 in the loop constant and have M2 and M4 replaced with other random movies (located in another seperate folder) as the loop continues.
Please Help!!
HELP Need To Load Random Flash Movies
Hey,
I am pretty new to Flash and need to load random flash movies (.swf files) in a sequence of fixed movies. For instance, lets say I have a repearting loop consisting of 5 movies (M1, M2, M3, M4, M5) each calling on one another. However, what I am looking to do is have M1, M3, and M5 in the loop constant and have M2 and M4 replaced with other random movies (located in another seperate folder) as the loop continues.
Please Help!!
Random FLASH Movies On 1 HTML Page?
Is it possible to have random Flash Movies being loaded on a webpage?
You can already do it for graphics (gif banner) but I do not know how to do this with a flash movie.
Example:
My frontpage has a FLASH movie, each time when a visitor loads my page a different movie should appear.
Anybody got a clue?
Loading RANDOM Flash Movies INTO Movie?
Ok guys...here's one with a (hopefully) obvious solution. I have a flash movie that loads one of 27 flash movies randomly into it using this action script:
------------------------
i = random(27)+1;
loadMovie("nsbe"+i+".swf", "nsbe");
------------------------
Simple, right? Works like a breeze when i publish in flash 5 or 6...but I would like to go lower...to flash 4. And when I do, I get this error message
------------------------
Error opening URL "file:///D|/My%20Webs/NSBE%20Region%204/11"
------------------------
Essentially, Flash 4 seems to only recognize the randomly generated number, totally forgetting about the "nsbe__.swf" (in the above case, number "11")!
I tested just loading one specified movie and that worked in Flash 4...but the random thing just isn't cooperating, so i'm confident the cluprit is the "loadMovie" command. I've tried messing with the script more, but no good.
Is there a better code to use that will make this thing load my random movies in Flash 4? Is there something really basic i'm missing?
Thanks in advance, guys!
Adrian J.
Loading RANDOM Flash Movies IN A POP UP WINDOW
I have a movie that plays and when it ends a pop-up window automatically opens-my question is can anyone tell me how to make a different movie open randomly in the pop-up window each time it opens?
any help would be greatly appreciated. thanks
M
Random Question About Flash Movies And Sizes...
OK, say for example a forum has flash enabled for sigs, and someone decides to put a tiny little black dot and have the "stage" of the movie expand to the full screen....
how could this be prevented?
Call Random Flash Movies From HTML
When a user comes to my site I would like to show a different random movie each time. I have the code to do this in flash,
// create an array of the filenames that can be loaded (minus the .swf extension)
var movies = ["flash1", "flash2"];
var index = Math.floor(Math.random() * movies.length);
// load a random movie from the array
loadMovieNum(movies[index] + ".swf", 1);
but it doesn't work when it's implemented on-line. Therefore I would like to code the random retrieves of the flash movies from HTML. Does anyone know how to accomplish this? Thank you
This the link to my current page where I have tried to get the code to work within flash:
http://www.energykitchen.com/testmain3.php
Random Flash Movies Inside A Layer
here's the question, I've got 3 flashmovies that I want to be randomly loaded into a specific layer on my site everytime the page is loaded,
does anyone know how this is done..any help would be great
AAARGH Loading RANDOM Flash Movies INTO Movie?
Ok guys...here's one with a (hopefully) obvious solution. I have a flash movie that loads one of 27 flash movies randomly into the main movie via a container called "nsbe" using this action script:
------------------------
i = random(27)+1;
loadMovie("nsbe"+i+".swf", "nsbe");
------------------------
Simple, right? Works like a breeze when i publish in flash 5 or 6...but I would like to go lower...to flash 4. And when I do, I get this error message
------------------------
Error opening URL "file:///D|/My%20Webs/NSBE%20Region%204/11"
------------------------
Essentially, Flash 4 seems to only recognize the randomly generated number, totally forgetting about the "nsbe__.swf" (in the above case, number "11")!
I tested just loading one specified movie and that worked in Flash 4...but the random thing just isn't cooperating, so i'm confident the cluprit is the "loadMovie" command. I've tried messing with the script more, but no good.
Is there a better code to use that will make this thing load my random movies in Flash 4? Is there something really basic i'm missing?
Thanks in advance, guys!
Adrian J.
Synchronizing Class Behaviour With Timeline Behaviour
I have been asking a lot of questions that tie into a jigsaw puzzle project I am working on. Here's another
The user places the jigsaw puzzle pieces in their correct places. This is all done in frame 1 using Actionscript in the document class and the puzzle piece classes.
After successful completion of the puzzle I issue the command this.gotoAndPlay(2) from the document class, and this starts in frame 2 a "congratulations" animation. This animation is created by animators, and I don't know how many frames long it will finally be.
So in a way, you can think of it as two seperate worlds between frame 1 (which is my "programmer space", using the document class and piece classes) and frame 2 onwards (which is the "animator space", using the timeline).
There will be various unused puzzle pieces strewn around the board when the user completes the puzzle. The requirement is that starting in frame 2 they fade out while the "congratulations" animation is playing, for the duration of the animation.
Since this is to happen from frame 2 and beyond I wanted to leave it to the animators, but the problem is that they don't know where the pieces are going to be lying starting in frame 2. During the actual game (in frame 1) they may have moved the pieces anywhere.
So I have two questions:
1) (a non-Actionscript question) Is there a way to start fading out objects on the stage from a particular frame without knowing their positions on the stage, and without using Actionscript?
and
2) (an Actionscript + timeline question) If I do have to fade out the pieces using Actionscript, well, that in itself is easy enough by progressively changing the alpha value, but is there a way to sync it with the animation? Maybe if I just know how many frames long the "congratulations" animation is I should be able to space it out correctly.
However I am not very knowledgeable about integration between what's happening in the timeline and what's happening in the document class. I do realize that the document class IS the timeline. So perhaps what I need is to be notified each time the playhead moves a frame using the ENTER_FRAME event? I suppose this would be a solution but as a newbie I'm wondering if there is a better way. I don't like the fact that I'd have to know in advance how long the "congratulations" animation is going to be.
Need Code For Random Scenes Not Random Movies
Hi
I need a code for loading random scenes for a flash intro. I have only found a code for loading random movies but I don't want to have to do the preloader for every movies because it would destroy the whole thing on how it loads.
Any help is appreciated.
Thanks!!
Help With Random Frames And Random Movies...
Hi all,
Great site!!!!
Anyway, I have an idea that i am working on and need some help....
I have 5 different movieclips that are about 300 frames long each (30 fr/sec). When Scene1 is played, I want to have 10 movie clips running, each beginning at a random frame, and each being one of the 5 movieclips chosen at random.....
Right now all I have is one of the clips running at a time, and the clip randomly changes every time Scene1 is reloaded.
I want multiple (10) random clips (chosen from the 5 clips) to be introduced at random frames throughout the movie to create a continuous random effect....
Any help would be appreciated....
Thanks,
Asheesh
Random Movies
Help!!!!
Could someone tell me how could I make a flash movie that could call a random movie from a server?
Thanks
Random Movies
Hello to you all out there - this is Denmark calling for a bit of advice. I think we are going towards a java script BUT here's what I want to do and maybe some of you know the ultimate solution.
I am displaying a 500x200 movie on our intro page (example http://www.nykobingsj.dk where we are user testing at the moment) - at the final site I want to make let's say 10 different movies from our area so that the user will experience "a new" site every (or almost every) time he/she enters the site.
Found a random array thing in java script - but is there another solution (all of this without asp and database)?
Thanks in advance
Anita C.
Random Movies
Look I'm sorry if people keep posting this over and over but I for sure have a actionscript for you to look at. Maybe you people might know what they mean
ran = random(3)+3;
if (ran == 1) {
loadMovieNum ("http://www.geocities.com/mseerob/SPACEDEMO.swf", 0);
} else if (ran == 2) {
loadMovieNum ("http://www.geocities.com/mseerob/TURNABLEENDING.swf", 0);
} else if (ran == 3) {
loadMovieNum ("http://www.geocities.com/mseerob/movie.swf", 0);
}
Ok I inserted this actionscript code but it only plays movie and TURNABLEEDNING. It doesn't play SPACEDEMO at all and I don't know why.
If anybody knows then please give me a shout.
thanks
Rob
Random Movies
Not sure the title makes any sense, but what I'm wanting to do is have multiple movies (all the same physical dimensions) randomly load each time the page is reloaded. Anyone know if this is possible? Apologies if this is the wrong forum.
TIA
Random Movies
I have 3 mc's id like to call up at random times while a site is running, I have no idea how to go about this
thanks
Random Movies
Hi everyone,
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.
Help - Random Movies
does anyone knows how to load and play random flash movies from a flash movie?
the objective is to have different messages (in flash) load and play.
I read a lot of tutorials and no clues yet.
Random Movies?
Ok, what is the code to random movies in loadMovie command?
Strange Behaviour In Flash
Hi
I have come accross something strange in Flash.
I have to different movie clips on their seperate layers on my stage, one is my logo and the other one is an animated text. now when I test my movie my logo disappeares for some reason, but if delete the animated text, logo become visible!! so I think for some reason flash put the text on the same level as my logo therefore logo gets deleted! that's my guess anyway but I might be wrong so please let me know if you know how to fix this.
Thanks
Strange Flash Behaviour
I'll explain the system first then the behaviour.
Intel 2.4Ghz running Mandrake Linux 9.1, using Mozilla 1.3 and latest Macromedia flash player v6 for Linux.
All the flash I have tested on this system works well, nice and fast.
However we have put together two simple Flash animations ( using MX ) that run really slow on these system configurations ( tested on 2 other similar setup machines ) The same flash works fine under IE and Mozilla using Windows. So basically these particular flash files ( and only these files ) are running slow.
Oh, BTW when I open just the swf into the browser it does the same thing, so I don't think its something in the object / embed tag.
I guess what I am asking is;
Has anyone seen this before?
What settings should I check for when I export the flash files?
What speed ( framerate ) is best for the average machine out there?
Thanks for any help..
Annoying Flash 'odd' Behaviour
Evening Guys,
I am having a very fustrating time with doing the simplest of tasks with flash. I am using flash 5 and I am trying to simply fade in an object. simple.
I create a blank key frame on my time line and then paste into place my graphic. (I have tried this everyway almost possible). I then alter the alpha setting to 0%. 15 frames later I insert another blank key frame and paste into place the same graphic. if I then twen this shouldnt flash just fade in the graphic?
When I click on create motion tween, it is replacing my last frame (which is the full and exposed graphic) with the same as in the first key frame. Or if I do it tye other way and create the motion tween before setting the alpha value, flash moves my graphics, without me (knowingly) telling it to.
I have done this numerous times before, a while ago, and am getting really annoyed that I cant get it to work properly again.
Can flash be unpradictable in the way it works? Or is it user error?
Please can someone tell me how they would do it so I can copy it.
Cheers
Wazz
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
Random Movies Displayed
Does anyone know how to make random movies display within a movie when a user refreshes a page or goes to a different page with the movie in it? Sort of like ad rotation with flash movies?
Random Frames/movies
i am trying to create a screensaver that will randomly select a different frame in a movie file once it launches -
any ideas how to do this?
Where should the random script reside?
and how would you randomise for a different movie to be shown each time the flash file starts?
anyone got any fla examples of this?
Re: Random Display Of Movies
i've been thinking, is there any way to randomly display a movie to the end user each time they visit your site?
similiar in effect to the following script for images:
img = new Array
("images/00.gif","images/01.gif","images/02.gif","images/03.gif","images/04.gif","images/05.gif","images/06.gif");
var info="";
howmany = img.length - 1;
which = Math.floor(Math.random(howmany) * 10);
if (which <= howmany){
window.document.weather.src = img[which];
} else {
window.document.weather.src = img[howmany];
}
}
anybody got any ideas on this... does the script have to be in the movie, or could you control the randomness externally like the above example?
spankedmonkey
Playing Random Movies.
I have created a banner and there is an intro movie.
now after this intro movie, I have created 5 different movie clips that are placed on there individual frames (frame# 71-75)
Now I was wondering if it were possible to play the intro movie then have it randomly play one of the frames 71-75, after each movie clip has been completed , it can either go back to playing the intro movie, or just play a different movie clip on the the other frames.
This is the code I have been trying to work with but everytime it just plays frame 75 and after that movie clip is copleted it just stops and doenst go play the other movie clips.
at the end of each movie clip I have this
gtoAndPlay(_root);
.. so they return to the beginning of the main timeline.
The code to jump to a random frame between 71 and 75 is :
randomFrame = Math.floor(Math.random() * 75 + 71);
gotoAndStop(randomFrame);
can someone help me and tell me what I am doing wrong, that would be greatly appreciated.
Importing Random Movies
I'm trying to call up random movie clips into my movie, each movie is named 12.swf, 13.swf, 14.swf and so on. I need to randomly call up any swf between the numbers 10 to 20, for example...
Can anyone help?
Playing Random Movies?
I tried to search the above, but the search function seems to be dead. Otherwise I am sure this has been asked and answered many time before!
Can anyone help me with having a button that onclick loads a random swf? I used to be able to do it in Flash 5, but that was years ago and I can't remember for the life of me.
Much thanks in advance!
Loading Random Movies.
I want to load random movies from a parent SWF.
Can someone tell me how I can guarantee that the same movie is not cached?
For example, I will have a parent movie that will randomly load into it a.swf, b.swf, or c.swf.
OK... if I can achieve the above, I now want the OPPOSITE!
If one of the random movies chosen has already been loaded previously, i want to have the cached version loaded.
Is the abov asking for too much?
Any help would be appreciated.
Thanks.
OM
Please Help With Loading Random Movies
Hey,
I am pretty new to Flash and need to load random flash movies (.swf files) in a sequence of fixed movies. For instance, lets say I have a repearting loop consisting of 5 movies (M1, M2, M3, M4, M5) each calling on one another. However, what I am looking to do is have M1, M3, and M5 in the loop constant and have M2 and M4 replaced with other random movies (located in another seperate folder) as the loop continues.
Please Help!!
Multiple Movies At Random
i have right now two flash headers for my site Cheat MD. Well how do you have them display randomly every time you refresh?
Load Random Movies But Keep Old One's
Hi, i have a selection of movie clips which i want to load randomly.
what i have is a scene of some sky. i have a bee animation, a butterfly animation, a balloon animation and some other animations too. i want these clips to load randomly, at random intervals, and also appear together sometimes. so the bee and the butterfly could be on the screen at the same time.
at the moment i am using this script
Code:
// array with the movies to play, the movies in the library
var my_array = new Array("circle", "square", "pentagon");
var numberOfMovies = my_array.length;
// create the shared object
var my_so = SharedObject.getLocal("LastPlayedSO");
// see if the shared object already exists
if (my_so.data.lastPlayed == undefined)
{
// doesn't exist
my_so.data.lastPlayed = 1;
// initialize
trace("doesn't exist");
}
else if (my_so.data.lastPlayed == numberOfMovies)
{
trace("reset");
// the last played was the last, reset
my_so.data.lastPlayed = 1;
}
else
{
my_so.data.lastPlayed++;
// exists
// if you test the movie again, this will be triggeres
}
trace('lastPlayed -> ' + my_so.data.lastPlayed);
// play the clip: my_array[my_so.data.lastPlayed-1]
// which may correspond to loading the specific movie
this.attachMovie(my_array[my_so.data.lastPlayed - 1], "new_me", 1);
this loads a new movie everytime which replaces the old movie. i want to keep the old movie. so the 'bee_MC' and 'butterfly_MC' play at the same time, sometimes.
I would also like to add a timer to it, so that the movies load at random intervals. say intervals of between 30 and 60 seconds.
cheers
[mx04] Random Movies
Okay, sorry for my bad English... This is what I have to produce:
- 15 or so SWF, with a pictures that fades in and stays for 50 seconds/1 minute in each
- the main movie with a code that loads all the 15 SWF once after the other, but randomly (with a different sequence each time)
...Is that possible and, if so, can someone help me with the aforementioned code? Thanks so much.
[F8] Loading Random Movies
Hello! I am an actionscript cretin! Please help! I have a movie with 6 movieclips in it. I need to make the clips from the library play randomly so that each time the swf file is viewed (will be converted into a screensaver) the clips will play one after the other in a different order.
As I said I am challenged at Actionscript - I have ordered some self-help books but in the interim can anybody help me please?
Thank you!!
[F8] Random Movies Communicating Together?
Hello all,
Is it possible to achieve this:
Have 2 separate .swf embedded in an HTML file, which will be loading the same random image?
Or else, is there a way to go around this and have the images load in a determinate order?
Any tips would really help...
Thanks!!
Help With Loading Random Swf (movies)
Hi,
I'm having trouble trying to figure this out. I'm trying to have a random movie (swf) load into the stage (in the instance I named "zone") and have it change randomly every 10 seconds.
In addition, I have a 10 buttons that I want to go to a specific movie in case the user wants to view a specific one again. But at the same time, I still want the movie to change after 10 seconds even after the user clicks for a specific movie.
I've done a search and I've seen how to load a random movie. But I can't figure out how to incorporate the other things that I need. Any help is much appreciated. Thanks!
Loading Random Movies
Hello there.
I have a swf and I want to randomly load an external swf into it.
The cod I have loads a random swf, but instead of loading it into the “shell” swf, it completely replaces it.
How can I achieve this? The code I have is:
filename = ["pvd1.swf", "pvd2.swf", "pvd3.swf", "pvd4.swf"];
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], tmovie);
How To Load Random Movies
I'm trying to load swf's randomly into an mc for background effects.
So I think loadMovie("movie_" +(rand(1,12), "_root.movieclip")
but I think my syntax is wrong.
can anyone help?
Sean Paul
Random Load Movies
there is a Javascript function which randomly loads images each time you refresh the browser, i need to be able to do that with the load movie function in actionscript to have a different movie randomly load each time you refresh the browser. being a novice when it comes to that stuff any help is appreciated! by the way i am using MX not MX2004.
Playing Random Movies
Hi,
I was looking for tutorials on this but each script, and tutorial didnt work for me. I've got three movieClips on my main stage, movie1, movie2, and movie3 (its the instance too). Very predictable.
Not on load but rather I'd like each one to play in a random sequence. Maybe movie1 plays first, followed by movie3, not 1, 2, 3.
I tired this:
num = random(3)+1;
movie = "movie" + num;
movie.gotoAndPlay(2);
I've got a stop(); on the first frame inside each movie clip.
Thanks
Edited: 11/19/2008 at 05:26:52 AM by graham howe
Loading 2 Random Movies At Once
Is there a way to load 2 or more random movie clips? I can get one random movie to load but am having trouble getting the 2nd movieclip to load. The code Im using is below.
Code:
filename = ["1.swf", "2.swf", "3.swf", "4.swf", "5.swf", "6.swf", "7.swf", "8.swf", "9.swf", "10.swf", "11.swf"];
path = "buttons/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);
filename = ["1.swf", "2.swf", "3.swf", "4.swf", "5.swf", "6.swf", "7.swf", "8.swf", "9.swf", "10.swf", "11.swf"];
path = "buttons/";
h = filename.length;
j = Math.floor(Math.random()*h);
loadMovie(path+filename[j], movieTarget2);
Loading Random Movies
i have a small problem with loading a random swf into a html page. i have a script that works in that it will load one of 4 different swf files into a html page the only drawback is that the hittests within that movie then dont work. anyone have any suggestions, any help would be apreciated.
thanks a lot
the script that im using at the moment is
filename = [".......swf", ".........swf", ".........swf", "........swf"];
//the files that i want to randomly load
path = "http://www.smoking-monkey.net";
//where the files are
i = filename.length;
k = Math.floor(Math.random()*i);
getURL(path+filename[k], movieTarget);
//all that is on a frame with a movieclip named movieTarget on the stage
|