4 Replies Latest reply on Aug 30, 2007 2:20 PM by SymTsb

    I going insane...

      I cant reach the functions in my loaded SWF !!

      Its correctly loaded... and displayed on the screen in a movieclip called

      I CAN do things like:
      myContent.y = 100;

      and accesing variables like this:
      trace (myContent.currentPage);

      but i CAN NOT use the functions in the loaded SWF...
      I try this code, and it wont work.

      (btw... "testa" is a REALLY simple trace function inside of the loaded swf... just to test things... )
        • 1. Re: I going insane...
          SymTsb Level 2
          If this is AS3...


          If you are making an AS3 swf and loading one that is AS2, you need to use Local Connection to access the calls in the loads swf.

          If this is AS2 I'd need to know more about the code and loaded clip structure. I'm guessing it isn't because your are using 'y' and not '_y'.
          • 2. Re: I going insane...
            Make sure that u have set an instant name for your movie clip, so u can refer it in action script. You can do it in the property inspector. I hope this will work.
            • 3. Re: I going insane...
              Eatstatic Level 1
              Im using AS3 yes...

              Ok... I will try writing:
              after the weekend and see if it works...

              But I still dont understand the logic behind it...
              Why cant I write:
              • 4. Re: I going insane...
                SymTsb Level 2
                AS3 is quite particular about the display object type for objects on the stage when referencing from AS. To make sure that AS3 looks at your display object as a MovieClip, you have to type cast it. That is all I did with MovieClip(myContent). Once AS sees that it is a MovieClip you should be able to reference the methods of that MovieClip via the dot operator.