14 Replies Latest reply on Sep 25, 2008 8:43 AM by Newsgroup_User

    Cannot call methods/functions of a swf


      I cannnot call the methods of the swf that I have loaded with the SWFLoader :-(
      <mx:SWFLoader id="loader" source="assets/mySWF.swf"</mx:SWFLoader>

      I want to set the value of a dynamic textfield (step1) in my SWF
      this.loader.content.setText("Step 1");

      I have defined a method in the file mySWF.as:
      public function setText(wert:String):void {
      step1.text = wert;

      But it does not work... I get the error:

      1061 Call to a possibly undefined method setText through a reference with static type flash.display:DisplayObject.

      Does anybody see the mistake? Or is there another possiblity to call methods from an swf??
      Greets isa