ActionScript 3.0 :: Proper Syntax To Use Two Different Loaders To Load In Two Different Swfs

Nov 10, 2010

I'm newly migrating over from AS2 so I'm hoping someone can possibly help me here. I have created a main swf that cycles through two arrays loading in external swfs into two MC containers on the stage. All seems to work well; however, I believe there's an issue with using content LoaderInfo twice here, because my swf files behave inconsistently when I do so. I basically just use the same code to load into my two different containers and swap out the loader, array and MC container name. I cast the swfs as MCs to enable pause/play functionality.Can anyone see what's going on here? What is the proper syntax to use two different loaders to load in two different swfs simultaneously, yet only use contentLoaderInfo once?[code]

View 5 Replies


Similar Posts:


ActionScript 3.0 :: Proper Syntax - Properties From Construct

Aug 25, 2009

How do you properly set a public variable or property in a construct? I'm pretty sure this is the wrong way of going about it:
Code:
private var subNavLoader:Loader = new Loader();
public var type:String;
public var w:Number;
public var h:Number;
public var path:String;
[Code] .....

View 5 Replies

ActionScript 3.0 :: Proper Syntax When Dispatching A Custom Event

Jul 7, 2009

i have a class where I'm setting a simple custom event name as a static const such as:

Code:
public static const ON_OVER:String = "HotSpot_ON_OVER";

When an instance is created in parent container object, I'm simply using:

Code:
theInstance.addEventListener(HotSpot.ON_OVER, hsOverHandler);

Within the HotSpot class, when I dispatch that event - both of the following work, but is one preferred or more proper than the other?

Code:
dispatchEvent(new Event(HotSpot.ON_OVER));
//or
dispatchEvent(new Event(ON_OVER));

View 1 Replies

ActionScript 2.0 :: Proper Syntax For Passing Flashvars Through Shadowbox To JWPlayer?

Jul 3, 2009

what the proper syntax is for passing flashvars thru Shadowbox to the JWPlayer (wanting to reskin it).

I have no problem doing this in conjunction with swfObject or via an embed.

Unfortuanitly my posts on the Shadowbox forums have gone unanswered. Their docs discuss this only in principle - no details provided for this specific need.

There are multiple posts on their forums and the developer mentions the ability to do this but provides no practical example showing how it's done with multiple variables and multiple parameters.

If using js to embed it would look like:

Code:
<script type="text/javascript">
var s1 = new SWFObject("/scripts/shadowbox-build-3.0b/libraries/mediaplayer/player.swf","ply", "580","326", "9","#F3F3F3");
s1.addParam("allowfullscreen","true");

[Code]......

View 0 Replies

ActionScript 3.0 :: Load And Proper Resize External Swf File?

Nov 4, 2010

I`m trying to load swf into mc using Class I made for loading external content and then I shrink that swf.

Everything works fine, but, when I create graphic outside of the stage in swf I`m loading, my Loader flash display even that graphic.

View 1 Replies

ActionScript 3.0 :: External Swfs Load - Remove The Swfs And Sound After A New Button Is Clicked

Nov 13, 2010

I am loading eight external swfs by way of eight buttons with actionscript to remove the swfs and sound after a new button is clicked. This works fine except that as soon as you get to the frame where the actionscript is all the swfs load at one time on top of each other. I don't want any to load until the button is clicked for the right one. MouseEvent listener works but only after all the swfs have loaded. How do I get the swfs to load only when the buttons are clicked. I can't figure out what I am doing wrong.

[Code]...

View 5 Replies

ActionScript 3.0 :: Load Multiple External Images Into Mc Instances On Stage / Using Different Loaders

Jul 29, 2010

I'm using this AS to load multiple external images into mc instances on a stage, using different loaders.[code] The external images always load from the upper left corner down,  how can you make the image load from the center of the instance on stage?I found this code below and doubt it will work for me since I have 5 mc instances on different parts of the stage, so the stage wouldnt be a good reference point.[code]

View 1 Replies

ActionScript 3.0 :: Multiple SWF Load - Keeping A Reference To The Loader And The Classes Holding The Loaders

Jul 31, 2009

I'm loading a bunch of SWFs at the same time. I'm using a custom class to do the loading. Most of the time they all load OK, however occasionally one or two will be unloaded (I can see that in the console) before we get to the Event.COMPLETE. The ProgressEvents are all fine - I can see them loading, but then boom - they're unloaded.

I've done a bit of digging around and discovered that this may be a bug in the Loader class where if you are using multiple instances of the class then sometimes one or more will be Garbage Collected before they finish loading and are therefore unloaded. I've tried keeping a reference to the loader and the classes holding the loaders and I'm still having the problem. The solution is to queue the loads and load each swf in order which isn't a problem, just a bit irritating.

View 2 Replies

ActionScript 3.0 :: Removing Loaders And Listeners - Scrub Thumbs For Video Player Load And Unload Repeatedly

Sep 1, 2010

I need to have scrub thumbs for video player load and unload repeatedly. Something isn't getting cleared. Every time the thumbs are removed, there's a slight increase in the cpu baseline - something is piling up in memory.

[Code]...

View 4 Replies

ActionScript 3.0 :: Syntax To Load From Library With Dynamic Name?

Jan 6, 2010

I have some movie clips in the library I am loading but I can't figure out the right syntax to get the librabry item dynamicaly so I had to resort to a chain of "if" statements. I left off all the extra stuff like position and addChild etc just to make the code more clear.

for(var i:int=1; i>4; i++){
addChip(i)
} function addChip(id:number) {
if(id == 1){
this["chip"+i] = new twoXchip1()
} if(id == 2){
this["chip"+i] = new twoXchip2()
} if(id == 3){
this["chip"+i] = new twoXchip3()
}}

So what I want to do, is instead of having 3 "if" statements - to just use the "id" value I passed in to identify the right chip in the library to load. My real if chain is actually much longer than three and it's difficult to update ..I know there's a better way to do it...but every way I try throws errors!

View 5 Replies

ActionScript 3.0 :: Movie Looping After Starting Syntax With Stop Command, No Compiler And Syntax Errors?

Jul 14, 2011

using action script...
 
stop();btn001_btn.addEventListener(MouseEvent.CLICK,showimage1);function showimage1(event:MouseEvent):void { gotoAndPlay(10);}btn002_btn.addEventListener(MouseEvent.CLICK,showimage2);function showimage2(event:MouseEvent):void { gotoAndPlay(20);}
 
however movie is playing without stopping to "Listen" for a Mouse CLICK. Images placed at frame 10 and 20 should appear only when CLICK'd.
 
This code is straight out of Classroom in a Book CS4.

View 5 Replies

Javascript :: Sequentially Load SWFs On A Timer Or Load Next Once One Is Finished?

Feb 19, 2010

I have a page that loads loads of swfs*. I'm loading in them all at the same time, Sequentially which is slowing down the intro animation. Is there a way to load swfs sequentially? Or if not load them on a timer (half a sec would do the trick I think)

*there lots of different dynamically generated Flex graphs so it's not possible to have them all in one.

[Code]...

View 2 Replies

ActionScript 3.0 :: External Swfs Load In Different Places On 2nd Load

Oct 19, 2009

I'm loading (and unloading) external swfs into a holder in my main document. However, they seem to load perfectly the first time, but after that, they load at a different x and y. I've seen this happen before in someone else's file, but I'm not sure what the solution is.

This is the bare bones of it:

Code:

sceneHolder.x=0;
sceneHolder.y=0;
addChild(sceneHolder);

[Code].....

View 1 Replies

ActionScript 3.0 :: Load External Swfs Which Load Videos

Apr 11, 2009

Okay so I am trying to load external swfs which load videos dynamically.

I can load the swfs into the parent fla fine (if I remove all the code and just place a circle or something on the stage of the swf), and the swfs are also loading their respective videos correctly. But when I try to load the external swfs, if they contain any casting related code in them, I'm getting an error

[AS]TypeError: Error #1009: Cannot access a property or method of a null object reference.
at swf1_fla::MainTimeline/frame1()[/AS]

Is there some specific method to casting within external swfs?

My code for loading the videos is this:

[AS]var vc:NetConnection = new NetConnection();
vc.connect(null);
var vs:NetStream = new NetStream(vc);

[Code].....

View 1 Replies

ActionScript 3.0 :: Falling Snow To FALL - 1087: Syntax Error: Extra Characters Found After End Of Program. OnClipEvent (load)

Nov 18, 2011

I have tried this tutorial at: [URL]. I'm using Flash CS4 on the MAC. But when I run it, nothing happens, When I run the test movie I get an error: 1087: Syntax error: extra characters found after end of program. OnClipEvent (load) {

Also, it doesn't say in the tutorial, so I created a new layer first and then dragged the snowflake symbol onto the stage and then added the script to it. (now there are 2 layers on my timeline). Although it doesn't say to make a new (2nd) layer. Surely you can't do everything on the same layer, because you need to add 2 different scripts which you can't do to one layer.

View 3 Replies

ActionScript 2.0 :: [F8] Make All Swfs Load At Once?

Feb 19, 2009

I have a website im working on and I have it load multiple swfs etc. But although the site will load in the beginning it takes time to load each swf. Although I grasp the logic behind that is there a way to make them just all load at once? Like an AS code to include in a preloader of sorts?

View 1 Replies

ActionScript 3.0 :: Load Swfs In Front Of Each Other?

Feb 17, 2010

is there a property for loading swfs which puts them infront or behind each other?

View 16 Replies

Load Swfs With Loadmovie Script?

Aug 11, 2009

Trying to load swfs with loadmovie script. They load fine but when close window button is pressed the Main movie behind it dissappears to blank screen.

View 2 Replies

Load Multiple SWFs Containing FLV Videos?

Sep 29, 2009

I'm having a heck of a time trying to get a number of external SWFs loaded into one main SWF in successive order, the next one playing after the other has ended. To complicate matters, the external SWFs have FLV files in them.
 
using Flash CS3
Actionscript 3.0
 
So, here's essentially what I'm looking to do: - I have one main SWF file (call it main.swf)- load several SWF files into this file so they play in order (let's call them movie1.swf, movie2.swf, movie3.swf, and so on) - these external SWF files all have FLV progressive downloads (not embedded, becuase then my audio doesn't sync up) - I want movie1.swf to load and play in the main file, then detect when the movie is complete, and unload that audio/video then load in movie2.swf, and so on.
 
This script seemed promising, but loads all of my SWFs on top of each other, making for some ::interesting:: audio... (i have it pasted in actions on first frame in main.swf)
 
var a:Array = new Array("movie1.swf", "movie2.swf", "movie3.swf");var tl:MovieClip=this
var index:uint=0;
loadF(new Event("nada"));

[Code]....
 
Maybe there's some code that can be pasted in the individual SWFs?

View 2 Replies

ActionScript 1/2 :: Load External SWFs Through XML

Feb 15, 2010

I am using this thumbnail gallery attached but instead of loading images through the xml I want to load external SWF'S. I also want to be able to control each SWF loaded in individually apparently in order to do that I need to give the container different instance names..however I don't know how to extend the code inorder to achieve this..

View 7 Replies

ActionScript 3.0 :: Cannot Get External .swfs To Load

Apr 29, 2010

Im trying to load an external .swf, from one of those lazy-do-it-for-you photo gallery creators. Well, it just simply refuses to work
 
Ive tried using AS3 code straight off adobes site and i get this:

[CODE]
var request:URLRequest = new URLRequest("4melogo.jpg");
var loader:Loader = new Loader()
loader.load(request);

[Code]....

View 12 Replies

ActionScript 3.0 :: Load And Unload Three Swfs?

Jun 22, 2011

How do I load and unload three swfs, with a button that will navigate to the next swf? Also, will the sound unload with the swf as well?

View 3 Replies

ActionScript 3.0 :: Using Preloader To Load Up SWFs?

Sep 12, 2011

I have a preloader and I want it to load each section when called with this code:
Callback function:
caps_mc.btn_continue_mc.addEventListener(MouseEvent.CLICK, nextpls);
function nextpls(e:MouseEvent):void {
MovieClip(parent.parent).nextSWF("startPage", parent);}

The code above tells the preloader that it is finished with the startPage and in the preloader it should next load faq, but I get an error saying that nextSWF is not a function when it clearly is, Is it even possible to use a preloader to load up swfs in this way??

Preloader:
import flash.display.*;import flash.events.*;
import flash.net.URLRequest;
var loadedSWF:Loadervar progressPercent:Number;
function startLoad(SWFName:String):void { loadedSWF = new Loader(); loadedSWF.contentLoaderInfo.addEventListener(Event.COMPLETE, gameLoaded);
[Code] .....

Here is the error:
TypeError: Error #1006: nextSWF is not a function. at startPages_fla::MainTimeline/nextpls()[startPages_fla.MainTimeline::frame1:7]

View 14 Replies

Load Several Swfs And Make Them Start Together?

Mar 25, 2012

Let's assume that I can't script the loaded swf, nor can the loaded one script the loader swf.

I was attempting to set frame rate to 0, and wait after all swfs are loaded, and set frame rate back. But I found when I set the frame rate to 0, I could not receive the complete event! And it's weird that i can still receive UI events...

Is there a way to load several swfs and start them together?

View 2 Replies

ActionScript 2.0 :: Swf Does Not Load Other Swfs In Safari?

Dec 17, 2009

i have a very frustrating problem, which occurs only in safari:the main.swf loads an external swf-file.alas in safari this does not work. Movie clipLoader throws out an URLNotFound with httpstatus:0.

View 2 Replies

ActionScript 2.0 :: Load SWFs Using Json?

Jun 16, 2010

Can I load external SWF files using Javascript sequentially? Or does it have to be in Flash to load the SWF files from XML?

Currently we have SWF banners (900 x 230) loaded from XML sequentially and it works fine, but it is killing our computers. I wonder if the javascript will run the SWF banners smoothly?

View 3 Replies

ActionScript 2.0 :: Using XML To Load External SWFs?

Jul 6, 2010

I've got this down using ActionScript 3, but I am in over my head trying to revert back to ActionScript 2.

I have a main swf that acts as a shell and calls up external swfs via XML upon a button click.

I've read a number of tutorials over the past few hours, and have learned the basics of how to trace the XML information; however, I'm struggling getting the content to appear on stage.

View 3 Replies

ActionScript 3.0 :: External SWFs Don't Load

Aug 4, 2010

I am working on a an automatic slideshow that's also clickable with buttons...I got the code to work fine on my sample file, but now that I brought it over to the actual file I need to make a slideshow out of - the external SWFs don't load all the way! The first default one loads ok - and the rest remain at about 80% Alpha...

//Import classes for easier use
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;

[code]...

View 1 Replies

Actionscript 3.0 :: External SWFs Won't Load

Jul 16, 2009

I'm loading external swfs into my main swf and they should just be playing automatically. When I test in Flash, the system works. Upon loading the swf into an HTML page, the system seems to shut down. It seems liike the exteranl swfs aren't even loading. This is what I've got so far.

var clips:Array = ["amerishelf2.swf", "bedHardware.swf"];
var index:int = 0;
var thisLoader:Loader = new Loader();
thisLoader.contentLoaderInfo.addEventListener(Event.INIT, doneLoading);

[code]....

View 3 Replies

ActionScript 2.0 :: Load SWFs In The Background?

May 8, 2008

i have multiple SWFs loading on multiple button clicks. so by default i have one.swf loaded on the screen. now when button two is clicked i load two.swf replacing one.swf. similarly when button three is clicked i load three.swf.

is there anyway i can preload two.swf, three.swf and other swf files in the background so that when user clicks on the button to view these, the swf is already loaded and takes no time to appear.

View 9 Replies







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