ActionScript 3.0 :: Load Few Swf In A Loader (on The Timeline)?

Mar 23, 2011

I'm a french student (first year) in a graphic school and I make a project in Flash.I simply need to make few 'infinite' (never ending) Swf's suceed. In the timeline (which is used as a frame controller) I call the Swf's successively. Here is the code and the screenshot of the timeline:

Code:

var imageLoaded:Boolean = false;
// Create a new Loader to load the swf files
var myLoader:Loader=new Loader();

[code]....

BUT, because there is a but, I can't make them interlink. I tried to make a new layer and place some code into it, but it stops the previous one. It seems that there is a piece of code to write to enable this option.

View 3 Replies


Similar Posts:


ActionScript 3.0 :: ADDED Event In Loader.load And Loader.loadBytes

Sep 13, 2010

I got this very strange behavior from FlashPlayer debugger 10.1 r82. When I call loader.load method, no ADDED event is dispatched to the loader object. But if I open the file and call loader.loadBytes instead, an ADDED event is dispatched to the loader object. I suspect the ADDED event is dispatched because the content is being set as the child of Loader object, but why in the other case it is not dispatched?

View 4 Replies

ActionScript 3.0 :: Loader Class - Error 1061: "Call To A Possibly Undefined Method Load Through A Reference With Static Type Loader"

Oct 20, 2010

siteLoader.as, Line 23 1061: Call to a possibly undefined method load through a reference with static type Loader.

[Code]....

View 2 Replies

ActionScript 3.0 :: Load External SWFs, AddChild(Loader) Versus AddChild(Loader.content), Etc?

Jul 29, 2009

I have a main "shell" swf which, by clicking several buttons, will load/unload various external swfs into a Placeholder_mc which resides on the main timeline in Shell.swf In the documentation and tutorials I've seen a couple different methods, and I'm not sure I quite understand the difference, or at least the reason you would use one over the other...In the 1st method, you can just add the Loader object using the addChild() method:

Code:

var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);
Placeholder_mc.addChild(myLoader);

This will apparently add myLoader to the display list once it has completely loaded.The 2nd method, you supposedly can add the Loader.content; however, it appears you can only do this once the content has completed loading, so you need to incorporate an event handler with the contentLoaderInfo object:

Code:

var myLoader:Loader = new Loader();
var myURLRequest:URLRequest = new URLRequest("ExternalFileA.swf");
myLoader.load(myURLRequest);

[code]....

What are the pros/cons of adding the entire Loader object, as opposed to the Loader.content and vice versa?

View 7 Replies

ActionScript 3.0 :: Removing Loader From Another Timeline

Feb 13, 2009

I am designing a site and one problem has been persisting for quite some time. I want to remove an swf once a second page has been added here is the website design > a preloader loads my main menu, on the main timeline of my preloader.swf I create a new loader(loader1)
and tell it load the URLRequest "menu.swf" > The menu.swf loads, on menu.swf main timeline I create a click function (instantiates once a button has been clicked) that loads my second loader (loader2) and this loads the URLRequest "cast.swf"

I want cast.swf to replace menu.swf and remove it entirely but I cant figure out how to do it, here is what I have tried inside the click function of menu.swf (is this possible? can you write code to remove an swf if you are actually inside that swf's main timeline?) removeChildAt(0); (this only removes the bottom layer of the menu.swf) removeChild(MovieClip(root).loader1); inside the click function (this does not remove the menu.swf)

View 1 Replies

Actionscript 3 :: Load An External Swf File Using Loader.Load?

Sep 19, 2011

When i try to load an external swf file using Loader.Load(); The swf starts playing even before the init event is fired. Is there any way to stop the swf from playing atleast until the init event or complete event is fired?

View 1 Replies

ActionScript 3.0 :: Unload Loader And Continue On Timeline?

Apr 28, 2009

I have used the loader class to play an external .swf file. When it is finished I need to stop it and continue to the next frame in the timeline of the original movie. I can load it and unload it, but how to I unload it after it has played and continue to frame 2 of the timeline?
 
var myLoader:Loader = new Loader();myLoader.x = 150;myLoader.y = 75;
myLoader.load(new URLRequest("movie.swf"));addChild(myLoader);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete) ; 
function onComplete(e:Event):void{    myLoader.unload(); this.gotoAndPlay(2);}
 
With this code, it skips the loaded movie and goes straight to frame 2.

View 6 Replies

ActionScript 3.0 :: Moving Loader Information To Main Timeline

May 20, 2009

Im trying to create a gallery application in flash. I created a movie clip and inside of it I create a loader variable. After loading it i want to put it on the stage but not using the same loader. What I am trying todo is to load the information, and the copy the loaded information to a different loader that lives on the main timeline (root) and then use the addChild to put it on stage but its got to be on the main timeline or a different movieclip, not the same movieclip that loaded the object.

View 6 Replies

ActionScript 3.0 :: Menu Buttons - Changing Variable Loader On Main Timeline

Oct 22, 2008

I am creating a very basic menu. My project consists of a main file that then calls other swf's to fill in the rest of the content. My main timeline is this. There is an preloader which hasn't been built yet, a intro section that is two movie clips (one loads the layout, one fades in my buttons). Then when all this loads, I load the first swf. My difficulty is that I am trying to get my buttons, which are held in mc_buttons, to change the variable myLoader on the main timeline. So when you click on a button, it swaps in a different swf for the current loaded one. I have tried calling the following code attached below.

My error is:
"1119: Access of possibly undefined property myLoader through a reference with static type flash.display:DisplayObjectContainer."
Now, if I define the myLoader variable in the mc_buttons and do an addchild() there, I get the correct content, it just is on top of the old content which isn't what I want...

View 12 Replies

UI Loader, Load On X Value?

Dec 16, 2009

I have a movie clip that has a UI Loader component on one layer, its autoload value set to false.I would like this UI Loader component to load when the movieclip is in a certain position.Heres my current code im using: [code]....

View 2 Replies

Flex :: Load A Big Picture Or Swf File By Calling Loader.load() In Flex?

Nov 17, 2009

I get a ActionScript class for loading the content:

public class LoaderContainer extends Sprite {
public function LoaderExample() {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
addChild(loader);

[Code]...

View 1 Replies

How To Load JPG Files Into Loader

Nov 2, 2009

I am trying to load a jpg into a loader so I go into the properties then change the content path to input a URL. It works fine on the stage but when I put it inside a button it doesn't work....

View 2 Replies

ActionScript 3.0 :: Using A Loader To Load In Another Swf?

Jun 3, 2010

Just using a simple loader to load in another swf.  I have added a rectangle to my original swf, and converted it to a mc.  This is going to be used as a holder.  The code is
 
var swfLoader:Loader = new Loader();
this.addChild(swfLoader);
var bgURL:URLRequest = new URLRequest("newBaby.swf");
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete);
swfLoader.load(bgURL);

[Code]...

Where "this" relates to the movie clip holder object it is currently in.  My question is why the top left corner of the loaded swf is always placed in the center of the holder, and not at the top left corner of the holder?  Is this a default action or something?

View 3 Replies

ActionScript 3.0 :: Load Swf Into Loader?

Apr 3, 2009

I have a AS2 loader (buil in AS2 that is) that automatically loads external swf's.And I have a sfw build in AS3.Is it possible for my loader to still load this swf file?In order for the loader to work I have to add "_root.nextswf();" at the end of every swf file.However I know that in AS3 the alnguage is different. IF it is possible to load an AS3 swf into a AS2 loader then: is there any code to replace this one?

View 3 Replies

IDE :: Loader - Load All Images First

Jan 22, 2010

in XML gallery , how we can load all images first so that rest of the slide show runs smoothly For example: I have placed 10 images in XML , when slideshow starts , all the effects not appears, because it waste time in loading each image on its turn I want to load all images first , then want to start the slideshow how i load all images at the start?

View 1 Replies

ActionScript 3.0 :: Load Images Using Same Loader?

May 21, 2009

I'm using a function that have a loader the loads an image and put it on stage.When i try to call the function again with a different image, i can only see the first image,From what i remember that image is there but i need to remove that last one that i added to the stage but i cant remember how to do it.Note that in order to load the images i use addChildAt(object, 0) because i need the image to be in the back of the stack.

View 2 Replies

ActionScript 3.0 :: Loader Won't Load On All Pages

Aug 31, 2009

I am creating a website that has four different pages with two different pages that load pictures into a loader. Right now, everything is loading fine, but when I go to the frames (i.e. other pages of the website) where the loader doesn't exist, and then I go BACK to one of the previous pages, the loader doesn't display anything when I press the buttons. The dynamic text box doesn't load either. I am using two different arrays to load it. Also, I had to put the Actions on the second frame of the whole scene for some reason. Is there some rule about having buttons on one frame load things into a loader that is on another frame?[code]...

View 1 Replies

ActionScript 3.0 :: Use Loader To Load Two Picture?

Nov 30, 2010

I use Loader to load two picture,such as 1.jpg and 2.jpg,like follows:

_p1=new Pic("1.jpg");_p2=new Pic("2.jpg");

Then I add the two picture into a Sprite,like follows:

Sprite _g=new Sprite();
_g.addChild(_p1);
_g.addChild(_p2);

Then I draw a circle as _g mask,such as _c
_g.mask=_c;
 
I want to realize following effect.First appear 2.jpg,and during the mask _c radius is from 0 to 300,the picture 1.jpg is appearing synchronously in mask _c.

View 3 Replies

Actionscript 3 :: Loader Do Not Load If Already Loaded?

Aug 13, 2010

Is there some way to check if what you are loading is already in memory and don't need to be loaded a second time?

View 1 Replies

Php :: Load JSON Data With URL Loader?

Aug 4, 2011

I am new to action script 3.0. o understand how can I load data with URLLoader.So, I have an aplication like:

var PATH:String = "http://www.somesite.com/myFirstPage.php?a=10&b=20";
var urlRequest:URLRequest = new URLRequest(PATH);
var urlLoader:URLLoader = new URLLoader();

[code].....

View 4 Replies

ActionScript 3.0 :: Using Loader To Load, Then Control A Swf?

Jan 29, 2008

I'm loading a swf with the AS3 Loader class. It's being done from a main.swf that has nothing but a preloader display. The content is all in the swf that I'm loading with the Loader class. It's working. But the swf's playhead seems to be already 40 or so frames down the timeline once it's displayed on the stage. So I want to tell the loaded swf to gotoAndPlay(1) after the preload is complete in the relevant handler. The handler fires, but I don't know how to access the swf in question.loader.content returns a DisplayObject and trying to talk to it with MovieClip properties throws errors. I've tried to cast it as a MovieClip based on various things I've seen via searches here and in the docs, but that's failing, too.How does one do this the "right" way?And for that matter, why has the timeline already started to play before the swf is visible on stage?

ActionScript Code:
private function onLoadComplete(event:Event):void {
// what can I do to take _loader.content and make it accessible for a gotoAndPlay() or some

[code].....

View 5 Replies

ActionScript 2.0 :: Get Links To Load Swf Into A Loader

Oct 13, 2009

I bought a menu from Oxylus (cannot get ANY replies from them!) and I don't know how to get the links to load a swf into a loader as I have in my current menu. My current menu has this code in the xml file:[code]The Oxylus info that I can find tells me to modify the submenu.as file, and the code I should be changing is in this block:[code]

View 7 Replies

ActionScript 3.0 :: Load Multiple MC Into UI Loader?

Oct 15, 2009

I have a array of names corresponding to buttons selected the names allow me to load specific MC's in to a UI Loader in a new Flash movie by using SharedObject. My problem is that I have quite a few buttons but I'm only loading the MC's of the ones that were selected and I don't know how to load multiple MC's in to one Loader. Kind of like a gallery of thumbnails but the order depends on what items have been selected to show.Can anyone please explain how I could load each MC?this is how I am loading my array and thensome how I need to add these to a loader.

Code:
var selectedButtons:Array = loadButtons();
for each( var buttonName:String in selectedButtons )

[code].....

View 0 Replies

ActionScript 3.0 :: Load A Picture Into A Loader?

Sep 8, 2011

i was trying to load a picture in to a loader :

ActionScript Code:
var url:String = e.currentTarget.link;
var request:URLRequest = new URLRequest(url);

[Code]....

and the only error was : SecurityError: Error #2000: No active security context.

i found the problem !: this error occurred if the xml link is wrong or if the picture is not on called link.

The question is: this is a cs5 bag or i miss something ?

View 2 Replies

ActionScript 3.0 :: Load An External Swf Into Another Swf Using Loader?

Nov 1, 2011

I am trying to load an external swf into another swf using Loader but I am having difficulties to do so. The thing seems to be that some of the classes of the loaded clip are called the same as the parent clip's classes. Both swf's document classes are called "Launcher", for example, also they use StringUtil (tho both projects have their own "StringUtil" class).

View 4 Replies

Actionscript 3.0 :: Stop Load In Loader

Apr 12, 2009

In the Loader how to stop the current load

i use the close methods bue not worked and return this error

Code: Select allError: Error #2029: This URLStream object does not have a stream opened.

View 1 Replies

ActionScript 3.0 :: Load Different Content Into One Loader?

May 2, 2009

Im making a main page that will load different content into one loader. I have the loading URLRequest calling a variable for the link and then on a certain button click it will change the swf to be loading.The problem is this: This code is being called in a movieclip inside the main timeline called "loaderHolder"

[Code]...

View 3 Replies

ActionScript 3.0 :: Getting Image To Load Using New Loader ()?

Feb 10, 2009

I'm a complete newbie using ActionScript for a class I'm taking online (not my choice to have it online, unfortunately). My instructor isn't much help to me and I am struggling. I am a beginner Flash user so know a little about that program but it's the AS I'm struggling with. I will give you my first bornI am creating a simulation that contains an octopus in a bath tub for the main image.I'm trying to get the octopus to load on my stage using the code my instructor has given me:

var somePictLdr:Loader = new Loader();
var request:URLRequest = new URLRequest("octopus.jpg"); <--this is the name of the jpg I have. I'm on a Mac and the entire folder with all of my stuff is on my desktop named

[code].....

View 3 Replies

ActionScript 3.0 :: RSS Feed - XML Will Not Load Into Loader?

Apr 12, 2010

I have an rss feed where I can grab the image I am trying to get and it works. I can't load it into the loader from there.

[as]
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("[URL]"));
[Code] .....

View 3 Replies

ActionScript 3.0 :: AIR Using Loader To Load .png Not Working On IOS?

Dec 6, 2011

I'm trying to load a .png and display it but the iPad and iPhone show a white screen. Here is my code:

Code:
public class Test extends Sprite
{
private var loader : Loader;
private var urlRequest : URLRequest;

[code]....

This works fine when tested in AIR but not when I test on the device using the [TEST on DEVICE] build. My TestImage.png is in the bin folder where my Test.swf gets compiled into.

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved