A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144

    Can you Connect 2 SWFs on a page?

    Astrum!

    If i have two movies.. 1.swf and 2.swf on a page.. can i affect behaviour in one of those from the other?

    For example.. i click a button in 1.swf and the image changes in 2.swf ... possible ?

    Dominor,
    r

  2. #2

  3. #3
    immoralator
    Join Date
    Dec 2001
    Location
    UK
    Posts
    270
    localConnection is where it's at. Here's an example that uses it to change the text in a textfield on a different SWF. You can quite easily adapt this to swap images.

    //edited for some terrible typos!
    Attached Files

  4. #4

  5. #5
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144
    Astrum!

    mngn..

    That really worked! Thanks! That's amazing.. localConnection definately reduces the whole JavaScript & FSCommand route & load..

    Dominor,
    r

  6. #6
    immoralator
    Join Date
    Dec 2001
    Location
    UK
    Posts
    270
    No worries

  7. #7
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144
    Astrum!

    Can the localConnection() be taken a step further ?
    What if the two SWFs are not on the same page, but different HTML files in a FrameSet ? Can we get them connected somehow?

    Dominor,
    r

  8. #8
    morb1d LUCI5R's Avatar
    Join Date
    Apr 2002
    Location
    Latham, NY
    Posts
    144
    Astrum!

    Well actually it just worked.. without a problem.. even with the 2 SWFs on seperate HTML files in a frameset!

    Thanks.

    Dominor,
    r

Posting Permissions

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




Click Here to Expand Forum to Full Width


HTML5 Development Center