4 Replies Latest reply on Nov 21, 2010 4:24 PM by Zombiecook KochtVorWut

    how to add an swc file to the stage ?

    Zombiecook KochtVorWut

      Hello,

      i want to add an swc and interact with it. But i can't even add it to the Stage.

      The file was exported from Flash Professional as an MovieClip Class with the name uploadLoop.
      My Script:

       

      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                     xmlns:s="library://ns.adobe.com/flex/spark" 
                     xmlns:mx="library://ns.adobe.com/flex/mx" 
                     creationComplete="creationCompleteHandler(event)">
          <fx:Script>
              <![CDATA[
                  import mx.events.FlexEvent;
                  
                  private var loop:uploadLoop;
      
                  protected function creationCompleteHandler(event:FlexEvent):void    {
                      loop = new uploadLoop;
                      Container.addChild(loop);
                  }
      
              ]]>
          </fx:Script>
          <s:Group id="Container"></s:Group>
      </s:Application>
      
      

       

      The debug failure is in German but it says something like I should use addElement() instead of addChild().

      But addElement don't works with an swc file.

       

      I hope someone can help me with that.
      Greetings
      Zombiecook