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!

How can I get a movie to play in reverse and stop at a framelable?

Status
Not open for further replies.

timlap

Instructor
Oct 26, 2000
4
US
The subject sort of says it. I'm trying to get a movie to play in reverse and stop at a frame label. Or if not that, to play in reverse for X number of frames.

Thanks very much.

 
do you want this to happen automatically or on a button click...slightly different approach

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
I have an inquring mind <I know, read the Inquirer - smile>, so I'd like to know both, but I was asking mostly about a button.

Situation: I have a slide show where the pictures move from right to left into the viewer. I have a button that says, previous so in I want the picture to move back to the previous slide, left to right.

Thanks
 
can you post the fla

there are a number of questions raised given those extra details and swiftest answer will come that way

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Here's an sample of what I'd like to do. I've tried to label the buttons with enough description to give you and idea of what I'd like to do.


Thank so very much for helping me with this.

PS: I'm writing from a different location, so my handle is different, but I'm the same person (I think).
 
file altered (same download0 as wasnt stopping reliably at frame label

now stops on frame number and seems fine
 
It was so kind of you to do this. I really appreciate it. I'm going to study the programming to learn from your efforts.

If you'd be up for one more challegne, one of the things I found is that when you push the button labeled, &quot;run movie from right to left,&quot; twice (something that's easy for a nervous visitor to do) the aninmation speeds up and the other buttons no longer work.

Any thoughts on this?

If you don't have any more time to work on this, I understand, you where very generous to provide the time that you did on this.

Thanks again.

 
easy fixed...i just missed a line of code from the button
this should sort it

on (release) {
clearInterval(back)
back = setInterval(_root.reverses,80);
}
 
Thanks. That indeed does the trick. This is the only clear information I've seen on this problem.

I really appreciate this, and what you contribute to the forum (even though I've new, I can see you've posted a lot. Enjoy your weekend.
 
It's me again. Sorry, but I have about 5 back labels (or frame numbers I need to go back to. Will the function with the 9th frame limit that?

Here's the actual application.

I need to play the artist pictures backward to the previous one with the back arrow button. Right now, they go back to labels.

 
frame 1 of the pic sequence

stop();
function reversing(){
if(count<14){
prevFrame();
}else{
clearInterval(back)
}
}

back button

on (release) {
clearInterval(back);
_root.count = 0;
back = setInterval(reversing,80)
}

all other buttons must have a clearInterval(back) added

in future you might want to give your buttons instance names then the code only has to appled once (in the frame actions)
 
function reversing(){
if(count<14){
prevFrame();
count++;
}else{
clearInterval(back)
}
}
change the 14 to whatever number of frames you wish to go back
 
Thank you very much. I'm short on time today. but I'll give it a whirl tomorrow morning.

Thanks again for helping me.
 
Actually, I just had a chance to test it. I discovered you can only click the back button once and then it no longer functions.

I put:

function reversing(){
if(count<14){
prevFrame();
count++;
}else{
clearInterval(back)
}
}
In an action frame and:

on (release) {
clearInterval(back);
_root.count = 0;
back = setInterval(reversing,80)
}
in the back button.

 
did you put the code on all your back buttons

i noticed that after each keyframe the buttons appear again and so need coded again. looked to me that there was a lot of copy and paste to do.

hence my remark about instance names for buttons.

 
Yes, I put the code in each button. It still seemed to work only once. Even on the first back button, if I went ahead again, the first back button won't work.

I have now named all buttons &quot;back&quot;. Do I have to set it up as array for the programming to address all back buttons?

 
Here's another way of doing it...


Regards,

cubalibre2.gif

Bacon, eggs and sunshine are still good for me!
 
Thanks oldnewbie. The movie does indeed reverse as a stand alone swf. One thing I didn't mention was that this movie loads into a target movie called, &quot;artist movie&quot;. I didn't mention it because I thought if I just changed the coding for the path it would work - it doesn't.

Here's the url for the web site I'm working on for a good friend of mine. It's
I changed the path in the frame coding as follows:

function reverseMe(){
_root.artist_movie.artist_mc.onEnterFrame = function(){
if(_root.artist_movie.artist_mc._currentframe > 1 + _root.curPos){
_root.artist_movie.artist_mc.gotoAndStop(_level0.artist_movie.artist_mc._currentframe - 1);
} else {
_root.artist_movie.artist_mc.onEnterFrame = null;
}
}
};
stop();

Any suggestions for how to fix this.

Thanks to both of you for your insight. I'm learning a lot as a young newbie. I'm sorry my thread has gone on so long.
 
The easiest, if you don't want to change the scripts in &quot;artist.swf&quot;, would be to load on another level rather than loading in a container clip. Then, outside of a potential positioning problem which can be easily solved, the movie would work as I initially scripted it.

If you persist in wanting to load it in a container clip, you have to make the changes you made above (assuming your container clip in your main movie is named &quot;artist_movie&quot;, but you also have to change the reference to the reverseMe function from _root.reverseMe(); to _parent.reverseMe(); on all of the back buttons.

If you do that the artist.swf won't work on it's own, and only will when loaded in the main movie.

The other choice would be to leave it to _root.reverseMe();, but to define the function in the main movie rather than in the artist.swf itself.

But as I said I'd try loading on a level rather than the container clip, with the artist.swf having my original scripting...

on(release){
loadMovieNum(&quot;artist.swf&quot;, 3);
}

...Would load the movie on level 3, without having to change any scripts.



Regards,

cubalibre2.gif

Bacon, eggs and sunshine are still good for me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top