Public Voice Network
- QBN 2727
- New Site Feedback 44
- Favorite brands 3333
- QBNers in Asia? 66
- blog 3122131221
- Shaq Twitter
- menu btn not working
- Super Bowl Logo (Vector) 22
- God is quite busy 8080
- question for photographer… 99
- Canadian Politics con'… 5959
- Favorite Beer? 128128
- For TheBlueOne 11
- Dexter, Season III 5757
- Cuts Like a Knife 1111
- Pic of the Day 1049910499
- rippity rip 6060
- Simple AJAX quiz script 55
- fastfood 99
- B. Fleischmann
- this is for... you! 33
- Public Enemy 2929
- Aquarium owners 11
- What are you listening to… 961961
LoadMovie Question 66 Responses
Last post: 3 years, 2 months ago | Thread started: Sep 14, 05, 4:29 a.m.
- yurimon
Is there another way to load a swf file where the action script inside this file still retains functionality. It loads into the main movie but all action script functions are null. none action script animation works.
on (release) {
_root.mload.loadMovie("id.swf");
}- Sep 14, 05, 4:29 a.m. – Permalink
- unfittoprint
avoid using _root.
why?
because your 'child' movie's _root is now its 'parent's' _root.
#note1: don't target your _root to load a movie. use a blank target [createEmptyMovieClip] to become the holder. otherwise it will erase everything on stage. including your button.
#note2: don't write on(whatever) functions directly on buttons/mc's. that's deprecated. use an unique action layer to paste all your code.
/*example of an mc targeting its root [when placed directly on the stage]:*/
var target:MovieClip = this.createEmptyMovieClip("targe… this.getNextHighestDepth());
mc.onRelease = function() {
this._parent.target.loadMovi e("id.swf");
}

- Dog-earSep 14, 05, 4:40 a.m. – Permalink
- CyBrainX
Couldn't you also use movieclip._lockroot to keep the scope of the loaded movie intact?
I tried to get to the page on the Dictionary from Macromedia, but it doesn't seem to be working today.
See if this page works: http://livedocs.macromedia.com/f…


- Dog-earSep 14, 05, 7:24 a.m. – Permalink
- unfittoprint
might be me, but if you work with extending classes, complex tree structures and others 'rich' parent/children hierarchies you rarely call the
_root node directly.by using _parent or creating an alternative ___root var to specific regions/scopes of specific purposes you make your code modular, something that can be integrated at any depth of your project.
_lockroot seems more of a hack than good coding, imo.


- Dog-earSep 14, 05, 8:47 a.m. – Permalink


