dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Communication between swfs

  1. #1
    Senior Member sirhoff's Avatar
    Join Date
    May 2003
    Location
    OH
    Posts
    245

    Communication between swfs

    I have a main movie (A) that is loading an swf (B) into a movie clip. I am looking for a way to communicate between those two swfs. For instance on a button action in the parent (A) it will tell the child (B) to gotoAndPlay("frame_labelX"). Is this possible?

  2. #2
    Junior Member
    Join Date
    Jun 2004
    Location
    New York
    Posts
    12
    god i hope this is possible because it would solve my problem too i bet i bet. my fingers are crossed for you.
    damn the illusion of movement
    damn the illusion of movement to hell!

    [www.swock.com]

  3. #3
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    if the child is loaded into movieclip "holder" (instance name), you would use
    _root.holder.gotoandstop(...)

    Musicman

  4. #4
    Senior Member sirhoff's Avatar
    Join Date
    May 2003
    Location
    OH
    Posts
    245
    Beautiful! It works. Thanks.

  5. #5
    Senior Member sirhoff's Avatar
    Join Date
    May 2003
    Location
    OH
    Posts
    245
    Sorry double post. See below.
    Last edited by sirhoff; 03-09-2006 at 12:43 PM.

  6. #6
    Senior Member sirhoff's Avatar
    Join Date
    May 2003
    Location
    OH
    Posts
    245
    Ok now I have another issue.

    On a single button click I want to be able to load an swf into a movie clip and tell it to go to a certain frame in that swf. I have this script but it doesn't work. Each line works alone but targeting the frame label doesn't work when they are together.

    on(release) {
    _root.mc_load.loadMovie("topic01.swf");
    _root.mc_load.gotoAndStop("page02");
    }

  7. #7
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    this is quite obvious: at the moment you click the button, there is no movie yet.
    You could set a variable in the A movie and add code to the B movie to go to the frame specified in that variable

    Musicman

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