monday flash Q
- Started
- Last post
- 11 Responses
- jpea
ok, so i'm trying to tell a loaded swf in level1 to gotoAndPlay say, frame label 'go'. i'm not calling it from a button action or anything though. if a mc on level0 is within a certain coordinates, i tell a mc on the root timeline to gotoAndStop at some frame inside of it. on that keyframe i set a variable,
nextMovie='something.swf'
level1.gotoAndPlay('go')then at the end of the level1 timeline the last frame is
loadMovieNum(nextMovie, 1)i can load movies fine from inside the level0 clip, and it seems to pick up the variable i set, but i can't for the life of me tell the swf on level1 to gotoAndPlay('go')
ideas?
i can probably post an fla when i get home tonight
- JazX0
you could tell it to go to the next scene but that's not a good way of doing it
- mennik0
Wild guess, try talking to _level1 instead of level1.
g/l
You did the ok works site. Kinda liked that.
- unfittoprint0
*bigger aansmaller substitute the arrows
//It's never a good idea to call levels. Call the target object [MC] directly.
loopCoords = function(x1,x2,y1,y2){
if(MC._x bigger x1 && MC._x smaller x2 && MC._y bigger y1 && MC._y smaller y2){
targetMC.gotoAndPlay("go!);
}checkCoords = function(x1,x2,y1,y2){
clearinterval(coordsLoop);
coordsLoop = setInterval(this, "loopCoords", 30, x1, x2, y1, y2);
}//usage ie.
checkCoords(100,200,50,400);andother thing use loadMovie instead of loadMovieNum:
myMC.loadMovie(nextmovie);
- jpea0
hmm.. already tried the _level1, level1, yadda..
just can't figure out why it wouldn't work
still stumped.
- JazX0
unfit should be promoted in NT
- jpea0
so if i load the swf into a mc on the root timeline, i'm able to say something like:
nextMovie="something.swf"
contentMc.gotoAndPlay('go')and then in the last frame of something.swf loaded into the clip 'contentMc' i'm able to say
loadMovie(nextMovie, 'content')haven't tried it yet.. gotta wait till i get home
but why is it better to load into a mc than levels? (sorry if it's an overasked question)
- unfittoprint0
OOP [object oriented programming] let's you treat everything [variables, sounds, xml, movieclips] as objects .
Since the thing you want to control is a movieclip is rather unusual to try control the level is in it instead.oh and inside the contentMC, you should write [instead of what you posted] to update its content:
this.loadMovie(nextMovie);
- jpea0
ah, the wise unfit explains
thanks for the help!
- unfittoprint0
question time:
in your ok-works site the images in each section have a very nice transition: masks, AS driven or sequence of images?
nice work, btw.
- jpea0
scripted mask
http://containedenvironment.com/…
- Anarchitect0
thanks.
*raises glass