Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

targeting timelines

Status
Not open for further replies.
Jan 26, 2001
550
GB
hey guys, just a quick question: how can i target the main movie timeline from a frame inside a movieclip? I have tried specifying ../moviename and loads of variations but it won't let me specify a scene...

Am i going the right way about this?

Cheers guys

Nick Price
nick.price@misuk.net
 
Not sure if you are using Flash 4 or Flash 5. if you are using Flash 4 simply use level0 instead of _root and use tell target instead of with ... it will work fine.


Flash 5

use a with action or tell target and type _root in the box at the bottom

example:

on (release) {
tellTarget ("_root") {
gotoAndPlay (2);
}
}

or

on (release) {
with (_root) {
gotoAndPlay (2);
}
}

with is actually a replacement for the much depreciated tell target action which was used in Flash 4. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
sorry...you said "from a frame" so just leave off the mouse event action...


example:

with (_root) {
gotoAndPlay (2);
}

or

tellTarget ("") {
gotoAndPlay (2);
}
Ya' Gotta Love It!
sleepyangelsBW.jpg
 
left the _root off the tell target in the example (too early in the morning for this stuff)

tellTarget ("_root") {
gotoAndPlay (2);
}
Ya' Gotta Love It!
sleepyangelsBW.jpg
 
thanks mate, i am using flash 4. I have tried using level0 as the telltarget, but the scene selection box is blanked out, meaning i can only select certain frames within the same scene...My scenes have names rather than numbers- could this be it?
Just to make certain u understand what i want to do: when a movie clip in Scene1 finishes, i need the main movie to jump to scene 3.

Cheers for your help- much appreciated!

Nick Price
nick.price@misuk.net
 
that is an easy one...just name your frames using the instance panel and then target the frame label. make sure your frame names are unique from anything else in the move. In doing this I always add a -fr after all my frame names to ensure that it is in fact unique

here is an example:

tellTarget ("level0") {
gotoAndPlay ("home-fr");
}

you should not have to specify the scene if your frames are labeled and targeted in this manner.

see if that works...if not let me know... I am getting a little rusty on Flash 4 syntax. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Can't you just add a goto & play (or stop) at the end of your movie clip of scene 1. Just tried it in Flash 4, and the scene box is available and all the scenes I have in that project are listed in it!

;-)
 
cheers mate thats brilliant! im on the case. Nick Price
nick.price@misuk.net
 
give it a shot Howard...I would Imagine OldNewbie knows Flash 4 better than I.

Back when I was using Flash 4.. I was quite the newbie. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
sorry guys i think theres some confusion here. TulsaJeff, i tried your code but i can't seem to get it to work...its hard to explain what im trying to do without u seeing it..

the file is here but its 1.8 meg so might be too much if u have a slow connection:


(this ones about 700kb)

Basically i have a select screen which is a view of a microchip. When you click on a part of it, a movieclip loads which 'zooms' you down inside the chip. This movieclip takes up the whole screen. When this movieclip has finished i need it to load scene 4, rather than return to the selection screen. Using Jeffs code I end up with just a white screen so i think im still going wrong somewhere. SOrry for the confusion guys, its late in the afternoon and my head is about to implode!

Cheers guys Nick Price
nick.price@misuk.net
 
ok...I have downloaded the file....let me get this straight...


the little chip is a button which takes you to the enlarged inside of the chip when you click on it...

the enlarged inside of the chip is a movie clip.

when this mc gets thru playing 1 time...you want it to go to the 4th seen which is named "who we are"

am I correct so far?

Ya' Gotta Love It!
sleepyangelsBW.jpg
 
hey mate, sorry i didnt reply but i went home from work! Anyway u have got it right so far, except theres 3 different hotspots on the chip which take you to three different movieclips. Each of these movieclips should take you to WhoareWe, Webdesign, and Utilities respectively.

Any ideas?

Thanks alot for your help :)

Nick Price
nick.price@misuk.net
 
just incase that didnt make the hotspots mean the cyan circles on the enlarged chip view... Nick Price
nick.price@misuk.net
 
thanks old, but how can this help with my problem? Or am I just being completely thick?

Cheers mate! Nick Price
nick.price@misuk.net
 
Come on Nick!

My understanding of this (did you read the document?) is that rather than picking up the cached file, it looks for it every time on the server!
Sort of like an automatic Shift->Refresh which does exactly that! Hitting the refresh or back buttons alone just bring back the cached file!

Going out for the day. Will check in tonight!
But you should try it!

;-)
 
i get your drift matey, but my problem is how do I target the main movie timeline from inside a movieclip, and has nothing to do with whether the swf is cached or not. My swf has no dynamic content so its better if it is cached by the browser!

Nick Price
nick.price@misuk.net
 
OK guys, i seem to have found the solution to my problems so i don't need to trouble you anymore..In case you wanna know I had to use the command Tell Target(/) to refer to the main timeline! doh!

Thanks for all your time and help ;-) Nick Price
nick.price@misuk.net
 
I actually found that out too after posting yesterday. I went back and re-read my old Flash 4 Bible and about half-way thru it stated that you must use a tell target action with a goto action inside a movie clip.

Luckily..they have fixed that little problem in Flash 5.

Glad you are back at it...good luck! Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Sorry Nick,

Got mixed up in my threads this morning! I was actually answering this thread:
newbie - movie refresh
thread250-83793

...Where I will repost the info I wrongly posted to you!

Guess it's the "friday bug" someone else mentioned!

;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top