Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Dynamic Component

    Hi,

    I need to instance component (Ex: cpn = new ComponentFromInternet()) and use
    it, but i don't how can i do this, only but ActionScript, i don't want drag
    the component onto the stage, but dynamically.

    this.onLoad = function()
    {
    cpn = new ComponentFromInternet() ;
    cpn.FunctionOfTheComponent;
    }

    But it doesn't work (no error and nothing)

    Thanks for you help,

    Samos


    SaMoS Guest

  2. Similar Questions and Discussions

    1. dynamic id for component?
      I'm using a repeater to create several textInputs on the stage. I'd like to assign each textInput a unique ID but I keep getting an error msg with...
    2. dynamic component positioning in Panel
      Ok, here is the problem description which I have been trying to solve out for couple of weeks. I have a static ViewStack component in Flex...
    3. Dynamic XML Schema and DataSet Component
      Hello, I am trying to use a DataSet Component to hold data loaded from a SQL table. The design of my application requires that all components be...
    4. Dynamic Sound with a Media Component
      Hello I'm having a little problem here. I am using Flash MX 2004 - Proffesional. I have a dynamic sound ("GavSound")loading in at the beginning...
    5. dynamic url from a component
      i've searched this newsgroup as well as the aspnet newsgroup without an answer to this question. i call a web service from a component. i specify...
  3. #2

    Default Dynamic component

    I created a custom component there are some text Areas in that component
    This component will be imported in main application

    My final and simple goal is :
    To load a xml file -- loop thru the array of node ?dailly_learning?
    And attach the custom component as many as dailly_learning nodes are and
    fill the data into it
    I could have easily done flash using attachmovie but how to do it in Flex
    I could load the xml and could retrieve the value from it

    Some one please guide me !




    Structure of xml files is something like :

    <!---- Xml file -->

    <dailly_learning>

    <category > flex </category >
    <notes> some text </notes>
    <date_day> date <date_day>

    </dailly_learning>

    <dailly_learning>

    <category > flash </category >
    <notes> some text </notes>
    <date_day> date <date_day>

    </dailly_learning>

    <dailly_learning>

    <category > Misc </category >
    <notes> some text </notes>
    <date_day> date <date_day>

    </dailly_learning>

    Regards,
    Flex Learner



    Mayur.....Tracing The Sun Guest

  4. #3

    Default Re: Dynamic component

    I suggest using a Repeater.

    It will loop through the array you pass to its dataProvider property, and
    create a copy of your component for each element.

    Check the samples, docs, cflex.net for examples

    Tracy

    ntsiii Guest

  5. #4

    Default Re: Dynamic component

    thanks
    i did my homework and found the solution
    :)
    Mayur.....Tracing The Sun Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139