Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 10th, 2003, 09:07 AM
GoMo's Avatar
GoMo GoMo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: London, UK
Posts: 295 GoMo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 27 m 21 sec
Reputation Power: 5
Send a message via MSN to GoMo
Rewind/Reverse Play in Flash

hey,

so far, i have created a movie which contains another movie from an external .swf file.

i am trying to set up some playback controls for this embedded movie and so far have only implemented the play and pause buttons with the code 'submovie.play()' and 'submovie.stop()' respectively.

is there any way, in which the submovie can be played in reverse at the current framerate when the 'rewind' button is pressed?

thanks

Reply With Quote
  #2  
Old November 16th, 2003, 08:20 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,715 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11109 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 50 m 46 sec
Reputation Power: 580
Facebook MySpace
Hi,

You could do it by having a new empty movie. Call it "rewinder". In the first frames actions enter:

if(_parent._currentframe != 1)
{
_parent.gotoAndPlay(_parent.prevFrame());
}
else
{
_parent.gotoAndPlay(_parent._totalframes);
}

and in the second frame enter:

gotoAndPlay(1);

Now place this movie on the timeline which you want to play in reverse.

This can be activated by a button calling:
rewinder.gotoAndPlay(1);

and deactivated by calling:
rewinder.gotoAndStop(1);

This avoids having for() loops etc and allows you to control when to stop rewinding. In the above I made it loop back to the last frame when it reaches the start.

Hope this helps. If it doesnt maybe I can make a short fla for you to demo it out.
-Tann

Reply With Quote
  #3  
Old November 20th, 2003, 10:30 AM
GoMo's Avatar
GoMo GoMo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: London, UK
Posts: 295 GoMo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 27 m 21 sec
Reputation Power: 5
Send a message via MSN to GoMo
thanks for your help, it works a treat ... it's just a shame the client doesn't need it anymore. i tried it out and works fine. i will be using it in the future for other projects.

thanks tann

goran (GoMo)

Reply With Quote
  #4  
Old February 8th, 2004, 09:02 PM
lapidus lapidus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: philly
Posts: 21 lapidus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to lapidus Send a message via Yahoo to lapidus
reverse play

I have a movie tween setup, that only gets played with a rollover, i want the movie to reverse play to frame 1 when the user scrolls out of the setup area, i've attempted to implement the following code the movie starts at frame 2, so it should continualy go backwards until frame 1. menutween is the name of the movie clip

menutween.onRollOut = function() {
if(_parent._currentframe != 1)
{
_parent.gotoAndPlay(_parent.prevFrame());
}

};

also tried this:

menutween.onRollOut = function() {
if(_root._currentframe != 1)
{
_root.gotoAndPlay(_root.prevFrame());
}

};

and this:

if(rewinding)
{
_root.gotoAndPlay(_root.prevFrame());
}
_root.menutween.onRollOut = function() {
rewinding=true;
};

the starting frame sets the value of rewinding to false.

any suggestions? or how can i do this, or if you need me to post my fla please let me know.

Last edited by lapidus : February 9th, 2004 at 01:15 AM.

Reply With Quote
  #5  
Old February 9th, 2004, 08:24 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,715 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11109 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 50 m 46 sec
Reputation Power: 580
Facebook MySpace
Hi:
Code:
function rewindNow()
   {
      if(_root._currentframe != 1)
         {
            _root.gotoAndPlay(_root.prevFrame());
         }
      else
         {
            clearInterval(rewinderIntV);
         }
   }

_root.menutween.onRollOut = function() 
   {
      rewinderIntV = setInterval(rewindNow, 1);   
   };


You could swap the setInterval stuff in favor of onEnterFrame, you can use your rewind = true/false var in place of set interval and clear interval...well hope you get the idea :¬)
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
  #6  
Old February 9th, 2004, 08:43 PM
lapidus lapidus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: philly
Posts: 21 lapidus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to lapidus Send a message via Yahoo to lapidus
ok i tried to implement what you said but i want it to be a reverse play ability, rather when i changed it would instantainiously go back to scene 1 so i attempted the following and it's still not working, i looked up the set interval function and the syntax for it is (functionname, x) where x is time rate, 1000 = 1 second, i changed the 1 to 1000 and it still went back to frame 1 the thing is, the thing that's rewinding is a tween so i'm not sure if that makes a differece, any way i changed it to this: and it's still not working, it's just going right back to frame 1, any help very much appreciated let me know if you need me to upload the fla

contents of frame 1

function rewindNow(object)
{
if(_root._currentframe != 1)
{
object.onEnterFrame = function()
{
if (_root.currentframe != 1)
{
_root.gotoAndStop(_root.prevFrame());
}
}
}
else
{
clearInterval(rewinderIntV);
}
}

menu.onRollOver = function() {
gotoAndPlay(2);
};
stop();

contents of frame 2-80:

_root.menutween.onRollOut = function() {

rewinderIntV = setInterval(rewindNow(_root.menutween), 1500);

};

Reply With Quote
  #7  
Old February 10th, 2004, 12:41 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,715 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11109 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 50 m 46 sec
Reputation Power: 580
Facebook MySpace
Hi, could you post your .fla as a zipped attachement. I need to see this for myself...sorry.. :¬)

ps..needs to be in MX or earlier for me, cant read MX2004 files. You should be able to backsave with 2004.

Reply With Quote
  #8  
Old February 10th, 2004, 01:06 PM
lapidus lapidus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: philly
Posts: 21 lapidus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to lapidus Send a message via Yahoo to lapidus
thank you for the help

here it is:
Attached Files
File Type: zip post.zip (10.1 KB, 343 views)

Reply With Quote
  #9  
Old February 10th, 2004, 03:06 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,715 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11109 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 50 m 46 sec
Reputation Power: 580
Facebook MySpace
Hi, it's pretty tough when you have it set up as you do. I dont think it will work in your current configuration. It would be easier if you had the same instance in the last keyframe instead of a seperate movie. Why dont you just make it one big movie instead of having three seperate ones? That would make the code a synch to plugin.

Reply With Quote
  #10  
Old February 24th, 2004, 09:30 AM
vicvos vicvos is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: South Africa
Posts: 13 vicvos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to vicvos
reverse frames in flash

I have a number of different images over a timeline; they all move from right to left over the stage, so as to appear to be on a "film".
The idea is that I have a couple of different buttons, and they will "move" you to a different section of that "film" so it looks like it is forwarding and rewinding the "film".
I can do the forward no problem, I simply put stop actions in and then "play"; but how do I go in reverse?
pleez hulp

Reply With Quote
  #11  
Old February 24th, 2004, 01:20 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,715 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11109 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 50 m 46 sec
Reputation Power: 580
Facebook MySpace
Hi, you can do that by using the buttons to set a variable in the film movie. Let's call it "forward" for now. So on the forward button we would have:
Code:
on(Release)
   {
      forward = true;
   }

and on the backward button:
Code:
on(Release)
   {
      forward = false;
   }

Then on each keyframe where you currently have the stop() action replace that with:
Code:
if(forward)
  {
      // You should only use either play() or gotoAndStop() below
      // If it just plays forward continuously
      play();
      // If it's frame by frame
      gotoAndStop(nextFrame());
  }
else
  {
      // Again you should only use one of the following
      // If it just plays backwards continuously
      gotoAndPlay(prevFrame());
      // If it's frame by frame
      gotoAndStop(prevFrame());

   }

Last edited by Tann San : February 24th, 2004 at 01:23 PM.

Reply With Quote
  #12  
Old February 25th, 2004, 01:54 AM
vicvos vicvos is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: South Africa
Posts: 13 vicvos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to vicvos
Hi there, thanks so much for your help.
The code looks good, and I cant understand why its not working for me, Ive attached my try file, could you have a look?
Thank you very much

Reply With Quote
  #13  
Old February 25th, 2004, 06:25 AM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,715 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11109 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 11 h 50 m 46 sec
Reputation Power: 580
Facebook MySpace
Hi, here it is. I used setInterval instead along with updateAfterEvent(). My other longer answer was a bit off. I thought you had say 20 keyframes next to each other. It wouldnt work with the setup you had.
Attached Files
File Type: zip Rewinder.zip (205.5 KB, 403 views)

Reply With Quote