In small test application I have the follow object. stack
The Main.mxml loads the EntryClass.as - class EntryClass (that
doesn't extends anything) - public static function Main().
This EntryClass.Main() function is doing the follow:
var mxmlApp:Application =
hi guys. i was reading flex3 for dummies page 221 on containers and it gave an
example of adding childen using actionscript. it worked fine. but i thought
about adding a removeChild function. but it doesnt seem to be working. can
someone tell me why?
i apologize if this is a stupid mistake.
You are trying to remove a child that has never been added. In your
addCheckBox function you are creating a new CheckBox and then adding it
which is fine but then in your removeCheckBox function you are again
creating a brand new CheckBox and trying to remove it. This will not work
because the new
I have two states
and possibility to jump between them.
All works fine until one click
inadvertently goes faster than the transition...
then I get an already parented error on the addchild...
To explain better:
If I go from state a to state b
and viceversa waiting the transition
times no
The stack trace follows.
I'm curious as to how addChild() can be throwing a range error, when
it's clearly determining the range itself. Is it that the component is
somehow not ready to accept children or something?
Thanks,
Maciek Sakrejda
Stacktrace:RangeError: Error #2006: The supplied
, June 02, 2008 7:24 PM
To: flexcoders
Subject: [flexcoders] addChild() (not addChildAt) throws RangeError:
Error #2006: Thesupplied index is out of bounds
The stack trace follows.
I'm curious as to how addChild() can be throwing a range error, when
it's clearly determining the range itself
UIComponent or
ScrollControlBase
--
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Steve Mathews
*Sent:* Tuesday, January 22, 2008 12:52 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] addChild vs. addRawChild and performance
Sent: Tuesday, January 22, 2008 12:52 PM
To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
Subject: [flexcoders] addChild vs. addRawChild and performance
Someone posted recently describing that addRawChild adds DisplayObject
in a way that they are not included in the size and layout
Someone posted recently describing that addRawChild adds DisplayObject
in a way that they are not included in the size and layout of the
container (if I understood correctly). Does anyone know if this would
be better or worse for the overall performance of a Flex app? So if
you did not need layout
: [flexcoders] addChild vs. addRawChild and performance
Someone posted recently describing that addRawChild adds DisplayObject
in a way that they are not included in the size and layout of the
container (if I understood correctly). Does anyone know if this would
be better or worse for the overall
I have a ball class. I can make a ball. How do I add it to the stage ?
I have seem plenty of examples, and they use addchild.
Every time I try to use addchild, I get this error:
Error: Call to a possibly undefined method addChild.
or if I try to attach it to an existing element
such as mx:VBox
Here is an example of this sort of thing. I have seen it over and over
again.
http://www.actionscript.com/Article/tabid/54/ArticleID/ActionScript-3-0-Display-Lists-and-Display-Object/Default.aspx
it shows the shape class and function
public class CircleShape extends Sprite
{
addChild not addchild
- Original Message
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, January 17, 2008 11:03:15 PM
Subject: [flexcoders] addchild
I have a ball class. I can make a ball. How do I add it to the stage ?
I have seem plenty
: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, January 17, 2008 11:03:15 PM
Subject: [flexcoders] addchild
I have a ball class. I can make a ball. How do I add it to the stage ?
I have seem plenty of examples, and they use addchild.
Every time I try to use
Subject: Re: [flexcoders] addchild
OK thanks. Now when I try to use addChild, I get this error. What does
it mean ?
myball=new Ball;
addChild(myball) ;
TypeError: Error #1034: Type Coercion failed: cannot convert
com.oreilly. programmingflex. states::Ball@ 5787299 to mx.core.IUIComponen t
, 2008 11:38:26 PM
Subject: Re: [flexcoders] addchild
OK thanks. Now when I try to use addChild, I get this error. What does
it mean ?
myball=new Ball;
addChild(myball) ;
TypeError: Error #1034: Type Coercion failed: cannot convert
com.oreilly. programmingflex. states::Ball@ 5787299
/
/mx:Application
- Original Message
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Thursday, January 17, 2008 11:03:15 PM
Subject: [flexcoders] addchild
I have a ball class. I can make a ball. How do I add it to the stage ?
I have seem plenty of examples
Was this ever resolved? I seems like it's not the right behavior. If it is,
how would Jason accomplish his goal (and I know the answer isn't
FlexBitmap...) Is it off to rawChildren?
Can anyone see the error in this setup?
//drawTest.mxml file:
?xml version=1.0 encoding=utf-8?
Crazy... I just opened my email client to send a similar email. The only
difference is that I want to add a FlexShape.
-Original Message-
Can anyone see the error in this setup?
//drawTest.mxml file:
?xml version=1.0 encoding=utf-8?
mx:Application
Canvas.addChild() only accepts UIComponents?
No, it wants a DisplayObject.
Can anyone see the error in this setup?
//drawTest.mxml file:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute applicationComplete=init()
backgroundColor=0xFF
mx:Script
![CDATA[
import src.DrawBitmap;
private function
Canvas.addChild() only accepts UIComponents?
On 11/12/2007, at 10:01 AM, Merrill, Jason wrote:
Can anyone see the error in this setup?
//drawTest.mxml file:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
Hi guys,
need your help. kinda stuck
i need to create an addchild of an accordian with a vbox containing a
datagrid.
i have successfully created this however, due to project restriction,
the header of the accordian when created needs to prompt the user to
enter the title which will show up
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AddChild
Hi guys,
need your help. kinda stuck
i need to create an addchild of an accordian with a vbox containing a
datagrid.
i have successfully created this however, due to project restriction,
the header of the accordian when created needs
Hi all,
I create a TitleWindow with the PopupManager. The titlewindow should
dynamically contain a canvas.
So how did I do that. I gave the titlewindow a property called
'contentForm' which contains a canvas. Then in the
creationComplete-event of the titlewindow, addChild(contentForm) is
called
Jon,
Any way we can see the code on the way you did this? I have a need for
it, but it is on the back burner for now. Any insight would be a world
of help.
Thanks for any insight,
Tony
Jon Bradley wrote:
Thanks for all your help on this guys. I finally figured it all out.
Jeez - took
Tony,
Check out my last post titled Techniques for rotating non-embedded
fonts. I detailed a bit more of the solution and included parts of a
setTransform method that breaks up the processes. My draw method for
the text is pretty straightforward - draw the text field into a
bitmap (but
possible).
Ely.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Friday, August 31, 2007 10:18 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] addChild to UITextField?
Tony,
Check out my last post titled Techniques for rotating
Has anyone ever tried to do this?
Is there any available hacks using _internal or something so that
children can be added to a UITextField (either by multiple
inheritance or something with a Sprite?).
Yargh.
Well, I believe TextField's are leaf nodes, meaning they can't have
children. Also, if you'll look at the Object Heirarchy, there's no
DisplayObjectContainer in there -- so I doubt you're going to get much
traction. You're better off making a UIComponent and putting a text field
inside of it.
Not possible. It is not a DisplayObjectContainer.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Thursday, August 30, 2007 8:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] addChild to UITextField?
Has
Thanks Kyle. Yea, I assumed that already.
What I'm trying to figure out is if it's possible to create a
combination of a UITextField and a sprite as a single class.
flash.display.DisplayObjectContainer isnt' available anywhere to look
at, and I'm wondering if that's an intrinsic class to
Yea, but the question would then be can I decorate a UITextField with
the capabilities of a Sprite, or is the DisplayObjectContainer
intrinsic and that's not possible.
If I can, I'd extend TextField/FlexTextField/UITextField if necessary
to put in the _children property.
Mainly trying to
You can add a _children property, but you can't get it to render
children.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jon Bradley
Sent: Thursday, August 30, 2007 1:55 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders
On Aug 30, 2007, at 5:23 PM, Alex Harui wrote:
You can add a _children property, but you can’t get it to render
children.
Well... at least I won't try to go down that route now. :)
Related to the same problem ... do you know if there is an event
triggered when the style of a UITextField
: [flexcoders] addChild to UITextField?
On Aug 30, 2007, at 5:23 PM, Alex Harui wrote:
You can add a _children property, but you can't get it to render
children.
Well... at least I won't try to go down that route now. :)
Related to the same problem ... do you know if there is an event
triggered
:
I think if you override validateNow(), when it comes back it is
pretty much done.
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jon Bradley
Sent: Thursday, August 30, 2007 4:04 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] addChild to UITextField
I am not sure this as much a problem as I am probably doing something
wrong. I am adding child components at runtime to a vbox. These new
components can be dragged to a new position. This all works. The
'problem' is that when anytime a new child is added, all the child
components move the top left
To: flexcoders@yahoogroups.com
Subject: [flexcoders] AddChild problem
I am not sure this as much a problem as I am probably doing something
wrong. I am adding child components at runtime to a vbox. These new
components can be dragged to a new position. This all works. The
'problem' is that when
into
a vertical stack. Canvas is better for random' positioning.
--
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Clint Tredway
*Sent:* Friday, June 01, 2007 8:31 AM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] AddChild problem
I am
Jethani
Sent: Saturday, April 28, 2007 10:20 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] addChild problems
On 4/26/07, Jason C Reynolds [EMAIL PROTECTED]
mailto:jreynolds%40thewritesource.com wrote:
MainApp
contentHolder = new Canvas();
this.addChild(contentHolder
: [flexcoders] addChild problems
Does not work just means it isn't showing up on screen - something is
wrong with how I am adding stuff to the display list.
MainApp has the canvas object, and the content object - creates an
instance of any class that extends my ContentTemplate class.
I don't
On 4/26/07, Jason C Reynolds [EMAIL PROTECTED] wrote:
MainApp
contentHolder = new Canvas();
this.addChild(contentHolder);
contentScreen = new SampleScreen();
contentHolder.addChild(contentScreen); // HERE is what I want to work,
contentScreen extends UIComponent - so in my mind it should
for looking... Jason
- Original Message -
From: Manish Jethani
To: flexcoders@yahoogroups.com
Sent: Wednesday, April 25, 2007 4:11 PM
Subject: Re: [flexcoders] addChild problems
If you can show the heirarchy of your objects and which one you're
trying to add that's
Sorry for the vauge subject... here's what I'm trying to do that does not work.
I am creating a MainApp class instance in my mxml project file. I want to use
this to control the basic common stuff throughout the application, and I have
made an instance of a Canvas object that I will be using as
If you can show the heirarchy of your objects and which one you're
trying to add that's failing, that'll help. Also explain what does
not work means (do you get an error?).
On 4/26/07, Jason C Reynolds [EMAIL PROTECTED] wrote:
Sorry for the vauge subject... here's what I'm trying to do that
I am having some trouble with addchild
var thePrintView:FormPrintView = new FormPrintView();
//myHbox.addChild(thePrintView);
var _caPan:Canvas = new Canvas();
_caPan.height=300;
_caPan.width = 200;
You can't add a child twice. Did you mean to call addPage?
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wifi19
Sent: Tuesday, March 27, 2007 1:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] addchild error
I am having
Hi there Folks
While trying to create a dynamic component into flex application then trying
to include others, why such thing doesn't work.
In the example bellow I create an PopUp titleWindow with children TextArea
Component. But when I create again the same titleWindow, the last TextArea
who
be parented by a
single DisplayObjectContainer.
- Gordon
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Igor Costa
Sent: Saturday, February 17, 2007 8:32 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] addChild doesn't work
I have a custom component myFriend.mxml
I have a datagrid on the left filled with search results.
What i was is, as I'm clicking Add Friend on the datagrid, for it to
appear on the right (one under the other) automatically with the style
and format of myFriend.mxml
Is this possible? if so, I
I'm trying to create a preloader for a flex application I'm making and I'm
using Ted's Custom Preloader as a basis for a start point. The problem I'm
having is when I try to add my child canvas to the screen that has the
labels I added to that canvas it is not showing on the screen. Is there
: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
part de Ciarán
Envoyé : jeudi 2 novembre 2006 14:29
À : flexcoders@yahoogroups.com
Objet : [flexcoders] AddChild() Exceptions
Hi All,
I'm having a slight problem building a custom component. The basic
idea
a
solution to the current index problem.
Anyway Frustrating to say the least.
jason
-Message d'origine-
De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
part de Ciarán
Envoyé : jeudi 2 novembre 2006 14:29
À : flexcoders@yahoogroups.com
Objet : [flexcoders
À : flexcoders@yahoogroups.com
Objet : [flexcoders] AddChild() Exceptions
Hi All,
I'm having a slight problem building a custom component. The basic
idea is a combination of a primary image container, and a Tile()
container providing a selection of images. When selected, each image
would
Hi All,
I'm having a slight problem building a custom component. The basic
idea is a combination of a primary image container, and a Tile()
container providing a selection of images. When selected, each image
would appear as a primary image.
This sounds tediously simple. I'm implementing it upon
Ciaarán where do you add your child? what container?This error that happens seems that out of bounds it's because you're trying to attach a new child in the not supported container.Regards
On 11/2/06, Ciarán [EMAIL PROTECTED] wrote:
Hi All,
I'm having a
.
jason
-Message d'origine-
De : flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] la
part de Ciarán
Envoyé : jeudi 2 novembre 2006 14:29
À : flexcoders@yahoogroups.com
Objet : [flexcoders] AddChild() Exceptions
Hi All,
I'm having a slight problem building a custom component
Hello all ,
Is there any way by which i can decide if the any component contains a particular component or not.
something like this :
box:: VBox = new VBox();
box.width = 100;box.height = 100;
if(Vboxid[box]== undefined){
Vboxid.addChild( box );}
box.x = Vboxid.mouseX; box.y =
Hi,use;
box:VBox = new VBox();
box.width = 100;
box.height = 100;
if(!Vboxid.contains(box)){
Vboxid.addChild
( box );}
box.x = Vboxid.mouseX
; box.y = Vboxid.mouseY;You could use the name property of the box and do a more complicated check.'The above will only work if 'box' is not a local
I tried to load a
binary image data lo loader object, which worked
great.
but when I tried to
add this loader object - addChild(loader) I got this
message:
TypeError: Error
#1034: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED] to
mx.core.IUIComponent.
the thing
: [flexcoders] addChild to Loader component
I tried to load a
binary image data lo loader object, which worked
great.
but when I tried to
add this loader object - addChild(loader) I got this
message:
TypeError: Error
#1034: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED
As far as I understand, now I can work with superclass view directly
from constructor of inherited class after super() call?
public class A extends Box {
function A() {
addChild(new TextInput()); // causes exception
}
}
public class B extends A {
function B() {
super();
addChild(new
info here:
http://www.flex.org/ACDS/BuildingAFlexComponent.pdf
- Original Message -
From: Sergey Kovalyov [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Wednesday, July 19, 2006 10:01 AM
Subject: [flexcoders] addChild() in constructor?
As far as I understand, now I can work
Actually, I found this approach in IPE Controls by Ely Greenfield
(http://demo.quietlyscheming.com/IPE/). There are classes like this
there:
package qs.ipeControls
{
import qs.ipeControls.classes.IPESlider;
import mx.controls.HSlider;
public class IPEHSlider extends
@yahoogroups.com
Sent: Wednesday, July 19, 2006 10:31 AM
Subject: Re: [flexcoders] addChild() in constructor?
Actually, I found this approach in IPE Controls by Ely Greenfield
(http://demo.quietlyscheming.com/IPE/). There are classes like this
there:
package qs.ipeControls
{
import
Hello,
i have a problem.
Please, help...
if:
...
var s:Sprite = new Sprite();
var b:Box = new Box(); // box - mx.core.Container.Box
then:
b.addChild(s);// - ERROR: cannot convert
flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent
i know (from debugger) that method
var s:Sprite = new Sprite();
var b:Box = new Box(); // box - mx.core.Container.Box
then:
b.addChild(s);// - ERROR: cannot convert
flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent
i know (from debugger) that method 'addChild(val:DisplayObject)' in
mx.core.Container
You can wrap your Sprite inside an UIComponent (code not tested):
var s:Sprite = new Sprite();
var c:UIComponent = new UIComponent();
c.addChild(s);
var b:Box = new Box();
b.addChild(b);
I meant b.addChild(c) of course...
--
Flexcoders Mailing List
FAQ:
Hi All,
I'd like to provide a String value which represents the DisplayObject
class I want to create dynamically with addChild. Has anyone
accomplished this?
This would be equivalent to createChild(findClass(Button)) in AS2...
Thanks,
Brendan
--
Flexcoders Mailing List
FAQ:
Hi All,
I'd like to provide a String value which represents the DisplayObject
class I want to create dynamically with addChild. Has anyone
accomplished this?
You mean like this?
public function createInstance (className : String) : Object {
var MyClass : Class =
PROTECTED] On
Behalf Of Brendan Meutzner
Sent: Wednesday, January 18, 2006 9:13 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] addChild from String
Hi All,
I'd like to provide a String value which represents the DisplayObject
class I want to create dynamically with addChild. Has anyone
);
return inst;
}
Matt
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jens Halm
Sent: Wednesday, January 18, 2006 10:32 AM
To: Brendan Meutzner
Subject: Re: [flexcoders] addChild from String
Hi All,
I'd like to provide a String value which
public function createInstance (className:String, args:Array) : Object {
var myClass : Class = getClassByName(className);
var inst : Object = new myClass();
inst.initArgs.apply(inst, args);
return inst;
}
Yes, that would be a workaround if I have complete control over the
74 matches
Mail list logo