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




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.



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 04-26-2003, 08:12 PM


View Complete Forum Thread with Replies

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

Loading Movies Aaargh
I can quite easily now create a SWF called "Main.swf" with an empty MC in it called "loader"

on top of "main.swf" there are buttons which load or unload other movies into "loader"

What I want to do is, just have 1 .swf file that unloads itself and loads a new swf once an object has been clicked??
(a bit like clicking a door in the movie, and the next room loads)

I cant seem to get it right, when I click on my object it unloads the SWF (I think) and then loads the one 1 want over the other side of the screen!!or to the bottom of it

I cant seem to work out how to do it?

Thanks all

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 Movie And Load New Movies At Timed Intervals
Hello,

Does anyone know how I can load a random movie then have it refresh with a new random movie say every 30 seconds or so?

Thanks

Several Movies PreLoading On One Page - AAARGH
Ok, so forgive me if I have missed something obvious... I have been out of touch with all things Flash for a good part of 9 months or so

Anyways, my main home page (100% flash) is getting larger and larger as I update and grow the site, and I recently decided to test breaking it up into several smaller movies, assembling them together in a table through dreamweaver, for ease and so I can perhaps rearrange the layout later down the line too.

Each little movie is loaded into the page by its own preloader movie, a script i sourced ages ago from this site... Here is the scripting:

code: // First thing to do is set the stage size of
// this movie at the same size as your
// "to be loaded" movie, and re-position the display
// elements to your liking.
// Also set the same framerate as your movie.
// Then replace "sound.swf" in 2 of the lines below,
// with the name of your movie.
// Last, make sure your present movie is cleared
// of any preloader, and most importantly, that it
// starts off with a first blank keyframe.
//
// Hides displayed elements
this.reelmc._visible = false;
this.loadbar._visible = false;
percent_display = "";
// create a new movieclip to load
// the external movie into
this.createEmptyMovieClip("container", 10);
// load the external movie into the new movieclip
container.loadMovie("gigs_media.swf");
// check the download status of the external
// movie once every frame
this.onEnterFrame = function() {
// trace the percentage of the movie that has loaded
percent = (this.container.getBytesLoaded()/this.container.getBytesTotal())*100;
if (!isNan(percent)) {
// trace(percent+"% loaded");
if (percent == 0) {
percent_display = "";
} else {
percent_display = Math.ceil(percent)+"% LOADED.";
}
this.loadbar._visible = true;
this.loadbar._xscale = percent;
if (percent>1) {
this.reelmc._visible = true;
}
container.stop();
} else {
// trace("0% loaded");
}
if (percent == 100) {
delete this.onEnterFrame;
this.reelmc._visible = false;
percent_display = "";
this.loadbar._visible = false;
loadMovieNum("gigs_media.swf", 0);
}
};
stop();


However, the movies don't load and start up independantly of each other which is really frustrating. They all go through their own loading procedure, but stop and only start when all the other movies have loaded themselves fully. And in the end, the user ends up waiting even longer for the page to load than my original setup - plus it looks totally unprofessional, and the user probably thinks to themselves - what the heck's goin on here?

I am assuming this is something to do with the 'level' that the movies are loading into?? Hmmm.

This is my original page (one big movie):

Original Page

This is the page I am very slowly trying to create with the original movie, but this time broken up into smaller movies:

What I am Trying To Do

Any help / advice - someone please! Before I pull my hair out... Aargh.


Cheers

Donna
ps. I hope I make sense...

*edit: added AS tags for clarity
gparis

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

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

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!!

[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!!

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);

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

Loading Random Movies
After looking at the Loading Random Movies tutorial (http://www.kirupa.com/developer/acti...dom_movie2.htm) I decided to try it out for myself. The movies ('random1.swf', 'random2.swf', 'random3.swf' and last but not least 'random4.swf') are loaded into the 'main.swf' movie as they should be. The only problem is that the random movies involve duplicating movie clips and when the random movie is loaded into the main movie, it no longer duplicates the movie clips. Any help with this would be appreciated.

Loading Random Movies
I am using this code from Kirupa. Is there a way to keep playing the different movies at random without forcing users to reload the page?


Code:
filename = ["movie1.swf", "movie2.swf", "movie3.swf"];
path = "/flash/";
i = filename.length; k = Math.floor(Math.random()*i);
loadMovieNum(path+filename[k], 2);

Loading Random Movies Help
Hello, I just completed the tutorial here:

http://www.kirupa.com/developer/acti...ndom_movie.htm

which worked great--except for one thing: The movies I have all have buttons, which link to different web pages on them. When the random load works, the buttons do not. When I use each movie separately, the buttons work as they should.

Any ideas what's going on... or better yet, how I can make both the random load and the buttons work? Many thanks!

-Tracie

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

Loading Movies Into Flash Movie
Hello and apologies if this question seems very simple compared to the collective actionscript genius of these forums but I'm hitting a brick wall.

I am doing a flash websites that has a fair few sections and if i do it all in one movie the swf file is getting to be far too large for comfort. SO i decided to break it down into individual movies that I will load in when the appropriate button etc is clicked on....

Basically what code do I need to use? I presume LoadMovie is along the right lines... but I also need to know how to position the movie in a precise location on the stage?

I heard mention of a 'container' by a friend but it is all a bit over my head. Thanks for any help!

Trouble Loading 3 Random Movies
I have nine JPGs and three MCs that will load the JPGs.

picLoader1 - randomly loads pic 1, 2, or 3
picLoader2 - randomly loads pic 4, 5, or 6
picLoader3 - randomly loads pic 7, 8, or 9

Using this code (inside _root.mc_preloader), I can only get photos 1, 2, and 3 to load.

Frame1:
Code:
for ( i = 1; i < 4; i++ ) {
this["num"+i] = Math.abs( int(Math.random() * 3 ) - (i * 3) );
_root["picLoader"+i].loadMovie("kid_pic_" + num + i + ".jpg");
}

// preload images
gotoAndPlay(nextFrame);

Frame2:
Code:
for ( f = 1; f < 4; f++ ) {
_root["picLoader" + f]._alpha = 0;
this["test" + f] = int( _root["picLoader" + f].getBytesLoaded() / _root["picLoader" + f].getBytesTotal() );
trace( this["num" + f] );
}
gotoAndPlay(nextFrame);

Frame3:
Code:
if ( test1 == test2 == test3 ) {
_root.play();
stop();
} else {
this.gotoAndPlay(2);
}

Preloader Loading Random Movies
http://universalurban.com/

you know how the movie is promoting the artist right? On that movie it's loading the artist's little movie randomly. How do you that? Because I made like three little movies but I want the preloader to load any movie randomly then after the movie is finish it goes back to the preloader scene and randomly choses another an movie or plays the same one again.

Please reply back I gotta know that one.

HELP: Loading Movies At Random Script
Hi,

I am terrible with code... I am buidling a Flash site that has a small section that opens little swf files after a load movie command is given... however, I would love it if these little movies could be loaded randomly. I remember doing this in html years back for banners...

I have about a dozen of these small swfs... is there a script i can add to the 'loadmovie' command that allows for a random selection of the 12, so that each experience is different for the user?

much appreciation!

jason

Loading Random Movies In Next Level
Hi,

I am trying to get random movies to load automatically into the next level above the current level.

It is for an intro but I have used a mask so I want the new movie to wipe in over the existing movie.

Have used the existing actionscript for the random function:

code: filename = ["intro1.swf", "intro2.swf", "intro3.swf", "intro4.swf", "intro5.swf"];
path = "flash/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovieNum(path+filename[k], 0);

But rather than load into level 0, I want to load into current level +1, so each movie will overlay the existing one.

Any suggestions, or is there a better way of achieving the same result?

CHEERS

About Loading Random Movies Tutorial
In the Loading random movies tutorial we make an array specifying each movie that can be randomly picked and loaded. Works well if there are only three movies to choose from.

But what if there are for example hundreds of images or movies you want them to be randomly loaded? Is there a way to not specify each element in the array but to tell the array to find the elements in a specified folder containing all the images and movies?

I would like to make an interface where on the button release 3 random images would get displayed. The library will get increased in size over time so it would be nice that the code could include all the files in the image folder, no matter what and when i add something.


Thank you for your help,
Petra

Continuously Loading Random Movies
I recently completed the kirupa tutorial on the loading of a random movie, but after the loaded movie has finished playing I would like it to load another random movie and continue to do so. Being a newbie to flash 8 I was wondering if I could get some help with the actionscript. Thanks for the help!

'Loading Random Movies' Question
First off thank you so much for doing such a great job of explaining this process and the ActionScript that makes it work. I just had one question and pardon me if I missed something obvious. My movies are loading much smaller than they should. I created my source movie and made it 750px/350px which is the size of the movies I'm randomly loading. The circle symbol I made 16px/16px per the instructions. I did notice that if I adjusted the size of this symbol I could adjust the display of the random loaded movie files. I had to adjust a few times to 37px/35px before it looked about right. What's the correlation between the size of the oval symbol and the size of the movie files? Thanks.

Loading Random Extrenal Movies
Hi there,

Can someone please help me. This is really urgent.
I need to randomly load an external swf into the main movie each time the browser is refreshed. I have three external swfs so far.

when loading individual external swfs, I normally create an empty movie clip on the main movie and call the external swf by using the _root.emptymovieclip command

Is the same principal used for calling external swfs randomly?

Thanks heaps,

About Loading Random Movies Tutorial
In the Loading random movies tutorial we make an array specifying each movie that can be randomly picked and loaded. Works well if there are only three movies to choose from.

But what if there are for example hundreds of images or movies you want them to be randomly loaded? Is there a way to not specify each element in the array but to tell the array to find the elements in a specified folder containing all the images and movies?

I would like to make an interface where on the button release 3 random images would get displayed. The library will get increased in size over time so it would be nice that the code could include all the files in the image folder, no matter what and when i add something.


Thank you for your help,
Petra

Help Loading Movie Clips Into Flash Movies
Can anyone help me with loading movie clips from an external source and placing them into a swf to save loading time as not to load all movie clips withing site.
example of this at www.domanistudios.com

Loading Random Movies In Netscape - No Workie
I have a loadMovieNum function set to load a variable into level 3 of my main movie timeline in Frame 1. It loads just fine in IE, but it seems that NS 4.7 can't handle this script:

ranNum = Math.Round(Math.random()*4)+1;
loadMovieNum ("bar_quote"+ranNum+".swf", 3);

If a static string is substituted for "bar_quote"+ranNum+".swf" (i.e. "barquote1.swf") it works fine in Netscape. Has anyone else run into this problem? I got the code from Flash 5 Bible and there was no mention of a Netscape issue. I don't want to be one of those snobby programmers that tells the user which browser to view this in, but I just can't get it to work and it sucks and I'm upset and I want my mommy.

Please help! Thanks!

Anette

A Trick Question With Random Loading Movies...
Ok, this is kind of a tricky one...

I have a Main movie that I am importing a video swf into. when that video swf is complete, I'm loading random instrumental clips into that second swf. After those instrumental swfs are done, how do I point to a labeled frame within the second swf?

Help With Tutorial On Loading Random Movies Into Animation--
I got stumped right at the first step - I didn't know how to create a movie and set it's width and height! - How silly is that - how do i create a movie? Do I create a new Flash Document? Here is the first step of your tutorial that I was about to follow - thanks!

Here's How
The following steps for Flash MX/2004 will help you to create your own animation and load random movies into it:First, create a new movie, and set its width and height to be 300 by 200 pixels. Also, set your frame rate to 25.

Random Loading MCs In The Same Flash Movie
I want to be able to load in a random flash file into my main scene.


Code:
//this gets the random number between 1 and 20
upperLimit = 1;
lowerLimit = 20;
randomNum = Math.round(Math.random() * (upperLimit - lowerLimit)) + lowerLimit;

//this will load the movie based on the number generated
if (randomNum = "1"){
loadMovie("bkgrd1.swf",_root.bkgrd);
}else if(randomNum = "2"){
loadMovie("bkgrd2.swf",_root.bkgrd);
}


I want to be able to load another random MC into the same flash movie without refreshing the browser. I was wondering if I could have a MC that was basically a timer that would randomly generate another number, unload the MC that was previously loaded and then load the new MC based on the new number that was generated????

this is driving me nuts...



thanks.

Loading Random Flash Movie
You'll have to excuse the novice issue I'm trying to get answered. I'm not very advanced in actionscript.....yet. :-)

I have 3 Flash movies that I want to play randomly every time that my web page is reloaded. I'm under the impression that I need to create a blank movie and create actionscript that will load the movies randomly.

But that's as far as I can get. Any help I can get will be much appreciated. Oh, by the way, I'm using Flash 8 if that matters.

Thanks in advance.

Loading Flash Movie, But Not Random?
I built a flash movie to randomly rotate between flash movies using the kirupa tutorial:
http://www.kirupa.com/developer/acti...dom_movie2.htm

But now the client is telling me he would like the movie to change in a certain order when you refresh the browser, and not randomly.

is there a simple action script fix for this?

Thanks!

[F8] Avoiding Repeating Swfs When Loading Random Movies
Hello,

I've got a flash movie in which random movies are loaded one after another, using this code;


Code:
var mc = this.createEmptyMovieClip("mc", 1);
function nextRandom() {
var swf = this._url.substr(0, this._url.lastIndexOf("/")+1)+"../images/swf/image"+Math.floor(Math.random()*10)+".swf";
mc.loadMovie(swf);
}
nextRandom();
this.onEnterFrame = function() {
if (mc._currentframe>=mc._totalframes) {
nextRandom();
}
};

which works fine. However, with this, there's nothing that says that one swf can't be loaded again and again. Not good. Can someone help me by suggesting some lines of code that will prevent the same swf from repeating? It would be much appreciated!

Cheers
Jakob

Loading Movies Inside Other Movies In An Ext Movie Holder?
Here's one for you:

I've got my main movie that has a movie holder on it (entitled movieholder.) The buttons on the left control what goes in the movie holder. In one of the movies there is a list of songs that are actually buttons. These buttons call up another movie(with MP3s). How do I get the MP3 movies to go into "movieholder" when they are being called by a button inside 'movieholder'

I'm using MX

Hope that made a slight bit of sense!

Thanks for any help,

Graeme

Need Assistance In Loading External Movies Into Main Flash Movie
Hello people,

What I really need is a terrific "tech note" or wonderfully concepted tutorial that explains 'how to' load external flash clips into the main flash movie, that is, I want keep the first "main movie" KB low and then just call in the other external .SWFs into this "main movie".

Thanks for any assistance into this matter,
Zanjan

Aaargh....backup GIF For Flash?
Hi,
i've a website that has few swf files playing simple animation. Lately someone emailed me saying that he doesn't have Flash installed so he can't see any of the animation. He also *doesn't want* to install Flash (what is his problem???). Is there way to detect if a user has Flash installed, and if he doesn't, a backup GIF will automatically replace the swf file (i've already put in the Flash detection script - the kind you publish with the HTML file - within the homepage)?

i would've totally IGNORED this whacko if it's my own website but cos it's a corporate website for my uncle's business (n cos i get paid for it :P) i have to find a solution for it.

Thought i heard from someone that it's possible.

Can anyone help??

arya

Load External Random Movies Into A Movie Clip?HELP
Alright i have done this tutorial on this site http://www.kirupa.com/developer/acti...ndom_movie.htm.
But I need help with the Action Script?? Could any one help me modifie the AS to allow this movie clips to be loaded in to another container movie clip...
My Current AS is;

filename = ["Banner1.swf", "Banner2.swf", "Banner3.swf"];
path = "http://www.buildersmart.com.au/flash/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);

Load External Random Movies Into A Movie Clip?HELP
Load External Random Movies Into a Movie Clip??HELP!
Alright i have done this tutorial on this site http://www.kirupa.com/developer/acti...ndom_movie.htm.
But I need help with the Action Script?? Could any one help me modifie the AS to allow this movie clips to be loaded in to another container movie clip...
My Current AS is;

filename = ["Banner1.swf", "Banner2.swf", "Banner3.swf"];
path = "http://www.buildersmart.com.au/flash/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], movieTarget);

Loading Two Movies & Loading Entire Current Movie
well, having a bit of problems with figuring out my preloader :/. Iv been able to figure out how to load a single external movie with a dynamic preloader graphic that tracks percent and stuff, but i have not been able to figure out how to load multiple external files but useing the same graphic to track the percentage of the loading for the two as if they where 1. Also have not been able to figure out how to make a preloader for the current movie. LIke have the preloader at the beginning of the movie and have it stop, and run the preloader for the load of the rest of the movie file, then continues to play the intro of the same file after loading has been compleated. my code for what i'm able to do is below, any help woudl be helpfull :). Thank you guys and girls^^









Attach Code

var requestObj:URLRequest = new URLRequest ("waterIntroAnimation.swf");
var loaderObj:Loader = new Loader();
loaderObj.load(requestObj);

b1.visible=false;

loaderObj.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,preloadProgress);
loaderObj.contentLoaderInfo.addEventListener(Event.COMPLETE,preloadComplete);

function preloadProgress(event:ProgressEvent):void{
var loadedPercent:int = event.bytesLoaded/event.bytesTotal *100;
preloader_mc.loadingBar_mc.loaderText_txt.text=loadedPercent+"%";
preloader_mc.loadingBar_mc.loaderMask_mc.scaleY=loadedPercent/100;
}

function preloadComplete(event:Event):void{
preloader_mc.visible = false;
b1.visible=true;
}

Aaargh Problems Opening New Window Using Flash MX/Javascript
Please can somebody help me?! I am usually pretty competant at these things but am having real difficulty with this one and I can't work out why!
I have designed a website in Flash MX, I want some of the buttons on this site to open new specifically sized windows, with no toolbar. I have looked at several tutorials and messed around with flash/javascript getURL"javascript..........." stuff, but when I click on the button no window opens.
Any ideas as to what the problem might be?

Loading One Movie Vs. Loading Multiple Movies?
Greetings All,

I'm looking for some advice on the approach to loading multiple content "panels" on a website -- let's say we have a mini-intro panel (logo, tagline, etc.) and a news panel (rotating blurbs you can click on).

From a performance and optimization stance, is it better to:

1) create each panel as its own .SWF and load each one separately on a web page;

2) create each panel separately, and then use loadMovie(); to insert one into a layout space within the other;

3) just build all the functionality into one big honkin' .SWF.

I'm leaning away from Option 3, just for "simplicity of development" reasons.

My concerns are performance quality (will one approach run slower than another?) and bandwidth issues (how will dial-up users experience different approaches?).

I'm sure some of you have run into this before. I'm interested in your opinions.

Thanks.

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 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!

Loading A Movie (within A Movie) & Assigning A Random Start Frame
Flash 5

Hello everyone.

After taking almost a year off from web programming Im relearning flash :0

I haven't gone past the basics with Flash 5 and have a couple projects coming up.

The routine I wish Flash 5 to do should be something simple to explain I hope for a vetrin user.

1) Flash Movie A (180 x 60) loads Flash Movie B (60x60) into left most space (say slot 1) and then randomly tells Flash Movie B to start at a particual frame (random(8). Each frame is a simple image with an actionscript Stop; command).

2) Flash Movie A fades in 1st Flash Movie B at slot 1.

3) Flash Movie A loads another Flash Movie B in the middle space (slot 2) and once again randomly tells Flash Movie B to starts at a particual frame (random(8) (just a static picture like in 1).

3) Flash Movie A fades in 2nd Flash Movie B at slot 2.

4) Flash Movie A loads another Flash Movie B into the far right space (slot 3) like the others (tells Movie B which random frame to start at).

5) Flash Movie A fades in 3rd Flash Movie B at slot 3.

My feeble mind is having a problem telling:

1) Where to tell Flash Movie A to position each load of Flash Movie B.

2) How to tell Flash Movie B I wan't it to start at a random frame.

I have the fade in and fade out set

also.... slightly more complex.. Does anyone have experience in doing somethnig similar to this and setting a variable to define which random numbers were selected for each slide so they will not repeat. (i.e. after loading slot 1 it will also define 'slot1' at the same time it creates that random number for slot1 and so on).


TIA
Dan

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