-
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?
-
trace("AKA: Biro Barna");
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. |
-
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!
-
trace("AKA: Biro Barna");
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. |
-
Senior Member
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. -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|