Flex :: Does Disabling Parent Component Affect Its Child?

Aug 30, 2011

I have many buttons in HBox. Instead of disabling each button, I've disabled HBox. But I am able to click buttons even though the HBox is disabled. Disabling parent component will not make difference on its child? it shows like disabled but mouse events will generate.

View 1 Replies


Similar Posts:


Flex :: How To Access Variable In Parent Component From Child

Sep 18, 2010

I have a public variable set within fx:Script tags in a parent component that I'd like to access directly from a child component. How can I do this? I don't want to pass the variable to the child component (I know how to do this and am currently using this approach). Following is a simplified version of the mxml:

Note: SimpleComp is an HBox with a couple of lists.
<mx:Accordion>
<comp:SimpleComp/>
</mx:Accordion>

View 4 Replies

ActionScript 3.0 :: Child Swf With Component Loaded In To Parent Swf

Feb 13, 2010

I have an elearning course, a .swf, that loads multiple .swfs as the user progresses through the course. At the end, there is a quiz.

The quiz.swf uses the radiobutton component. I have developed some custom skins to use on the radiobutton component. I have figured out that:
I have to add an instance of a radiobutton in the main .swf for the radiobuttons in the quiz .swf to show.I have to copy the radiobutton intance from the quiz swf library to the main swf library if I want my custom skins to show in the quiz swf While, this works fine. It is not practical. I want the quiz.swf to more modular. So I can pop it in to any course and not have to go back in and add the radiobutton skins to each course.

View 2 Replies

ActionScript 3 :: Drag And Drop Child Component In Parent

Oct 18, 2011

I need to drag the child component in the parent such a way that the child component can replace the place they have in parent. E.g. If I have a 3 button a,b,c inside a panel and need to movie the position of a,b,c with drag and drop the placement could be b, a, c or c, a, b and so on.

View 1 Replies

ActionScript 3.0 :: Parent.removeChild(child) Doesn't Update Parent Width / Height When Child Was Rotated

Jul 29, 2011

I got a Parent Sprite, let's name it SpriteP, which holds inside it two other Sprites. Sprite1 and Sprite2.[code]Sprite2 is a rectangle. When I rotate it, of course, the height of its parent, SpriteP, GROWS. But I would expect that height to go back to what it should be when I'm removing Sprite2!And it does! If I remove Sprite2 while NOT being rotated, the height of the parent drops back to normal, 200.

View 10 Replies

ActionScript 3.0 :: Child-parent Relationship \ Adding Them All As Children Of The Stage And Creating A Parent-child Hierarchy Between Them?

Jun 6, 2011

i am slightly confused about the parent and child relationship. lets assume we have several different instances, what would be difference of adding them all as children of the stage and creating a parent-child hierarchy between them(other than the access path).

View 5 Replies

ActionScript 3.0 :: Parent.removeChild(child) Doesn't Update Parent Width/height When Child Was Rotated

Jul 29, 2011

I got a Parent Sprite, let's name it SpriteP, which holds inside it two other Sprites. Sprite1 and Sprite2.

When Sprite2 is NOT rotated:

Code:
trace(SpriteP.width + ' ' + SpriteP.height); //100 250.
SpriteP.removeChild(Sprite2)
trace(SpriteP.width + ' ' + SpriteP.height); //100 200. -> works, 200 is good.
When Sprite2 is rotated at 90:

[Code].....

And it does! If I remove Sprite2 while NOT being rotated, the height of the parent drops back to normal, 200. But if I rotate Sprite2, the Parent won't update its bounds.

View 1 Replies

ActionScript 3 :: Imported Enabler Component In Both Parent / Child Asset Files

May 24, 2010

I've just started to work with DoubleClick Studio. I've successfully created a Flash expanding ad with CS4 that is mostly scripted and uses the Document class option. Now for some reason the back end of DoubleClick Studio thinks I've imported the Enabler component twice. I've checked my files numerous of times but can't find the root cause.

View 1 Replies

Flex :: 4 - Null-component - Checking If The Cancel Button Component In The Child Component?

Jun 23, 2011

I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:

[Code].....

so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?

View 1 Replies

ActionScript 3.0 :: Positioning Parent MC In Order To Center Child MC On Parent's Parent MC

Feb 5, 2010

[code]All clips are squared.Ok, on the PlayerPlane, there are little soldiers, which have hotkeys. The effect I'm trying to create is I want to position the GameStage so that the currently selected soldier appears in the center of the GameClicker clip.The GameStage is movable by the player (to scan other areas of the map)by holding the CTRL key, so it's easy to kinda lose track of where your players are.I have tried using localTo Global and globalToLocal techniques, but I think I'm lost on the actual math of getting the GameStage to move the correct distance so that the selected soldier is centered to the GameClicker.[code]

View 2 Replies

Actionscript 3 :: Scaling A Container Does Not Affect Width Of Child

May 26, 2011

I've got a container(sprite) with children(sprites) added to it. When I scale the container, I would like to get the new width of a child, but when I trace the children's width I always get the original dimensions, even though everything gets visually scaled as it should. How do I overwrite the children-width ?

Update: I just found out that the children.graphics-"dimensions" could have caused the problem. When I leave the graphics, everything seems ok. Is it possible to scale the graphics at same time as the child-sprite?

View 3 Replies

Flex :: Get The Value From An Mxml To Another (child To Parent)?

Aug 15, 2011

how do I get a value from another mxml.I have a vaule in the child mxml that i would like to parse to the parent mxml.Then use the vaule to create a search method.

View 1 Replies

ActionScript 3.0 :: Remove Parent.parent.parent Child?

Jan 3, 2010

I got a "preloader" that creates an movieclip and loads an SWF. Now in the loaded SWF i want a close button to go back to the "preloader". The preloader isn't an actuall preloader but some sort of mainclip.Now i tried this:removeChild(MovieClip(e.currentTarget).parent.pare nt.parent)But i get error:ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display::DisplayObjectContainer/removeChild()at MethodInfo-6()

View 1 Replies

Flex :: Force A Resize From A Child To A Parent?

Jul 22, 2009

I have a page-like flex application. In my main application is a holder (a canvas) that displays all the pages. The problem is that the components that are loaded inside the holder are bigger than the holder is when the main application starts. The holder height is set to 100% but still he gets scrollbars when I load a bigger component inside of him then himselHow can I solve this problem? And if it isn't solvable would it work correct if I use a viewstack?the holder looks like this:

<mx:canvas height="100%">
</canvas>

But the end of the application is 500 pixels lower so canvas height is 500 pixels high. Now I put a new child inside the holder that is 1000 pixels high.

View 2 Replies

Flex :: Move The Child Only Inside The Parent?

Feb 4, 2010

Recently I worked in a project using Flex. Its a Photo editing project. I have took a Canvas and take a image in that canvas using the code canvas.addChild(image) . Now i can move the image freely by using moving code. The image move inside the canvas and outside the canvas. I want to move the image/child only inside the canvas not outside. How can i do this?

View 1 Replies

Flex :: Call Child Function From Within Parent?

Jun 1, 2011

Is it possible to call a child function from within the parent? I know to go child > parent, you can do parentApplication.functionName(parameters);, but what about going the other way... that is parent > child?

View 2 Replies

Flex :: Parent Not Executing Child's Function

Jun 7, 2011

I have a main.mxml, child.mxml and headermenu.mxml. I click a button on the headermenu that dispatches an event up to the main.mxml which then executes a method in child.mxml. I know this works because I put an AlertDialog in the function I'm calling inside of the child.mxml. The child.mxml contains a drawingArea object that has an erase(). When I call this directly from child.xml it executes, however if I put drawingArea.erase() inside of the function being called by child's parent (main.mxml) nothing happens.[code]...

View 1 Replies

ActionScript 3.0 :: Disabling Mouse Actions On Parent But Not Children?

Jun 25, 2010

I'm facing a problem with drag & drag actions on children mc. The parent sometimes moves too.How can I disable any reaction of the parent, without affecting children?

View 1 Replies

Flex :: Null Cast Between Parent And Child Objects?

Mar 1, 2011

I have a flex application with two objects: a parent widget (called an IBaseWidget) and a child widget (called a HelperWidget2).When the user clicks on a help link, a helper widget is loaded into the list of base widgets and then displayed for the user.However, when I try to access this child widget by casting the base widget in the collection to the child widget type,the child widget returns null and I am unable to work with the widget.The following snippet correctly returns the widget ID of the newly added widget and dispatches an event to load the widget:

var id:Number = WidgetManager.getInstance().getWidgetId("Helper");
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, id, openQuickQueryCanvas));[code].........

The problem is that helperWidget above always returns null, meaning the cast isn't successful.

View 1 Replies

Flex :: Actionscript 3 - Detect The Child Element Of A Variable Parent In E4X?

Jul 20, 2009

I have XML that looks like this:

<question>
<type_elt>
<opt_out_flag />
</type_elt>
</question>

type_elt is not an element name; it might be <single>, <multiple> or something else, determined at runtime. How, given this, can I detect the presence of the opt_out_flag element?

I tried this (where xml refers to the question element):

if (xml.*.opt_out_flag) {
do_something();
}

but even in cases without opt_out_flag the above expression returns true. Obviously I'm missing something, but what is it?

View 5 Replies

Flex :: Play Resize Effect On Parent Before Adding Child To It

Apr 19, 2010

I have a panel with a button in it. Clicking on the button will direct the panel to state "State2" adding another two buttons into the panel. During the state change, I want the panel to resize first and then show the newly added two buttons, so I applied transitions onto the state change.

My question is:

If I put the two buttons within a HBox directly under the addChild tag, it works fine. However, if I create a new component with the same code (HBox with two buttons in it) and then add the new component to the panel (Comp in the code commented), it won't show the resize effect.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">

[Code].....

View 1 Replies

ActionScript 3.0 :: Add A Clip To The Stage As A Child And Remove The Parent And Set The Parent Equal To Null?

Sep 11, 2010

if I add a clip to the stage as a child and remove the parent and set the parent equal to null, does the child get collected and removed from memory? What if the child has an image loaded into it as its child? 

In my application I'm loading a series of png images as overlays that can be tinted for customizing in this app. When I trace my memory, the basic app idles at 64,000 k. The exact second I load those overlay images it goes up to 205,000k. If I remove those clips and "clear" the stage I should go back down to 64,000 k if everything is removed and collected correctly, right? It's not, it's hanging at 215,000 k. Are my images being cached and that is the reason for the memory staying up? If so, how do I prevent that. Or upon removing the parent of the image how can I un-cache the image.

If a user switches between models and loads several different items then the application actually crashes the Flash environment because of too much memory usage. It also does the same to browsers.

View 29 Replies

ActionScript 3.0 :: Tab Indexing Loop Through Parent, External Child Swf, Back To Parent?

Nov 11, 2009

I have a parent swf which loads many child swfs (though only one is displayed at a time). My intention was to use the loaded SWFs document class to retrieve an array of objects to be assigned a tab index, combine this with the parent's own array of objects and apply sequential tab indices to them all. But what happens is actually that the parent's objects are assigned an index, but the external swf is unaffected. In fact, the external swf retains its automatic tab indexing, when I would expect that having set a value for InteractiveObject.tabIndex, automatic tab indexing would be disabled.

I've seen similar tales elsewhere. Most posts I've read are wanting to load an external swf, give it focus and loop through those objects, then close the swf and return to looping through the parent. However I would like loop through all objects as one. including manipulating the focus manager(s), and basically fiddling with every tab-related property I know.

View 2 Replies

Flex :: Why Does Matrix Transform Snap Child Back To Top Corner Of Parent

Apr 14, 2011

I'm having trouble with Matrix Transforms in Flex.

I have a Flex Canvas with nothing but an Image in it, like so.

<mx:Canvas>
<mx:Image id="img" source="/some/Url" />
</mx:Canvas>

[Code].....

View 5 Replies

Unable To Send Variable From Flash(parent) To Loaded Flex Swf(child)?

Mar 27, 2012

i am trying to load the variables from parent(flash) to child(flash).Its working fine,.

parent swf:(flash)
var parentMessage:String = "Hello";
var swf:MovieClip;
var l:Loader = new Loader();

[Code].....

View 4 Replies

Actionscript 3 :: Make Flash Builder Component Affect Main Application?

Feb 7, 2011

I have my main application, which contains several instances of a component that create a grid of photos belonging to a certain category. (the grids, and the photos are created dynamically with a loop).

I'd like to be able to click a photo to run a function that loads the large version of the photo into a separate element that is contained in the main application. So I created a Photo component in my main application, but how, using actionscript, do I change the 'currentphoto' variable in my main application from inside the tileview component?

Alternately I could put the function in the main application (probably more logical in the long run), but how would I call it from the child component?

View 1 Replies

ActionScript 3.0 :: SetChildIndex And SwapChildren - On Mouse Over Set The Parent Of The Moused Over Text Field To The Highest Depth Child Of Its Parent

Sep 29, 2011

trying to on mouse over set the parent of the moused over text field to the highest depth child of its parent i tried both of these: [code] private function

[Code]...

View 3 Replies

Flex :: Extending Mxml Component With From Another Mxml Component With Visual Child Supported?

May 18, 2011

I've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.

What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?

if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?

View 1 Replies

Actionscript 3 :: Assign A Parent's Variable From The Parent's Child?

Nov 7, 2011

i want to pass the variable from parent to child .How Can i pass the Variable.Here i paste my code.

My Parent Class

public class PlayerStrobe_domaincheck extends Sprite
{
private var myService:NetConnection = new NetConnection();
private var _loader:Loader;

[Code]....

View 3 Replies

AS :: Flex - Handle Custom Event In Parent Component?

Feb 6, 2010

I defined a simple event class:

public class NewMoveEvent extends Event
{
public function NewMoveEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=true)

[code].....

View 1 Replies







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