Results 1 to 4 of 4

Thread: loaded swfs that can work together

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default loaded swfs that can work together

    I am working on something where I have a "manager" swf that loads other swfs into movieclips. I know they all have to be the same as flavor.

    What I want to do is have "one.swf" tell "two.swf" to do something ie
    function swftalk(evt:MouseEvent):void
    {
    two.swf.Myclip_mc.GotoAndPlay"frame2"
    }
    would that also work with button created in the manager swf?
    Last edited by evan; 12-19-2008 at 03:36 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I know they all have to be the same as flavor.
    If you want to control the constituent SWF then you are correct. Otherwise, you can import an AS2 SWF into an AS3 document.

    What I want to do is have "one.swf" tell "two.swf" to do something ie
    Sure, it's easy. If you're importing two.swf into a movieclip called container, then you can use something like this:

    Code:
    function swftalk(evt:MouseEvent):void
    {
    container.Myclip_mc.GotoAndPlay"frame2"
    }
    Basically, treat the MC inside two.swf as if it were inside the container mc.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    evan (12-17-2008)

  4. #3
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    I got it to work with the code below. My manager code worked(above) fine for just importing swfs but didn't work with controlling them.

    Next up can I import two swfs inside "manager.swf" and have a.swf control b.swf?
    Last edited by evan; 12-17-2008 at 11:12 PM.

  5. #4
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    second attempt: I checked my code against the code on FlashandMath.com


    for some reason the extra code does the trick and programatically generating the container works where as one placed on the stage does not.

    if anyone can help me with the other problem I stated above let me know.
    Last edited by evan; 12-18-2008 at 12:12 AM.

Bookmarks

Posting Permissions

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