all groups > flash actionscript > may 2005 >
You're in the

flash actionscript

group:

code specifics within a loadMovie movieclip


Re: code specifics within a loadMovie movieclip teamtoast
5/28/2005 12:00:00 AM
flash actionscript:
Re: code specifics within a loadMovie movieclip rlc5611
5/28/2005 12:00:00 AM
I am not sure what "this" context means but try either

this.whatever

or

this._parent.whatever

switching scenes from a button in a movieclip is problematic (many posts per
day). Bottom line is that you need to navigate to a frame label rather than a
scene name.

if "this" was the _root (and it sounds like it might have been), then you will
have a different problem so, what was "this" really?
Re: code specifics within a loadMovie movieclip rlc5611
5/28/2005 12:00:00 AM
Re: code specifics within a loadMovie movieclip teamtoast
5/28/2005 12:00:00 AM
thanks this worked, i just put it in a holder clip
code specifics within a loadMovie movieclip teamtoast
5/28/2005 12:00:00 AM
Hello. I've got a movieclip that has been loaded via a
this.loadMovie()

I have a button within the movie that has been loaded that i would like to
control the main timeline. (ie. switch scenes of overall movie)

what do i need to do to get this movieclip to work?

I've tried.
_parent.
_parent._parent.
_root._parent.
_root.

it just doesn't seem to be working.

Could you help me out?

Thanks.
Re: code specifics within a loadMovie movieclip tralfaz
5/28/2005 8:57:17 PM
[quoted text, click to view]

If 'this' is the _root level of the main movie then your _root level
code will be destroyed by loading into it directly.
You need to load into another level or another movieclip to keep from
replacing _level0 with the new movie.
If you load into a level like _level1, then _level1's buttons can
control _level0:

loadMovieNum("two.swf",1); // load into level 1

// inside two.swf, a button can control _level0:
on(release)
{
_level0.gotoAndPlay(100);
}

If you load into a movieclip like 'holder" then use _parent.
loadMovie("two.swf", holder);

// movieclip with button loaded into "holder"
on(release)
{
_parent.gotoAndPlay(100);
// or _root
// or _level0
}
tralfaz




AddThis Social Bookmark Button