Public Voice Network
- who wants to be a troll 2626
- flash help 44
- Favorite fragrance? 5555
- Tokyo
- 090508 PSB 6464
- Orange County, CA 55
- Best place for design 1616
- WP Help 33
- QBN Mugs '08 314314
- Foreign Languages 3535
- Lindstrom
- So Cal QBNrs 11
- macbook pro magnified 44
- Hello QBN 1313
- damn notes!! 99
- WeArePhi 140140
- LHC 1818
- I saw my x (blog) 1717
- Conservative Slogan 1818
- blog 2473124731
- EC: The Blackbird 1212
- Entourage season premiere… 1818
- Nikon D60 77
- Sean Getti Creative 3636
LoadMovie Question 66 Responses
Last post: 2 years, 11 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


