dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Suspending actionscript from running on externally loaded SWF

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Posts
    27

    Suspending actionscript from running on externally loaded SWF

    I have a new challenge for which I've used Flash version CS3. I haven't touched on AS3 as of yet though (chose to use AS2 with which I am more familiar) but I thought I'd post here incase I should be using AS3 to solve the problem.

    I'm creating a "bootstrap" for want of a better description - a flash movie that uses a MovieClipLoader to load an external SWF file into a container clip. This I have working. I then gotoAndStop the loaded movie at frame 1 and present a button to allow the user to play that movie when they're ready. Again, all fine, most of the time. The issue is that some of the movies I'm loading and then pausing have actionscript of their own and they're playing themselves and generally getting into a mess.

    So the question ultimately is, is there a statement or command I can use to suspend the actionscript of externally loaded SWFs?

  2. #2
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    You can't suspend actionscript at all you must build your code in a correct manner, so it won't get messy and it won't get in conflicts with other pieces of code.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  3. #3
    Junior Member
    Join Date
    Jul 2000
    Posts
    27
    In the end I discovered (by decompilation) that the movies contained Actionscript with references to _level0 and _root, so preloading them into a container was never going to cut it. I had to load them into level0 on the main timeline and sacrifice any nice preloading etc, but at least I stopped them running automatically until the user's ready to view them at least.

    Thanks anyway people!

  4. #4
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Since this is an ActionScript 3.0 forum, I'd recommend reading up on AS 3.0 and loosing the whole _root and _level concepts. Good luck.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  5. #5
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    You need to get rid of _root in your child movies or in your parent movie you set:

    holder._lockroot = true;

    whereby holder is the movieClip you load your movies in.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

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