How to add a child in canvas

Hai all,

I try with the code to add a new child in the painting below. But it's not working. Could someone help me.

<? XML version = "1.0" encoding = "utf-8"? >
" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"initialize =" init () "> "
< mx:Script >
<! [CDATA]
Import mx.collections.ArrayCollection;
Import mx.controls.Alert;
Import mx.rpc.remoting.RemoteObject;
Import mx.rpc.events.ResultEvent;

[Bindable]
private var ProductDataService:RemoteObject;
private var catalog: collection ArrayCollection;

private function init (): void
{
ProductDataService = new RemoteObject ("GenericDestination");
ProductDataService.source = "ClassLibrary1.Class1";
ProductDataService.addEventListener (ResultEvent.RESULT, ProductResultHandler);
ProductDataService.emp ();
}
private void ProductResultHandler(event:ResultEvent):void
{
Catalog = new collection ArrayCollection (event.result as Array);
var i: Number = 0;
for (i = 0; i < catalog.length; i ++)
{
var cv:Canvas = new Canvas();
CV.label = Catalog [i] .image;
CvEmp.rawChildren.addChild (cv);
CvEmp.invalidateDisplayList ();
}
}
[]] >
< / mx:Script >
< XY = "0" mx:ToggleButtonBar = "0" id = "Tgb" dataProvider = "{VwStk}" >
< / mx:ToggleButtonBar >
< mx:ViewStack x = "0" y = "25" id = "VwStk" width = "100%" height = "506" >
< mx:Canvas label = "homepage" width = "100%" height = "100%" id = "CvHome".
showEffect = hideEffect 'WipeDown' = 'WipeUp"backgroundColor ="#BCB7B7">
< mx:Label text = "Homepage" / >
< / mx:Canvas >
< mx:Canvas label = "details" width = "100%" height = "100%" id = "CvDtls" creationPolicy = "all".
showEffect = hideEffect 'WipeDown' = 'WipeUp"backgroundColor ="# 9 9797">
< mx:Label x = "399" y = "0" text = "JK Technosoft" id = "lblHeading" fontFamily = "Georgia" fontSize = "15" fontWeight = "bold" / >
< XY = "0" mx:VBox = "0" width = "20%" height = "100%" >
< mx:Label text = "Search" fontWeight = "bold" / >
< / mx:VBox >
< mx:HBox = "181" x y = "21" width = "100%" height = "100%" >
< mx:Tile width = '729' height = '478' id = 'CvEmp' >
< / mx:Tile >
< / mx:HBox >
< / mx:Canvas >
< / mx:ViewStack >
< / mx:Application >

Kind regards

Arun

The holding of the Tile container canvas is instantiated not immediately as this is the second child of the ViewStack. try to set the creationPolicy for the viewstack at all and use addChild as Natasha said.

Tags: Flex

Similar Questions

  • How to ADD a child inside the childe in XML file

    I want to write the configuration file using the XML tools.

    in what I am facing problem to add a child next to the child.

    Please guide me to resilve this problem.

    Thank you

    Gilles Poirier

    Thank you

    I is a good Solution. Now, I try to add a new Tag, and once again in this new child.

    Thank you

    Gilles Poirier

  • How to add a child in Transition with effect

    I try to use a transition that adds a child object (a Panel) and I want the Panel to use the zoom effect when it comes. The problem is that the Panel flashes up to full size and then done the zoom animation.

    The code I use is:
    < mx:Transition id = "toLoggedIn" fromState = "" * "toState ="LoggedIn">"
    < mx:Sequence target = "{user_panel}" >
    < mx:Zoom target duration = "{user_panel}" = "1000" zoomHeightFrom = "0.0" zoomHeightTo = "1.0" zoomWidthFrom = "0.0" zoomWidthTo = "1.0" / >
    < mx:AddChildAction / >
    < / mx:Sequence >
    < / mx:Transition >

    Is there a better way to use the effect Panel when it is added?

    Sorry, set = 0 scaleX and scaleY = 0.

  • I need to add my child email address to my account of security for the family, but I can't find the link

    I need to add my child email address to my account of security for the family, but I can't find the link

    Hello

    The latest version of the parental control now uses the standard user accounts (logon Windows) as a child in the safety of the family. The management functionality of contacts for email accounts is no longer available. For more information, please refer to this topic:

    Where is the function of the safety Contact family management?

    You can also check this link for help on how to add a child account to parental control.

    To learn more about the safety of the family, please visit http://windows.microsoft.com/en-US/windows-live/essentials-help-center

    Thank you!

  • Three computers all accounts for every child now dealt with separately in the family, how to add a link to them?

    I have three computers in the House where my kids at school at home make their school work.  In the past, I have their accounts linked to a single identity within the family safety and can enable and disable applications or web sites for each child for all the computers in the House from one place.  For some reason any now each account for each child on each computer is listed separately so that if I want to add a web site to a particular child, I need to do it in three different places.  In addition, there was once a button to allow the Web site on all children so if I want to allow for each child, I need to go to every child on each computer that is a lot more work.  How to re - link the so that each computer is connected to the same family safety account?  Thank you.

    Hi Troy,

    I'll be happy to help you with the problem you have with parental control. I understand the frustration when things do not work as it should.

    I suggest you to connect to http://familysafety.microsoft.com/ and delete the child's account and re - add.

    Please follow the link below to find out how to add accounts of child safe family.

    http://Windows.Microsoft.com/en-us/Windows/set-up-family-safety#set-up-family-safety=Windows-8

    Hope this information is useful. Just reply in case you need additional information. I'll be happy to help you.

  • How to restore a childs e-mail account, associated with a security account parent family?

    How to restore a childs e-mail account, associated with a security account parent family?

    Accidentally deleted the family member on the security account for the family and now can't access the childs account or figure out how to add it to the mother?

    You can try to contact the support team for the Microsoft account

  • I can't add a child to the FSS

    Hello

    I'm trying to add a child to my security account for the family, but I can't.
    I created a new account in my security software for the family, then connected to the Web site and clicking on "contact management". I don't get any ADD"" button.
    I get a message "parental control is gradually managing contacts. You can't turn on the management of contacts for this child, but you will still be able to manage the contacts for accounts that have already started. »
    Why did I get this? How can I complete my child?
    Thank you

    Hello

    We wish to inform you that the Contact management feature is no longer available in Windows Live Family Safety. For more details, please go to the link below.

    Where is the function of the safety Contact family management?

    Thank you!

  • How to add music to animate

    Hej,

    I want to add music to a canvas document.

    What format should I use, bitrate etc.

    Must always be placed on the timeline, and how do I play the right speed for att?

    Hi, Daniel...
    Use this code below

    allSounds = ['snd_1', 'snd_2']

    sound_1 = createjs. Sound.Play(allSounds[0]);

    sound_2 = createjs. Sound.Play(allSounds[1]);

    sound_1.stop ();

    sound_2.stop ();

    function init() {}

    sound_1.Play(allSounds[0],0,0,5);     5 means how many times loop... According to your requirment

    stage.addEventListener ("tick", myFun);

    }

    init();

    function myFun() {}

    setTimeout(after_3Min,180000);

    setTimeout (after_3Min, 5000);

    }

    function after_3Min() {}

    sound_1.stop ();

    stage.removeEventListener ("tick", myFun);

    }

  • How to add the layer transparant

    How to add a transparent layer

    How to add text to this layer

    How do I save the text on the layer index

    Hello Stanleysreenname!

    Here are a few screen shots that explain how doing what you asked!

    Click anywhere on the canvas to start typing your text!

    To customize your text, you can use the tools in the character Panel. (Window > character)

    To merge the text layer with SHIFT + click on the layer background, the two layers and then right-click and select link layers:

    I hope this helps!

    Julia

  • How to find the child level for each table in a relational model?

    Earthlings,

    I need your help, and I know that, "Yes, we can change." Change this thread to a question answered.

    So: How to find the child level for each table in a relational model?

    I have a database of relacional (9.2), all right?
    .
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"
    Tips:
    -Each circle represents a table;
    -Red no tables have foreign key
    -the picture on the front line of tree, for example, a level 3, but when 3 becomes N? How is N? That is the question.

    I started to think about the following:

    First of all, I need to know how to take the kids:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
     using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
     using (owner)
     where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;
    Thought...
    We will share!

    Thanks in advance,
    Philips

    Published by: BluShadow on April 1st, 2011 15:08
    formatting of code and hierarchy for readbility

    Have you looked to see if there is a cycle in the graph of dependence? Is there a table that has a foreign key to B and B has a back of A foreign key?

    SQL> create table my_emp (
      2    emp_id number primary key,
      3    emp_name varchar2(10),
      4    manager_id number
      5  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create table my_mgr (
      2    manager_id number primary key,
      3    employee_id number references my_emp( emp_id ),
      4    purchasing_authority number
      5* )
    SQL> /
    
    Table created.
    
    SQL> alter table my_emp
      2    add constraint fk_emp_mgr foreign key( manager_id )
      3         references my_mgr( manager_id );
    
    Table altered.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by prior child_table_name = parent_table_name
    SQL> /
    ERROR:
    ORA-01436: CONNECT BY loop in user data
    

    If you have a cycle, you have some problems.

    (1) it is a NOCYCLE keyword does not cause the error, but that probably requires an Oracle version which is not so far off support. I don't think it was available at the time 9.2 but I don't have anything old enough to test on

    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by nocycle prior child_table_name = parent_table_name
    SQL> /
    
           LVL CHILD_TABLE_NAME               PATH
    ---------- ------------------------------ --------------------
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
    

    (2) If you try to write on a table and all of its constraints in a file and do it in a valid order, the entire solution is probably wrong. It is impossible, for example, to generate the DDL for MY_EMP and MY_DEPT such as all instructions for a table come first, and all the instructions for the other are generated second. So even if NOCYCLE to avoid the error, you would end up with an invalid DDL script. If that's the problem, I would rethink the approach.

    -Generate the DDL for all tables without constraint
    -Can generate the DDL for all primary key constraints
    -Can generate the DDL for all unique key constraints
    -Can generate the DDL for all foreign key constraints

    This is not solidarity all the DOF for a given in the file object. But the SQL will be radically simpler writing - there will be no need to even look at the dependency graph.

    Justin

  • Add a child or a MCcontainer of a control class calendar

    Hello

    Alas, I'll still have some migration issues to AS3...

    How can I add a child object to an empty movieClip already placed in the timeline panel. Something like that.

    in the first timeline picture it is an empty instance of the MC named 'clipInTimeline' and in framescript I call:

    Import assets.contentControl;

    var getContents:contentControl = new contentControl();

    Did you deposit:

    the contentControl {} package

    ...

    function contentControl (): void {}

    var xxx:MovieClip = new MovieClip();

    clipInTimeline.addChild (xxx);

    clipInTimeline.gotoAndStop (5);

    }

    }

    In AS2 is so much easier to control and access to other objects. This AS3 architecture and methods are absolutely crazy.

    All that I could google for said I can't control or access timeline and objects on it with ACE?

    Thanks in advance.

    AS2 is certainly not easier... you just know that better, that's all. AS3 is much better in all directions... give it time. What you read on Google is not being able to reach the code directly on objects-which is good - you never should have done this in AS2 either. This is code that is hard to read and hard to find.

    Anyway, you can not access your timeline object in the example you gave is because you simply make an instance of your contentControl class - it has no reference to the timeline, then clipInTimeline is simply not defined in the context of your class. Only when you use the document class you have direct access to the timeline objects.

    You can solve your problem just by passing a reference to the timeline as follows:

    function contentControl(stageRef:MovieClip):void

    {

    var xxx:MovieClip = new MovieClip();

    stageRef.clipInTimeline.addChild (xxx);

    stageRef. clipInTimeline.gotoAndStop (5)

    and in your first code framework:

    var getContents:contentControl = new contentControl (this);

    In addition, the class names (IE types) should always begin with a capital letter. ContentControl, not contentControl.

  • How to add new VO to existing AppModule

    I have an AppModule existing with certain existing vo
    Now, I created a new EO with links and a VO with viewlinks. The wizard asks me to add this to the existing appmodule which is ok but I want to add the VO again to be a child of an existing instance in the appmodule.

    By default, the wizard creates a new instance of the master with the new VO as a child. But how to add the new VO as a child to an existing instance in the appmodule? I can't find an option for that...

    Do you mean:

    1. go in the module-> application data model.
    2. Select an instance of VO already added in the data (right) model.
    3. click on the + in front on the object VO (left) so that it displays all the correspondign to view links for VO.
    4. choose on of them and he shuffle to the data model.

    In this way, you add a new detail to an existing instance of the VO in the data model.

    Or I do not understand your question?

    Edited by: Valhery 20-5-2010 23:41

  • How to add contacts to my Apple Watch?

    Can someone explain how to add contacts to my Apple Watch 2, watch OS 3

    Hello

    Apple Watch is not a Contacts application and it is not possible to create new contacts on your watch.

    When make calls or send new messages, existing between in contact with instead are selectable via the phone and applications or Messages using Siri / the microphone to dictate a phone number:

    Instructions are available here:

  • How to add friends again Apple Watch

    How to add a friend again Apple Watch?

    Hello

    Under watch OS 3, the friends feature (which was available in previous versions) comes over and there is no direct replacement for it.

    When making calls or sending of new messages, contacts instead can be selected via the phone and Messages applications or using Siri:

  • How to add new folders in thunderbird for mac 38.2.0 POP3

    Switch PC to a macbook pro. Downloaded Thunderbird 38.2.0. I am trying to add new folders, under local folders. Trash and Outbox are in local folders, but I don't see how to add folders to organize my mail.

    Right-click

Maybe you are looking for

  • Satellite P10 stop suddenly

    I have problem of sudden closure with my Satellite P10... and no new BIOS update available.Is there anyone who can help me?

  • My screen flickers when in the Itunes store

    I've just updated to Itunes 12.3.2.35 and when I go to Itunes Store, my screen keeps flickering. I use Windows 7 on a Toshiba laptop. How can I solve this problem

  • The upgrade to 2.5.1 Tek Full 2010

    I got a demo version of the installed SE - Tek I think it's the version 2.5.1. I downloaded the full version of 2010 and has purchased a license. 2010 installed ok and said it was the upgrade the 2.5.1 existing. When I ran 2010 he came and said it wa

  • Assign names of image files

    Hello I acquire images every few nanoseconds from a camera through LabVIEW. What is the best way to make the device wait 10 nanoseconds, and then align an image using IMAQ (I already have the image snapping VI) and then download this image in BMP for

  • instructions on how to play are not clear for beginners. (Hearts).

    I would like to completely detailed instructions on how to play hearts. The instructions that came with the game are vague and can be understood by a novice. I would be most obliged. Sincerely, Robert Wingard.