swfloader

How do I unload a externally loaded SWF file from a SWFLoader component in Adobe Flex?

I have an application that loads external SWF files and plays them inside a Adobe Flex / Air application via the SWFLoader Flex component. I have been trying to find a way to unload them from a button click event. I have Google'd far and wide and no one seems to have been able to do it without a hack. The combination of code I see people...

How to raise an event from a SWF in a SWFLoader to a parent Flex application?

How can I raise an event from a SWF file loaded into a Flex application (using SWFLoader)? I want to be able to detect a) when a button is pressed b) when the animation ends ...

Declarative and programmatic SWFLoaders

What's the difference in terms of security between declarative and programmatic SWFLoaders? In the ff. code, loader1 throws a security exception while loader2 does not. public someFunction(source:String):void { var loader1:SWFLoader = new SWFLoader(); loader1.load(source); loader2.source = source; } ... <mx:SWFLoader id="loade...

Passing flashvars-style parameters to a loaded SWF

I have a Flex 3 app (player v9) which loads a Flash SWF (AS3, also player v9) and needs to dynamically pass it a collection of parameters which are known at run-time. These are parameters that are normally passed via the flashvars element in an HTML page. The embedded movie accesses these parameters via the loaderInfo.parameters object. ...

Simulate ajax loader in winform app

I have a winform app which render a few charts, based on the user selection. I want to simulate an ajax style loader such that when the user makes a selection, there will be an overlay on the form with an animation in the center. What are some of the options in accomplishing this? I was thinking of loading a panel with the animation (gif...

Memory consumption of nested flex applications with RSLs using SWFLoader?

Hello out there, these days I read a lot with regards to RSLs. One disadvantage is that RSLs must be loaded into memory but can save significant loading time. Now what happens in the following scenario: I have a superFramework.swf and a subapp.swf. subapp.swf is displayed and loaded on demand within superframework.swf using the SWFLoa...

Waiting while SWFLoader loads a swf file

Hi there, Currently I'm working on an application (Flex) which heavily uses external SWFs. I'd like to create a static method which takes a filename as an argument and returns SWF wrapped in some other class. public static function getSWFWrapperFromFile(path:string):SWFWrapper { var loader:SWFLoader = new SWFLoader(); loader.ad...

Need to set cookie header on AIR use of SWFLoader to retrieve remote Flex .swf file

Am coding an AIR 1.5 app in which I want to do a remote load of a Flex .swf file from a web server. I'm using Flex 3.2 SDK and attempting to use the sub-application feature via SWFLoader. I've been referencing the Developing and loading sub-applications document on how to do this. I can indeed successfully load the Flex .swf file from ...

Scroll content in SWFLoader (Flex 3)

Hi. I have to load huge (3000x3000) pictures in SWFLoader, and no problems with that — everything works fine. But on low resolution displays (like 1024x768) i can see only a part of picture. So i need some kind of scroll bars to scroll around a picture. How can I do that? Please help, because i simple have no idea. Thanks! ...

Transparent background for SWFLoader

I created a "Loading" spinner in a SWF. I display this spinner in my main application SWF using SWFLoader. How do I make the SWFLoader transparent? Currently it uses Flex's default background color even though I've set backgroundAlpha="0". My spinner SWF's main MXML: (Note the use of backgroundAlpha) <mx:Application xmlns:mx="http:/...

Flex loads SWF as Sprite. How do I load it as a Movieclip instead?

Hi, I have a problem converting SWFLoader.content into a MovieClip instance while following (TheFlashCanon's excellent tutorial) on making a SWF communicate with Flex. The SWF loaded in question is compiled using Flash CS3 (using actionscript 3). However, when I try to get the content of the SWFLoader and convert it into a MovieClip ins...

How can I get the width/height of a loaded swf's stage in AS2?

I'm using MovieClipLoader to load an external as2 swf file into my as2 flash project, and I'm having trouble getting the original stage size of the loaded swf. When I run the following code: var popup:MovieClip = _root.createEmptyMovieClip("popup", 1); var loader:MovieClipLoader = new MovieClipLoader(); var loadHandler:Object = new Obj...

Flex: how to load a .swf and use its library?

I have a symbol in a .swf's library, with a linkage name of "Pana". The Pana symbol is just a 100 frame animation that I would like to have timeline control over in Flex. So how can I load the .swf and then add the Pana symbol to the display list and control it's timeline? Thanks! ...

How can I use SWFLoader purely from Actionscript in Flex 3 and dynamically load content?

Hi Friends! I'm doing a Flex 3 project wherein I've to load SWF based on the availability of required file. And the loaded SWF file will be placed in a container (a Panel) at a particular location i.e. coordinates. This I don't want to do in MXML as the SWFLoader container shows a cross marked box if the file is unavailable. So friends...

How to load a preloader in Actionscript3?

I want to load a preloader (call it "target app") into my own Flash application (call it "hosting app") via Loader. The target app loads like a typical preloader several other SWF files via relative paths and starts the target app. If the hosting app and the target app are residing in the same directory everything works fine. If the opp...

resize loaded SWF to fit in canvas

Hello, a .fla is 500 x 300. Inside, content moves OUT of the 500 x 300 stage so that it appears like it hides or moves off of the screen. .fla complied... loaded into Flex via SWFLoader: <mx:Conainer width="500" height="300"> <mx:SWFLoader width="100%" height="100%" /> </mx:Conainer> Loaded .swf file shows outside of the 500 x...

Loaded object in ActionScript3 with higher FPS

How can I load a swf in ActionScript 3 with a higher fps than the instance doing the loading with Loader? Thanks! ...

need swfLoader with variables solution please

Hi I am a newbie to as3, i have an external .swf file that is loaded from the flex app with swfLoader. The external swf contains a modifiable URI input field with a clickable button to access that URI value. What i am trying to acheive is moving that URI input field to my flex app, and have the input value from the flex app sent to...

Flex SWFLoader Event.COMPLETE not triggering

While trying to load a Bitmap onto a SWFLoader the Event.COMPLETE event is not being triggered mySWFLoader.source = new Bitmap(Bitmap(someEvent.content).bitmapData); but if I use a URL as source the complete event is triggered: mySWFLoader.source = "http://example.com/123.jpg"; Is there some kind of restriction while using Bitmap a...

How to scale a loaded SWF ?

I want to load a swf into a Flex application and scale it down into a thumbnail-size. I've looked at http://stackoverflow.com/questions/245420/dimensions-of-loaded-swfs-stage, but it does not really address my need: I want to size it and keep all the pieces inside a container. Thanks ...