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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Movie Clip continuation

Status
Not open for further replies.

rissac

Technical User
May 9, 2003
79
IN
Hello, I've created a movie clip rollover effect so when the user rolls over the still image the movie clip plays. What I want to be able to do is when the user rolls on and off the image the movie clip continues playing from where it last played. The way it works now is the movie clip starts from the begining of the movie everytime the mouse rolls over the clip. Is there a way to make this happen? Example below.


Serge Eustache
 
Here is what I have. First the rollover is not operated by a button. I'm placing a movie clip in side a scene. On the first frame of the movie clip I have a {stop} command which is on my jpeg. And the second frame start the actually movie loop. For my scene I have a script that basically says the following. How would I tell it to contine the movie where it left off?

on(rollOver) {_root.loop1.gotoAndPlay(2);}

on(release) {geturl"http:...";}

on(rollOut) {_root.loop1.gotoAndPlay(1);}



Serge Eustache
 
paused = false;
on(rollOver) {
if(!paused){
_root.loop1.gotoAndPlay(2);
else{
_root.loop1.gotoAndPlay(myFrame)
}
}

on(release) {geturl"http:...";}

on(rollOut) {
myFrame = _root.loop1._currentFrame;
paused = true;
}


above ought to work...untested


however you may want to play around with the code a bit more as if users allow the clip to play to the end they can not restart it. also you may want to hide the clip on rollout
 
Thanks, I'll try that and get back to you.

Serge Eustache
 
Hello these are the errors I get. Can you help me with this?




**Error** Scene=Loop1, layer=button_Set, frame=1:Line 1: Statement must appear within on/onClipEvent handler
paused = false;

**Error** Scene=Loop1, layer=button_Set, frame=1:Line 5: 'else' encountered without matching 'if'
else{

**Error** Scene=Loop1, layer=button_Set, frame=1:Line 10: on handlers may not nest within other on handlers
on(release) {geturl"
**Error** Scene=Loop1, layer=button_Set, frame=1:Line 2: Statement block must be terminated by '}'
on(rollOver) {

**Error** Scene=Loop1, layer=button_Set, frame=1:Line 22: Syntax error.

Total ActionScript Errors: 5 Reported Errors: 5

Serge Eustache
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top