ActionScript 3.0 :: Access Children From Loaded SWF With SWFLoader?

Dec 28, 2009

I'm trying to load a SWF I created with Flash CS4 into Flash Builder with the SWFLoader class, but I can't seem to access the loaded SWF's children. Everytime I try to change the property of a child it'll ignore it.
I tried loading the SWF with the Loader class, but it doesn't allow me to add it to the stage. How can I load the SWF and access it's children?My code atm (m is a child of the loaded SWF (SWFToLoad)):

ActionScript Code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

[code]....

View 2 Replies


Similar Posts:


Actionscript 3 :: Access Variables Of The 'main' SWF From A Loaded SWF By SWFLoader?

Jan 31, 2012

I'm working on a website built in Flex, but the SWF file after compiling is very large. The websites has multiple pages. So I thought to create a new MXML project for every new page and load it with SWFLoader. I've found this example:

[Code]...

View 1 Replies

ActionScript 3.0 :: [CS4] Children Inside Children - 1119: Access Of Possibly Undefined Property NumChildren

Jan 12, 2011

I have a Sprite called pageContent. Inside pageContent are 12 more Sprites with unique names, a couple of Buttons, and some TextFields. Inside each of the 12 Sprites I have either one or two TextFields and one TextInput. My question is, since they are children inside a child of pageContent, how can I access them? Here is how I am trying to do it:

[Code]...

In my mind, this should totally work. But surprise, surprise, it doesn't. I have debugged it and it works fine for the first two lines, but when it tries to get numChildren of a Child of pageContent (line 3), I get this error: PHP Code: 1119: Access of possibly undefined property numChildren through a reference with static type flash.display:DisplayObject.

View 4 Replies

Flex - Access Children Of Children Recursively?

Mar 10, 2010

I have a Canvas which has many components inside it and those again, have many components inside them.

getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on).

Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this?

View 3 Replies

Actionscript 3 :: SWFLoader Loading Subapp That Access It Own Resource?

Feb 27, 2012

I'm having the following problem when I'm loading a swf inside a swfloader. That thing is that this subapp has a config file, and when this config file is being accessed by the subapp it throws an Security error (#2148).I thought it was the crossdomain.xml file, but it has no reestrictions:

I suppose that the subapp is trying to access a config file that is in the swf parent server insted of trying to access its own file in the server where it is installed; how to make this swfloader access its own data,

View 1 Replies

Flex :: Take Screenshot From Loaded Swf From Swfloader?

Dec 27, 2009

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

View 1 Replies

ActionScript 3.0 :: SWFLoader Does Not Start Playing Loaded SWF

Oct 15, 2008

I'm building an application that's basically a frame in that another SWF file is displayed. My application loads SWF files generated by a server and displays them. As memory consumption increases over time, it it necessary that I unload the current SWF from time to time and replace it with a new SWF. I use SWFLoader to load the remote SWF file. I create a new SWFLoader object for each new SWF and remove the old SWFLoader as soon as the new SWF can be displayed. Now my problem: SWFLoader sporadically does not start playing the loaded SWF. All of the SWF files that I load start with the same set of instructions. When all goes well, the SWFLoader gets some ProgressEvents and then an Event.INIT. After that the SWF starts playing. In some cases, however, I only get the progress events, but the INIT is never fired. In that case the SWF doesn't start playing. The number of bytes received reported by the progress event is the same as in the case when it goes right.

View 1 Replies

Flash :: Swfloader: Catch All The Exceptions From The Loaded Swf?

Feb 9, 2010

I am loading a swf into another swf using swfloader, I want to catch all the exceptions thrown by the inner swf, is it doable?

View 2 Replies

Can't Seem To Listen For UncaughtErrorEvent For SubApplication Loaded By SWFLoader

Jul 27, 2011

I have a main Flex Application ('A.swf') loading a SubApplication (defined in' B.swf') via a SWFLoader and I need to listen for UncaughtErrorEvent from the SubApplication. I'm not able to get my event listeners to be called when I throw an error from within the SubApp ('B.swf').After reading the asDoc for UncaughtErrorEvent and UncaughtErrorEvents I have added an event listener to A.swf's loaderInfo (The 'outter' main app) and also to B.swf's loaderInfo (though the Docs say not to do it here it is part of the event sequence in the capture and bubble phase...) as well as the SWFLoader internal FlexLoader.uncaughtErrorEvent (per Docs) like so:[code] The event listener setup on the Loader.uncaughtErrorEvents is not firing when SubApplication in B.swf throws an error. Instead the listener on the main app's (A.swf) loaderInfo fires. Moreover, the event recieved by A.swf's loaderInfo has an eventphase equal to 'EventPhase.AT_TARGET' which the asDoc says should only be dispatched in the capture and bubble phases.

View 2 Replies

Flex :: Can A .swf Loaded With SWFLoader Propagate Events To The Parent Application

Aug 2, 2010

I am building a compartmentalized Flex application which uses <SWFLoader > to load additional Flex applications inside it. I am currently planning on using the LocalConnection class to have these two applications talk to each other, but I'm wondering if there's any kind of event driven way to have actions in the internal application propagate to the parent application, and/or any way for the parent application to trigger events in the internal application?

View 1 Replies

Actionscript :: Call Functions Inside The Swf File Loaded In SwfLoader Of Flex App?

Nov 18, 2010

I have a swf file sample.swf which has its actionscript class in Main.as. This Main.as has various objects declared as public in it. For instance lets consider an object myData of class MyData (in MyData.as).

I am loading this swf file in my AIR app using swfLoader. I want to know how do I access myData.func() using swfLoader.loaderInfo.content.

View 2 Replies

WebKit Browsers :: Error In Flex Webapp With TabNavigator Loaded Using SWFLoader?

May 19, 2011

I use a flex app (A) to load another flex app (B) using SWFLoader (both built using Flex Builder 3 sometime ago).Everything works fine as expected across all (IE, FF, Chrome, Safari) desktop browsers.However, if I use a TabNavigator within the flex app (B) then when you click on any of the tabs it unloads the flex app (B) and re-starts flex app (A). This behaviour appears to be limited to Webkit based browsers (Chrome & Safari) the rest of the browsers (IE, FF) work fine.

View 1 Replies

Actionscript 3 :: Pause/play/stop A Dynamically Loaded SWF Using SWFLoader Component In Flex 4?

Mar 24, 2012

I have a situation where I am loading an SWF (using URL as source) using the SWFLoader component in Flex 4, and now I need to implement Pause/Play and Stop functionality.

View 1 Replies

Flex :: SWFLoader - Child Apps Couldn't Access Certain Objects That Were Instantiated By Another Child App?

Aug 23, 2010

i have problem with swfLoader in flex, when i close following code in click method i can easly add many swf to main application

<mx:VBox id="content" width="100%" height="100%" ></mx:VBox>
public function doIT():void
{[code]....

when i close adding those swfs in loop i have the same error, it looks like child apps couldn't access certain objects that were instantiated by another child app, so what can i do?

View 1 Replies

ActionScript 3.0 :: Can'#t Access Children?

Feb 1, 2010

I have a simple class to create some buttons:

Code:
package {
import flash.display.*;[code]....

brings up "access of possibly undefined property" I do have other mcs etc within that container which don't have a ref but also trace (this.container.getChildAt(5).ref) doesn't work and I know number 5 is one of the ones that does have a ref.How do I use the ref to target the buttons.

View 2 Replies

ActionScript 3.0 :: Children Access From An External Swf?

Jul 25, 2011

I'm trying to access the childrens from an external swf previous loaded. This swf is a movieclip exported as swf which has two movieclips inside also.It loads the movieclip, but when I try to access to his childs, there is no one. What I'm doing wrong? I'm missing something when I export or load in AS3? I'm loading the swf as:
 
itemLoader = new Loader();
itemLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, itemLoaded);
 itemLoader.load(new URLRequest("path"));[code].....

View 13 Replies

Flex :: Access Children Elements In A SWC?

Feb 17, 2010

Does anyone know if its possible to access children elements in a SWC? I have created some MC's and inside of some of these MC's I have some dynamic textFields. I export the content to a SWC and load it into my Flex project. No problem loading it or accessing the parent elements, they display fine. But I want to access the textfields nestes in the MC's and modify the text. When I debug the app, I can see the textfields as child elements. It's typed as a TextField and the Instance Name is the same as input in the Flash IDE but I cannot access it. When Flex compiles it throws an error saying it doesn't recognize the method. I've tried to insert actionscript on the timeline, linked external classes and nothing can be accessed.

View 3 Replies

ActionScript 3.0 :: Access Children Of Movieclip?

Sep 20, 2011

I have multiple MCs which im creating and storing them into arrays for access. Whilst I create these MCs, I am also putting bitmaps inside them. When I access my MCs later, I wish to access these bitmaps too - but I cant seem to write the syntax to reference them.

Code:
//within my loop
mcs[i] = this['mc'+i];

[code].....

View 5 Replies

ActionScript 3.0 :: Xml.children() Returns Grand-children And Gr8-gran-children?

Nov 18, 2009

I'm making a OSX-finder-type file browser in CS4.The Structure for the folder and files is being generated by a PHP in a XML, heres an example:(sorry the xml is not sorted, but the command i'm using in php doesn't sort it)

Code:
<root>
<dir name="images">

[code]....

View 2 Replies

ActionScript 3.0 :: Access Dynamic Movieclip Children?

Oct 5, 2009

There is a lot of code that I have but here is snippet to get to the point.  I have created a Movicelip called via actionscript called "McButton".  Then I created 10 MovieClips within that MovieClip ("McDot0", "mcDot1", etc). I need to know how to access mcButton.mcDot3 to change its color when button3 (mc already on stage) is clicked but can not figure it out.[code]...

View 2 Replies

Actionscript 3 :: Access All Of Children Of A DisplayObject Programatically??

Nov 16, 2010

How do access all of the children of a DisplayObject using code? (I'm looking for something like movieclip.children)

I'm using this in two cases:

1) To loop through and reposition all of the children of an enclosing MovieClip.

Or

2) To loop through and delete all of the children of a MovieClip

View 3 Replies

Flex :: Access Children Nodes By Attributes?

Sep 8, 2011

I am trying to create an image gallery :

<card>
<product catalog="Thread Works">
<name>AK E001</name>

[Code]....

I can access the attribute, but if i am selecting "Thread Works" i want only access <product catalog="Thread Works"> with children node , for additem to array collection

View 3 Replies

Flex :: Cannot Access ArrayCollection's Children In Datagrid

May 22, 2009

I've got a Flex 3 application with an HTTPService returning an Atom feed. I catch the result from it and store it in an arrayCollection which is then the provider of my Datagrid. I have no problem accessing the data from the "first-level" of my Array, but cannot go under it. Not very clear, so here is some code:

My XML [part of it]:

<entry>
<title>Test 2</title>
<id>http://collaboration.*****.com/collaboration/messaging/feeds/****/todo//7D6637D3E86B3ED3C12575B***8479</id>
<link rel="alternate" href="notes:///C12575B4004***8

[Code]....

The "title" column shows the data correctly, but the status column is empty ! When I launch my app in debug mode, I can see that my notesArray has the correct format and I can access todo -> status with the value..

View 3 Replies

ActionScript 3.0 :: XML Parsing: Can Not Access Element With No Children?

Feb 20, 2009

Trying to parse the following XML:

Code:
private var pbStr:String = ( <![CDATA[
<phoneBook>

[code]....

View 2 Replies

ActionScript 3.0 :: Accessing MC Children By Name On Loaded SWF

Jul 14, 2010

Im loading SWFs into my AS3 application. My SWFS are all the same and contain this structure:

root
-item
--color
--overlay

When i load up a SWF file into AS3, This is analogous to the root. So i can say:

[Code]....

I have tried everything i can think of to access this second depth by instance name. Whats wierd is that MovieClip(loadedSWF.item).numChildren returns 2. So Flash knows that theres 2 MovieClips inside of item.... But it just cant reference them by instance name. Since loadedSWF.item works, i assumed that loadedSwf.item.color would work too.

EDIT: I seem to be able to access the MC via getChildAtIndex(0); However this isnt ideal because it create a rule for the designer that he must follow a layering order. Id prefer to do it by name.

View 0 Replies

Actionscript 3 :: Accessing Children Of Loaded Swf In Flex Image Component?

Mar 15, 2010

enter code hereI am loading an external swf into an component. It loads everything fine and I can see buttons working in the swf, I can add a movieclip to the but I can't then access that movieclip (or don't know how), and it keeps telling me numChildren = null when I try to trace it out. This is set up as a custom component like this:

<cynergy:imageZoom
id="zoomComponent"
borderStyle="solid"
source="{_data.map.@url}"

[code]....

how I would access the children in the loaded movieclip?I have tried

mycomponent.image.getChildAt(2) and it returns and error that the index is out of bounds.

View 1 Replies

Flash :: Can't Remove All Loaded Children In A Gallery Because Can't Close() A Loader?

Jun 15, 2011

My problems comes in when you have to open a different image album and have to eliminate all the previously loaded children in the movieclip. When i load a new album i used a code you posted here: AS3 How to remove previous loadersbut the problem is that sometimes the user leaves the album page before ALL the pics laod so when they click on a new album to open it a new image is placed somewhere else cause the loader has already been launched. I've tryd to close() the loader but it doesn't seem to work.Here you can see the working site to see what im talking abouy you have to click on an album, leave before all the pictures load and open up another one.

getImage(dataList[0].file)
function getImage(href:String):void {
var loader:Loader = new Loader();

[code].....

View 3 Replies

Actionscript 3 :: Externally Loaded Swf To Control Stage And MovieClips And Their Children?

Mar 10, 2012

I have 2 swf files. One is loaded and loading an externally loaded swf into it.Here is the code in the first loaded swf: #1

var logo:Loader = new Loader();
logo.load(new URLRequest("images/Logo.png"));
logo.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadLogo);
function LoadLogo(e:Event):void

[code]....

EDIT:I am having major SANDBOX issues now when I make the clip load from an external URL. I am also coding for an ANDROID using FLASH CS5.5. Its not allowing me to use Security.allowDomain("*");

View 1 Replies

ActionScript 3.0 :: Can't Remove All Loaded Children In A Gallery Because Can't Close() A Loader

Jun 15, 2011

0 down vote favorite

This is the code i used in a gallery that loads images sequentally. My problems comes in when you have to open a different image album and have to eliminate all the previously loaded children in the movieclip. The problem is that sometimes the user leaves the album page before ALL the pics laod so when they click on a new album to open it a new image is placed somewhere else cause the loader has already been launched. I've tryd to close() the loader but it doesn't seem to work. Here you can see the working site www.barbarabritvin.com (to see what im talking about you have to click on an album, leave before all the pictures load and open up another one.

getImage(dataList[0].file)
function getImage(href:String):void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, imageReady);

[code]....

View 1 Replies

ActionScript 3.0 :: Multiple Children Spawned With Timer Makes Old Children Inactive?

Mar 24, 2009

In this game attached I need the old Children (rats) to hurt the character when he walks into them, however only the most recently added Child is active in that way... also the rats seem to appear above the character instead of below, is there any way to resolve these issues??

View 4 Replies







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