ActionScript 2.0 :: Loading Swf With Preloader At _root Level
Sep 30, 2009
I have a swf file ("myfile.swf") which i want to load using preloader.
I referred many tutorials for preloader but problem is I want to load "myfile.swf" at _root level as I have referenced many movieclips in it as for example _root.mc1.mc2
I tried following but may be i am mistaking somewhere...
1) I used preloader in frame 1 and frame 2 and swf content in frame 3 but the file is so huge that the preloading almost starts at around 69% or so
2) I kept preloader in scene 1 and swf content in scene 2. But i cannot see the preloader or i can see at 98% or 99%
3) I used preloader in "pre.swf" and used loadMovie() to load "myfile.swf" at _root. But as i m loading "myfile.swf" at _root so preloader's code is overwritten and so i m not able to see preloader
My "myfile.swf" is very complicated file and so i cannot change all the movieclips which i have referenced as "_root.mc1.mc2".
View 9 Replies
Similar Posts:
Aug 26, 2010
I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF. Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1. When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1. However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not. Here's my AS2 code:
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{ trace("loaded"); //This works removeMovieClip(mc_Empty1.mc_FadedBg); //This works}
[code]....
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not.
View 3 Replies
May 12, 2010
Right now I am trying to make a gallery in my site and the set up is
Main SWF(1)
loaded into a movie clip on SWF(1) I have SWF(2)
This SWF(2) has the various thumbnails in a movie clip
The ideal is to load SWF(Photos) of the images into another movie clip in SWF(2)
When running SWF(2) stand alone it works fine with a _root command. But when SWF(2) is running on SWF(1) it doesn't work. And initially I had the movie clips with SWF;s 1&2 having the same name so when the button was pressed SWF(1) loaded SWF(Photos) where SWF(2) was.
Is there a command like _root but only going down 1 level?
View 4 Replies
Dec 7, 2009
I have a flash template which came with a preloader with AS's like this:
__________________________________________________ _________
MovieLoaded = _root.StoredActions.Movies.movieAnime.Holder["CMovie"+n].getBytesLoaded();
loadTotal = _root.StoredActions.Movies.movieAnime.Holder["CMovie"+n].getBytesTotal();
[code].....
View 1 Replies
Mar 20, 2005
Ive just been stuffing around with this little game, and its been working perfectly up until now. The reason? I have just added another frame for a title and menu. And now when you click "Start" on the menu, and it takes you to the game; The hero wont move, the enemies wont spawn and the music wont play. Its like the script is just not loading. But when I remove the menu frame (leaving only the one frame with the game on it) it works fine again.
View 3 Replies
Aug 6, 2004
Ive just been stuffing around with this little game, and its been working perfectly up until now. The reason? I have just added another frame for a title and menu. And now when you click "Start" on the menu, and it takes you to the game; The hero wont move, the enemies wont spawn and the music wont play. Its like the script is just not loading. But when I remove the menu frame (leaving only the one frame with the game on it) it works fine again.
View 5 Replies
Jan 14, 2010
In the code below i want to change the _root.broj and _root.logo variables inside the function which returns values from .php file. Inside the function everything works fine and all values are correct but when i trace var broj outside the function it's still 0.
var result_lv:LoadVars = new LoadVars();
var send_lv:LoadVars = new LoadVars();
var broj:Number=0;
var logo = new Array();
[Code].....
View 1 Replies
Feb 27, 2003
im lookin to make this so that the points taken from the _root.cargo are multipled by 10 and added to _root.totalscore
[Code]...
View 2 Replies
Dec 8, 2006
I have an object (with it's own timeline) and on the last frame of that timeline I have the following code:
Code:
stop();
_root.createEmptyMovieClip("mainLoop_mc", 2000);
with (_root.mainLoop_mc){
[code]....
The problem is, when the "mainLoop.swf" file loads it obliterates my main UI SWF instead of attaching itself to a particular spot on the UI. So one SWF is replacing the other.
View 3 Replies
Jun 22, 2010
I admit I'm fairly new to flash, but I've almost finished an entire RPG battle system complete with music [etc. etc.] - but my problem is trying to add a preloader.. I have a basic page which says "Loading" and has a Dynamic text box below which should read the Variable "_root.loadText". In the first frame I have this code:
[Code]...
and in the second just "_root.gotoAndPlay(1);" for the updating process. I'm sure that's all okay. But when I export it, then upload the swf file to somewhere like SwfCabin to show people for testing purposes, they have to wait on just a blank white screen for 1~3 minutes.. -note: I use both Adobe flash CS3 [at home] and Macromedia Flash 8 [at school] - I can stick to just CS3 if needed.
View 2 Replies
Sep 14, 2004
if a condition is true, then:_root.(MC with instance name that is the value of "_root.eelmine").nextFrame(); is this correct?_root._root[eelmine].nextFrame();
View 16 Replies
Sep 3, 2005
loading var into different swf in different level.
I got the index.html to hold navigation.swf, navigation.swf loads login.swf in level 10 then I got an var coming from the database but login.swf cant receive it (it shows nothing). So I try to use index.html to hold the login.swf then it works, does anyone know why login.swf can't receive the var? If I load into different swf in different leve, does it mean I have to specify the level for the var?
View 1 Replies
Jan 30, 2005
Top level = main.swf bottom level = pagexx.swf (xx = 1,2,3,etc)
Problem: When loading another swf from the main.swf into main.swf, it works fine. But now I have a problem of loading page2.swf from page1.swf which is now opened in main.swf. I've tried using loadmovienum but they overlap each other instead of page1.swf disappearing. Hope I explained the situation well enough. Here's the script from main.swf used to load page5.swf (where all the 5 = page5).
on(rollOver) {
if(_root.link<>5) {
gotoAndPlay("s1");
}
[Code]....
View 6 Replies
May 1, 2010
Code:
thumb03.onRelease = function(){
image_holder.loadMovie("images/03.jpg");
submenu01_holder.attachMovie( "submenu01", "submenu01_new",this.getNextHighestDepth());
getURL("./htm/03.html", "tracker");
};
So I'm working on a portfolio and I'm trying to load an image with a submenu on top of it that will let you click through a couple different related images. However, right now the submenu keeps loading underneath the image, so the buttons are there and you can see it a split second before the other image loads over the top. I tried manually putting in levels for the image and submenu and no luck.
View 4 Replies
Oct 19, 2005
Im having trouble with this script again. I need to load a movie on the 2nd leve this is the script here.
// Time value, in milliseconds, after which, failing any mouse movement, an action is to occur.
numMouseTimeoutMS = 30000;
// Define what is to happen should the mouse be moved.
[Code]....
View 2 Replies
Dec 26, 2005
The trouble is that when I click in the button in the first film, the "main.swf", the "album.swf" is loaded into level 10, but the images and description does not load. Seems to be here some parsing problem between flash and xml, but I can't solve it.
View 8 Replies
Nov 5, 2002
I am loading a swf into a level, but need to use actionscript to manipulate its location in the root movie. This is my code:
stop ();
loadMovieNum ("logo_sm.swf", 1);
_level1._x = 300;
// whatever you want for upperleft x
_level1._y = 300;
// whatever you want for upperleft y
yet the loaded swf continues to load in its native position, rather than at any coordinate which I specify. It is riding in the upper left hand corner, even tho here I am indicating a much different position.
View 5 Replies
Jan 26, 2009
I just recently began migrating from AS2 to AS3, and I have of course realized that I can no longer move the "_root" by changing the _x and _y positions of the _root (which no longer exists in AS3). How can I do this in AS3 (specifying _x, _y, _z possibly of the "_root")?
View 2 Replies
Jan 10, 2009
Does anyone know how I can load a movie into level1 that has sounds embeded in it and be able to play them? I would like to load the sounds using code on the timeline. I don't understand why my method is not working.Here is what I tried.I have a movie that I am loading into level 1.My sounds are inside the movie that I load into level1.So I ran a test and if I load the movie into level0 the following code works fine and plays the sound.[code]But then when I load the move into level1 and change the code to the following, it deosn't work.[code]
View 3 Replies
Jan 15, 2009
I am using levels for this project to allow transparency transitions between swf files as they load. I created two variables:levelvar=5;removevar=(levelvar - 2)The external swf files load into _level0.levelvar and removevar prevent the root file from unloading. All is well except on one button I want it to load the swf at a particular frame. I tried this:
button.onRelease = function() {
loadMovieNum("contact.swf", _level0.levelvar);
gotoAndPlay ("_level0.levelvar" 52);
[code].....
View 0 Replies
Jan 10, 2003
how do I load an external .swf files in order for them always to load on top of the one loaded previously. I've tried to put all of them in the same level but the transition is abrubt. I want the transition to be smooth and each .swf file to load on top most level.
View 3 Replies
Jul 19, 2004
I have figured out how to randomly load and fade in poems from text files. Only, after trying to add additional functionality, namely, an index from which visitors may choose a poem to load, I have run into problems. To put it simply, I can't figure out how to modify the code he provided to load text onto lvl0 so far. Here's some sample code I placed on the first button, which is an mc inside an mc (and that mc is placed on the stage, which is a separate swf loaded on an upper level by lvl0):
Code:
on (release){
var poem = new LoadVars();
poem.onLoad = function(ok) {
[code]....
Here's the url for the files [URL] Main.swf is the main site, which provides a button labeled "INDEX". PoemIndex.fla is the source for the swf loaded when the user clicks the INDEX button. "mcButtons" holds all the buttons for each individual poem (wish I didn't have to hard code all of it), and I've also provided "poem1.txt", for testing purposes.
View 2 Replies
Nov 24, 2010
My problem is on my stage i have a loader_mc invisible movieclip that i want to load .swfs into using addchild
Problem is, everytime i click on a button that addchild the .swf keeps adding ontop like layers, therefore in my function button i tried to removechild before addchild but i will keep getting error #1009
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at bla_fla::MainTimeline/frame1()
I was wondering if anyone can teach me any other better ways how to load movies like in as2, on the same level when the button is clicked, the previous .swf is kicked aside and the new one will load.
View 2 Replies
Apr 19, 2004
I have a button that is a few levels down in movie clips. When It is pressed, it is supposed to load diamonds.swf. It does this, but not on the first press. On the first press the _root time line goes to and plays "fade," but doesn't execute the rest of the script.
[Code]...
View 2 Replies
Sep 3, 2004
Is there a way to clear a loaded swf from a level without loading something in its place? I just want to be able to clear out levels that aren't in use anymore.
View 4 Replies
Nov 12, 2010
How could I make a preloader with multiple levels in as2? Should I use loadMovieNum or the MovieClipLoader class?
I want to make a main progress bar, that represents the loading of all the levels, not a progress bar for each level.
View 7 Replies
Nov 10, 2011
I've got main time line as Main.swf (level 0) and few external swf files: Message_01, Message_02, Message_03 etc.By the end of the main time line there is a key frame with the script (AS2).The script should call randomly one of the external swf and load it to level 2.
View 5 Replies
Sep 3, 2004
Is there a way to clear a loaded swf from a level without loading something in its place?
View 4 Replies
Nov 2, 2009
I am loading objects in a paper-vision gallery through xml. I have a footer with some links in them, but the problem is the XML stuff is being loaded on top, how do I get the links and such to be on top so they are not underneath?
View 4 Replies
Apr 22, 2011
im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:
on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}
[Code]...
View 0 Replies