PDA

View Full Version : play till...


snoopy13
02-12-2003, 07:20 AM
hello
I try to tell a button to play till a certain frame comes (for navigation) and then stop. It should not goto that frame but play till it reaches it. I've tried with play while _currentframe<20 etc. but it didn't work.
can anyone please help me??
thanks a lot!

sputnikinspace
02-12-2003, 09:49 AM
ehh...maybe I am misunderstanding what you are trying to do..

Make a stop(); action on the frame it should stay on

/sput

snoopy13
02-12-2003, 09:57 AM
I can't use stop, as the movie doesn't have to stop at the same points all the time. the point, where it should stop depends on which button is clicked. eg. with button 1 the movie should play and stop at frame 10. if you click button 2 the movie should play from 1 and stop at frame 20
any idea?

sputnikinspace
02-13-2003, 06:37 AM
post a fla file!!

snoopy13
02-13-2003, 07:12 AM
ok, i've attached a fla. the original is to big, so I've tried to make up the same problem in small
there are three buttons called frame 1 frame2 and frame 3, from clicking button 3 should make the movie play from wher it is to frame 30 and stop. clicking button 2 should make it play to 20 and stop.
hope, this is not too conufusing and someome can help!!
thaks a lot!

sputnikinspace
02-13-2003, 12:25 PM
goto this thread:

http://skyscraper.paregos.com/swf/index.htm

enter - click free your mind-flash class

download xmove of dynamic movieclip

this should be what you are after!!

cheers
/sput

sputnikinspace
02-13-2003, 01:15 PM
or...

- maybe you could do a variable(= currrent frame) thats equal to the frame on the root.. and the greenMc with an own timeline.

- Make a listener that checks the currentframe and makes the GreenMc goto variable + 1

- This combined with a couple of if's and else should maybe get it to work - to make it stop when it reches the variablenumber which is equal to a position under the current button

any programmers out there???

on the other hand - this is a much more complicated way of diong this- the paregos file is easier....never mind
/sput

snoopy13
02-13-2003, 02:58 PM
hy sput and thanks for your help.
the link is not quite what i need, as my green box is in reality not just a box moving but a much more complex thing. the idea with the variables is good, but I have problems with it...cause I havent used variables before..
I tried to setVariable frame =_currentframe in a frame action and then tell the button to:
on (release) {
if (frame < 10) {
play();
} else {
stop();
}
}
but it doesn't work. why????
thanks for helping!

sputnikinspace
02-13-2003, 04:48 PM
ok this is how you can solve it with tweens..

ask if theres is anything you don't understand

cheers
/sput

snoopy13
02-14-2003, 08:43 AM
thank you very much sput!!
I looked at your file and think I understand. I'll try imediately!

sputnikinspace
02-14-2003, 09:00 AM
I'm glad that I could help you a bit

cheers
/sput