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


Similar Posts:


Flex :: Accessing Children Of A List Component?

Apr 15, 2010

when I try to loop through the children of a List component that has buttons in it, I can't seem to access those children. I try

for(var btnNum:Number = 0; btnNum < myList.numChildren; btnNum++)
{

trace(myList.getChildAt(btnNum);[code]......

View 1 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

Flex :: Tell When A Component (and It's Children) Are Done Updating?

May 28, 2011

I'm resizing a chart and want to take a picture of it when all the children of that chart are done updating.

For example I'm drawing some stuff on the chart after the size changes. I've tried chaining a bunch of callLater() but I'm still running into problems on slow computers.

Raising an event when the last children has executed doesn't seem to work as it might take a while to draw (hence the callLaters).

Is there a best practice to find out when something is done updating?

View 1 Replies

Select Children Node In Flex Tree Component?

Aug 1, 2011

If i want check parent node checkbox means below childerns checkbox will select automatic .[code]...

View 2 Replies

ActionScript 3.0 :: Accessing Children Of Children

Jan 11, 2011

for some reason STORAGE[0].getChildAt(0) works whereas liner.getChildAt(0).getChildAt(0) does not. STORAGE is a movieclip and a child of liner. the error is something about not being able to use getChildAt on a display object. what's wrong? is there any other approach i could use? PS: liner.getChildAt(0) works and does indeed seem to refer to STORAGE[0]

View 2 Replies

Flex :: Setting Up Content Children For Custom Mxml Component

Dec 9, 2009

I am trying to develop a custom component to act as a divider.

[Code]....

I would like to use this component to assign objects like this:

[Code]...

Unfortunately, this does not work. I get a compiler error saying: In initializer for 'left': multiple initializer values for target type mx.containers.Canvas.

View 1 Replies

Actionscript :: Hiding Nodes In A Flex Tree Component Keeping The Children Visible

Apr 9, 2011

I have a tree with a dataprovider which takes the following form:

<details name="Cars">
<contact_person>aaaa</contact_person>
<list>

[Code].....

That is I want to hide the contact_person and list nodes.Deleting the nodes from the dataprovider cannot be done.So what i did was to create a custom tree data descriptor by extending DefaultDataDescriptor.Then override the getChildren method and applied a filterfunction to the collection returned by super.getChildren.The problem is when i hide the 'list' node I cannot have the child nodes to show up.So is there any way I can hide 'list' but show the children of 'node'?

View 1 Replies

Flash :: Flex 4.5: Tree - Make A Flex Tree Component Display The Children Of A Sprite In A Hierarchical Way

Nov 19, 2011

I'm trying to make a Flex Tree Component display the children of a sprite in a hierarchical way. Moreover, dragging the items on the FlexTree would resort and reparent the items. I have special Elements set as Folders. This would allow other elements to be added there as a children by dragging an element on the tree and dropping it there. I have a failed attempt which works, but breaks when I try to add folders. Basically, it fails at reparenting the items by dragging and resorting folders and that Does anyone know of a component or something which can do this, has anyone have created any of this or could anyone give me a clue?

View 1 Replies

ActionScript 3.0 :: Flex - Accessing TextWidth Of A Text Component?

Mar 25, 2010

Code:
import mx.core.mx_internal;
use namespace mx_internal;

[code].....

View 5 Replies

ActionScript 3.0 :: Flex Accessing Applications View State From Component?

Sep 26, 2009

In Flex Builder 3, I am trying to access the main applications view state from within a component.On initialize I show the Loginpage-component. When I click the login button I want to hide the loginpage and show my "controlpanel" page, which also is a component.I try with this, and also placing this function in the main application.[code]

View 1 Replies

Flex :: Accessing Root Of Loaded Swf?

Mar 4, 2012

I have a SWf application built in flex 4. One part of the application relies on accessing a public variable ("step1") set at the application root, and is accessed with

var app:Object = FlexGlobals.topLevelApplication;
trace("step one is "+app.step1);

This, while not optimal, has worked fine. Now, hoever, I need to load this entire application into another application, and I can't figure out how to access my step1 variable any longer.I have been loading the swf into the new parent application like so:

public var myLoader:Loader = new Loader();
public var pizzaContainer:UIComponent = new UIComponent();
private var myUrl:URLRequest = new URLRequest("chickensoup.swf");

[code]......

View 1 Replies

Actionscript 3 :: Flex 4 Accessing Public Method In Main Application From Component

Sep 13, 2010

I need to be able to call a method from a component located under the main application in Flex 4. Can anyone tell me please how to do this without using FlexGlobals please?[code]

View 3 Replies

Accessing A Class From An Externally Loaded Flex SWF?

Apr 23, 2011

Using Flex 4, I have created an SWF that has the following code:

<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import com.Index ;
protected function start(event:FlexEvent):void

[Code]...

View 1 Replies

Java :: Flex Accessing Https Service Of The Same Domain That Swf Is Loaded

Aug 2, 2011

I am developing a flex application with flex 4.1 sdk and java backend (runs on Glassfish 3.1 via http). For security reasons I decided to move my authentication process to https until a session id is obtained. Therefore I changed the filter settings to use ssl for login and logout pages(just two pages due to performance reasons. The data-size sent to client is large and I do not want to slow down the system). Glassfish forwarded these pages to 8181 port (which is HTTPS port). Everything is ok for the java part. However flex defines the 8181 port as a different domain and then problems arise. Due to flash's same-origin policy it cannot load the secured content. Normally a crossdomain.xml is the solution but I am accessing content of the same domain through a different port. What will be the solution ?

View 1 Replies

Actionscript 3 :: Accessing An Array Of ColorPicker Values In A Loaded Swf In Flex?

Oct 18, 2011

I have a flex application that dynamically loads swfs and I want to to use a set of color pickers in an external component within the application to determine a color array in the loaded swf.

I figured that I can use a new array of the colorPickers, i.e.

public var colors:Array = new Array [ cp01.selectedColor, cp02.selectedColor, cp03.selectedColor, cp04.selectedColor, cp05.selectedColor]

Is it possible for the swf to read the Array if it's set up like that? If so what would I put into the swf to get it? If not what do I need to do?

View 1 Replies

ActionScript 3.0 :: Flash - Accessing Parents And Children?

Oct 19, 2010

Okay, here is the relevant files for a game I am making and their structure: -Stage -->MainMenu.as --> NewGame.as --> beachArea -->barrel.as.................................................. ......-->player.as.................................................. ......--> pistolBullet.asSo, am trying to detect when a bullet hits a barrel. I was going to use the hitTestObject() functionI got as far as trying to actually access the properties of an instance of barrel from the pistolBullet.as and seem to be a little confused as to my findings.. Can anyone explain to me why the last trace function returns undefined?pistolBullet.as:

Code:
trace("pistolBullet.parent: " + this.parent);
trace("pistolBullet.parent.beachArea: " + MovieClip(this.parent).beachArea);

[code].....

View 1 Replies

ActionScript 3.0 :: Accessing Children Added To An Object?

Jan 23, 2010

How do you access a child that has been added to an object?For example if I have a movieClip on the stage and I add a child to it, how do I then access that child?

Code:
var newClip:MovieClip = new MovieClip();
newClip.addEventListener(Event.ADDED, checkClip);

[code]......

View 4 Replies

ActionScript 3.0 :: Flash Accessing Parents And Children?

Jul 23, 2011

Okay, here is the relevant files for a game I am making and their structure:

[Code]...

View 2 Replies

Action Script :: Flex Accessing <mx:Image> From Class?

Apr 14, 2011

I want to draw something on an <mx:Image> I have in my .mxml file, but I want to keep my drawing implementation in a separate AS class.

View 4 Replies

ActionScript 3.0 :: Accessing Children Of Dynamically Added MovieClip

Jan 8, 2011

Code:
function saveAction(evt:MouseEvent):void{
var choice=evt.target.name;
var inputText:String = saveName.text;
}

I have this and I am trying to make a variable from the contents of the input box. Simple ya? The issue is that it is a child of another clip that is being added dynamically, so it doesn't think the input exists. How do I declare the input? How can I target it's contents? Also I have a remove function that is meant to remove this same parent clip.

Code:
function closeSaveWindow(evt:MouseEvent):void{
removeChild(saver);
}
'saver' is a variable created in another function, so I think there is a scope issue there. To try to fix that I declared 'saver' as a movie clip as a global var.

View 1 Replies

Actionscript 3 :: Sandbox Violation While Accessing Image Files In Flex 4

Aug 12, 2011

I'm working on an image gallery application. Very frequently I'm getting Sandbox violation Error like Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.. Some times its raising by cleaning the project. Every time I'm using my application's backup and updating and then the error is raising. Though I'm accessing local image files, getting error. I'm using try-catch to catch the location but no use.

View 2 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 :: Add Children To Accordion Children In Flex 4?

Oct 28, 2011

I have an ArrayCollection that is read to generate containers in an accordion programmatically:

<s:ArrayCollection id="_ac_ps">
<fx:Object label="Block and lot" data="_blocklot" searchType="districtblocklot"
info="" />

[code].......

View 1 Replies

Image :: Get The Loaded Image Path In Flex?

Feb 29, 2012

want to get the loaded image path location,how to get the path

<mx:Image source="@Embed('assets/image001.png')" x="240" y="41" width="148" height="118" id="img"/>

i need to get this address source="@Embed('assets/image001.png')" how?

View 1 Replies

Flex :: Add A Image To Header Of Flex Panel Component

Jul 24, 2009

I want to replace the default title of the header with my image in Flex Panel.

View 2 Replies

Flex :: Generate A Flex Image From A Hidden Component?

Jan 20, 2010

I'm trying to put an image, generated from some text, in a RichEditableText. Since it's a styled text, I thought about putting it another RichEditableText, style it, then print it to a Bitmap to use as source for InlineGraphicsElement.I use the following code to do that

var txt:RichEditableText = new RichEditableText();
txt.text = name;
// Appliy given styles to the text flow of input rich editable text

[code].....

View 2 Replies

Flex :: FLVPlayback Component Freezes When Seeking Beyond Loaded Content?

Mar 12, 2010

I'm creating a flex-based video player, using the FLVPlayback component (imported from Flash Pro CS3). I've reskinned all of the player controls and linked them in, and it's all working really well...However, if you try to seek beyond the point where the video has loaded (it's using progressive download), the video completely freezes. You can no longer pause, play, seek to somewhere else, or anything. I understand it can't actually play a point in the video that hasn't been downloaded, but the whole thing seems to just become unresponsive

View 1 Replies

Flex :: Saving An Image Of A Component?

Oct 7, 2009

Im currently trying to work the imageSnapshot function in flex. Ive been looking hard but I cant seem to find a solution to my problem. I wish to take a screenshot of one of my components, to capture the final output of my program, since a plain "printscreen" cuts off some of the output due to it scrolling. My current code looks like -

<mx:ApplicationControlBar dock="true">
<mx:Button label="Take snapshot of Profile"
click="takeSnapshot();" />

[Code]....

Now i think this is taking the image of the viewstack which I want... But Im stumped on what to do from here! Is it not possible to now just copy the image to the clipboard, or produce a new window in my browser with the entire image inside?

View 3 Replies

Javascript :: Image Editor Component In Flex?

Sep 12, 2009

I'm looking for a simple Flex or JavaScript based image editing component which can be embedded in a web application. It shouldn't be a web service but rather a component that I can download and customize (i18n etc.).I only need some basic features: most important is cropping, optional features would be rotating and adjusting brightness/contrast

View 4 Replies







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