dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: AS2 CS3 buttons in loaded swfs loading other external swfs into the main timeline.

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    22

    AS2 CS3 buttons in loaded swfs loading other external swfs into the main timeline.

    Hi,

    First timer to the forum here.

    I have a main fla file which loads an external swf into an empty movieclip on the main timeline which works fine but I want a button in the external swf to load another external swf into another empty movie clip on the main timeline.

    eg.

    start.swf loads UKEIAMap.swf into (empty movie clip within start.swf) MapLoader_mc

    then a button havant_b within UKEIAMap.swf needs to load HavantProjectSheet.swf into (empty movie clip within start.swf) ProjectSheetLoader_mc

    without unloading UKEIAMap.swf

    I'm very confused and need help... thankyou

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    All your actionscript should go in the first frame of the _root timeline (the main timeline of start.swf).

    Put everything in functions. The buttons can call a function like this:

    If you put this function in _root:
    Code:
    function doSomething(){
      trace("doSomething() function has been called");
    }
    You can call that function from anywhere in the main swf or loaded swfs like this:
    Code:
    _root.doSomething();

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    22

    Thumbs up thanks Moot I shall give it a try...

    : liz

  4. #4
    Junior Member
    Join Date
    Sep 2009
    Posts
    22
    it works thanks thats brilliant cheers

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