all groups > flash actionscript > july 2004 >
You're in the

flash actionscript

group:

Re: actions


Re: actions kglad
7/18/2004 8:30:40 PM
flash actionscript:
Re: actions WickedSense
7/18/2004 8:43:04 PM
In that case, I currently have this script to attach a movie in my document.
on (rollOver) {
_root.attachMovie("logoroll","logoinstance",50)
logoinstance._x = 129
logoinstance._y = 85.2
}

on (rollOut) {
logoinstance.removemovieclip()
}
The attached movie is a .swf file,
I need the attached movie run a few actions and play animations, how do you
recommend I get around this?
Also, it needs to be contained in one frame.
Re: actions kglad
7/18/2004 8:49:59 PM
Re: actions WickedSense
7/18/2004 9:42:48 PM
perhaps I am going about playing the movie wrong, should I be loading a .fla
file instead? I really need funtional animations and actions within a movie to
be displayed on a rollover and contained in one frame.
Re: actions kglad
7/19/2004 1:04:56 AM
Re: actions WickedSense
7/19/2004 1:20:45 AM
I am an amature to actionscript, but am not baffled. I do not always know the
best course of action to do certain things. I'll let you know how the loadmovie
goes.

By targetMC, are you implying I need an empty movie clip on the stage to load
my movie into? If thats the case I will use the help section to learn creating
an emptyMC with actionscript.
Re: actions kglad
7/19/2004 4:39:27 AM
don't import your swf. it will be added to your movie at run-time complete
with all actionscript. in your main movie you can use:

_root.createEmptyMovieClip("mc1",1);
mc1._x=129; // position this clip where you want your load movie to appear
mc1._y=85.2;
mc1.loadMovie("yourswf.swf"); // start loading yourswf immediately upon entry
to your movie
mc1._visible=0; // make it invisible, though because i know you don't want
it to appear until something undergoes a rollOver event. you may need to put a
stop() in frame one of yourswf.swf

and attached to your movieclip who's rollOver you want to trigger the
appearance of youswf.swf use:

on(rollOver){
mc1._visible=1;
// you may need a mc1.play(); statement here
}
on(rollOut){
mc1._visible=0;
// you may want a mc1.gotoAndStop(1); statement here
}

Re: actions WickedSense
7/20/2004 12:01:36 AM
Re: actions kglad
7/20/2004 2:09:49 AM
oops, the _visible property will be reset when loading is complete. we should
use mc1's _alpha property instead because that property will be inherited by
the loaded movie.

the stop(); should be in your external movie although this won't matter
unless there are sounds in your external movie that we need to stop. if there
are no sounds you don't need to put a stop() in frame1 of your external movie
and can use:

_root.createEmptyMovieClip("mc1",1);
mc1._x=129; // position this clip where you want your loaded movie to appear
mc1._y=85.2;
mc1.loadMovie("yourswf.swf"); // start loading yourswf immediately upon entry
to your movie
mc1._alpha=0; // make it invisible, though because i know you don't want it to
appear until something undergoes a rollOver event. you may need to put a stop()
in frame one of yourswf.swf

and attached to your movieclip whose rollOver you want to trigger the
appearance of youswf.swf use:

on(rollOver){
mc1._alpha=100;
mc1.gotoAndPlay(1);
}
on(rollOut){
mc1._alpha=0;
mc1.stop();
}
AddThis Social Bookmark Button