swfloader

Loading external SWF, cannot cast document class to shared base class

I have a parent SWF file that defines a Widget base class. I then load an external SWF into the parent. The external SWF's document class derives from the Widget base class -- let's call it DerivedWidget for example. The problem is that when I load the external SWF, I cannot cast the Loader.content (shows in debugger as having the Der...

How to access parent movieclip's variable from loaded swf.

Hello, I have a swf which load an external swf. The loader swf has a variable which i want to access from the loaded swf. I use MovieClip(parent.parent).myVar but it return this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at card01_fla::MainTimeline/frame1() The loader swf has...

flex: swfloader - flash file overlaps it's configured size

hi, i'm using swfloader to load swf file in the middle of the screen using the following command: <mx:SWFLoader id="game_swf" source="crazy_counting.swf" x="198" y="0" width="721" maxWidth="721" height="531" maxHeight="531" /> now stage of the flash file takes the exact size that i stated by the flash file itself is overlapping the st...

flex swfloader: can i control the volume of the application i'm loading ?

Hi. i have a flex application that loads flash files using SWFLoader. is there a way to control the audio volume in that swf from my flex application ? ...

flex swfloader: is it possible to add classes and functions to the loaded flash file?

Hi. I have a flex application that loads swf files and displays them using the SWFLoader object. is there a way to provide different classes and functions for the swf application to use? for example. if the swf file that i'm loading has the following function: function testme(): void { trace('test'); } can i somehow override that f...

SWFLoader starts to play SWF without the loading being complete

Hi, I need to play SWF files in my project. These SWF files have background music in them. The which Sound Sync Options of this music in Flash is set to "stream". This is done so that if you pause the Flash movie, the music will pause as well. Now I have a problem when I am loading these SWF files. For this I am using an SWFLoader. W...

detect the size of swf. flex/as3

I'm creating a map that has points of interest. (POI) When a user mouses over the POI an info bubble pops onto the screen and it loads an swf. I currently have 3 problems. My 4th problem is that this is due Monday 21st! so any help would be greatly appreciated! I can't detect the size of the swf so that my infobubble will size itself t...

external swf control flex applicaton?

I have a flex application that loads an external swf file. I created the external swf file using flash cs4 so I can add code to it if that is what it takes. Here is the code I use to load my external swf: //add button swf var request:URLRequest = new URLRequest("http://www.yadayada.com/media/but_button.swf"); var loader3:Loader = new L...

actionscript project compiled as swf. how can i load it with flex and use the functions it provides ?

Hi. I have an ActionScript project with several classes that i compiled as an swf using Adobe Flex (by creating an actionscript project and clicking on export -> release build) Is there a way to load that swf so i'll be able to load it's classes and use them on a different swf ? i know i can use the following code to load an swf file...

flex4: fetch events from loaded swf using swfloader

Hi. I have a master swf that loads a child swf using SWFLoader class. the child swf is connecting to adobe flash media server using NetConnection class. using the parent swf i want to to display status regarding the connection. how can i do that ? ...

flex4: loading flex4 swf using swfloader shows only the loading bar

Hi. I try to load an swf in my flex 4 project using the following line of code: <mx:SWFLoader id="game_swf" source="demo.swf" complete="init()" /> the demo.swf file is another project i created using flex 4. the problem is that when i run the application i see only the loading bar of the demo.swf flash file and nothing else. if i t...

flex: take screenshot from loaded swf from swfloader

hi. can i save a screenshot from a loaded swf using the SWFLoader class ? ...

AS3: How do I add event listeners to objects in SWFs that I'm loading dynamically?

I have a parent SWF (Parent) that handles user navigation between multiple children SWFs (Child_1, Child_2, Child_3). How do I add event listeners to the navigation buttons on the children SWFs so that the user can move laterally between Child_1, Child_2 and Child_3? I can think of two options but can't get either one to work: 1) The...

AS3 transparent background

Hi, I'm creating a game for an assignment and am using Flash CS4. I'm figuring the best way to do this is to create each room setting in a separate file and insert the characters (it's first person, so you only see his back the entire time). I don't want to just animate him for every room because it's basically the same actions he does i...

Flex AIR SwfLoader CPU Usage > 50% problem

I have an AIR application, I use SwfLoader to load another swf file to display in this app. The problem is the CPU Usage always takes over 50%, but it only takes 15% when the swf file runs in standalone mode. Does anyone meet this issue? Please give me some advices. Thanks a lot ...

Loading SWFs into another SWF with a scrollbar class imported from a folder

I'm building a small Flash Projector file. I'm loading external SWFs into a main SWF. The external SWFs will contain a scrollbar (sometimes 2) imported from a folder. The scrollbar works fine in the external SWF, but when I try to all the SWF to the main SWF, I get the following error. I'm still a novice to AS3. [object maschera_8] Type...

can I prohibit users from loading swf files by AS3 / Flash Loader.load() and only allow loading images?

I want to have an AS3 app load images from url supplied by the user. But I don't want a malicious user to be able to load an SWF file in place of the image, such as with an altered extension "maliciousSwf.png". Well, not sure how big a security threat that is above and beyond the ability of the hacker to decompile swf, but I think that i...

Incompatible classes when loading SWF

I have two ActionScript 3 projects, game(.swf) and minigame(.swf). At runtime the main game loads the minigame via Loader. I also have a shared library (SWC) of event classes, included by both, which minigame will need to dispatch and game will need to listen to. First: Is this possible this way? Second: What will happen if I compile t...

Problem Loading AS2 swf into AS3 swf

I've been trying very hard to get an AS2 swf to load properly inside an AS3 swf - but to no avail ... The AS2 file (which is a rather big app referencing many external xml files etc.) works perfectly when launched in Flash Player. When trying to load the same file through an AS3 swf (using URLRequest and Loader classes), the file start...

flex4: swfloader doesn't properly load games.

Hiya. I have several flash games that when i load them in my firefox browser they load fine, but when i load them with swfloader using flex 4 (flash builder) they load until 100% and don't show the start menu. any ideas how to resolve the issue ? ...