2 Replies Latest reply on Aug 30, 2006 2:17 PM by AhnRashee

    figuring out actionscript for a nested swf

      hi all,

      i've got 3 swfs: call them 1, 2, and 3. i have a function in swf2 that i want to run when the viewer presses a button in swf3. if 2 is nested in 1, and 3 is nested in 2, how would i go about running a script in 2 from a script in 3?

      i tried _root.loadImage();
      and parent_loadImage();

      but neither works. any clues?

        • 1. Re: figuring out actionscript for a nested swf
          kglad Adobe Community Professional & MVP
          if loadImage() is on the main timeline of swf2 and you load swf3 into a target movieclip that's also on swf2's main timeline you would use:

          • 2. Re: figuring out actionscript for a nested swf
            AhnRashee Level 1
            I just spent an entire day working on this same problem. The issue for me was the new security restrictions in Flash 8.

            If you are still having a problem, right click in your web browser and go to settings. Next, click the advanced button, then a web page pops up with some more options. Choose Global Security Settings Panel and in the lower part of the panel that appears, you will see a box that says "Always trust files in these locations". Click edit location, then add location and browse to your swf file and then choose confirm (don't forget the confirm button). Do this again for any other swf files you are using.

            I had already written some code similar to this about a year ago and I couldn't figure out what was going on. I just started using Flash 8 for development and they have a new local with file system security feature that prevents loaded swf files from calling methods inside of other swf files. It's been a long day for me, so I thought I would try to save someone else the headaches.

            I believe this is only an issue for development.