Rewind On Rollout
hey everyone, i m having problem, i created this menu.now its working perfect but i want it to go to frame 1 when roll out http://ammardesigns.com/flash/flash.html now if i cross on button fast enuff or horizontally. the movie remains still and doesnt go back and stop. i want it to go to normal state when roll out.
SitePoint > Design Your Site > Flash and Actionscript
Posted on: Apr 15, 2008, 09:30
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Auto Rewind Video AS3 On Rollout
I have a script that plays a video when you roll over a button and stops and disappears when you roll out. However it does not rewind and will start to play mutiple times occasionally. Does anyone know what I can add to have it rewind automatically each time I roll out? Here is the script:
function onRolloverThr(event:MouseEvent):void
{
rmr.alpha = 0;
thrOval.x += 30;
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
videoStream.play("myvid.flv");
var metaListener:Object = new Object();
metaListener.onMetaData = onMetaData;
videoStream.client = metaListener;
var video:Video = new Video();
video.attachNetStream(videoStream);
addChild(video);
video.x = 200;
video.y = 200;
video.alpha = 1;
function onMetaData(data:Object):void
{
thrOval.addEventListener(MouseEvent.CLICK, playMovie);
thrOval.addEventListener(MouseEvent.ROLL_OUT, allstop);
thrOval.addEventListener(MouseEvent.MOUSE_OUT, alphoutMovie);
}
function playMovie(event:MouseEvent):void
{
videoStream.play("myvid.flv");
}
function allstop(event:MouseEvent):void
{
videoStream.pause();
}
function alphoutMovie(event:MouseEvent):void
{
video.alpha = 0;
}
}
function onRolloutThr(event:MouseEvent):void
{
rmr.alpha = 1;
thrOval.x -= 30;
}
thrOval.buttonMode = true;
Auto Rewind Video AS3 On Rollout
I have a script that plays a video when you roll over a button and stops and disappears when you roll out. However it does not rewind and will start to play mutiple times occasionally. Does anyone know what I can add to have it rewind automatically each time I roll out? Here is the script:
function onRolloverThr(event:MouseEvent):void
{
rmr.alpha = 0;
thrOval.x += 30;
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
videoStream.play("myvid.flv");
var metaListener:Object = new Object();
metaListener.onMetaData = onMetaData;
videoStream.client = metaListener;
var video:Video = new Video();
video.attachNetStream(videoStream);
addChild(video);
video.x = 200;
video.y = 200;
video.alpha = 1;
function onMetaData(data:Object):void
{
thrOval.addEventListener(MouseEvent.CLICK, playMovie);
thrOval.addEventListener(MouseEvent.ROLL_OUT, allstop);
thrOval.addEventListener(MouseEvent.MOUSE_OUT, alphoutMovie);
}
function playMovie(event:MouseEvent):void
{
videoStream.play("myvid.flv");
}
function allstop(event:MouseEvent):void
{
videoStream.pause();
}
function alphoutMovie(event:MouseEvent):void
{
video.alpha = 0;
}
}
function onRolloutThr(event:MouseEvent):void
{
rmr.alpha = 1;
thrOval.x -= 30;
}
thrOval.buttonMode = true;
Problem With 3 Functions Button > On (rollOver) On (rollOut) On (rollOut) ...
on (rollOver) {
tellTarget ("_root.maitre_reception") {
gotoAndPlay (300);
}
}
on (rollOut) {
tellTarget ("_root.maitre_reception") {
gotoAndPlay (1);
}
}
on (rollOut) {
tellTarget ("_root.maitre_reception") {
gotoAndPlay (320);
}
}
. .. ... .... ..... ...... ........ ......... . .. ... .... ..... ...... ........ .........
A Button assigned with action above is used to control movie
clip , maitre_reception , when mouse is rolled over and rolled out ;
that works fine except that has the inconvenient to force me to
maintain the mouse over the button after releasing the click
in order to work - by obvius reasons because if I click and
roll out the mouse cursor it occurs the second condition:
on (rollOut) {
tellTarget ("_root.maitre_reception") {
gotoAndPlay (1);
causing the movie to go and play 1 before movie goes and
play 320 ;
Is there a way to avoid that ?
(to ensure only one click makes it
to play frame 320 even if cursos has been rolled out )
. .. ... .... ..... ...... ........ ......... . .. ... .... ..... ...... ........ .........
A Rollover/rollout Movieclip With Rollover/rollout MC's Inside It
Hi there, I am trying to figure out how to make a bottom bar similar to the one seen on www.1000pis.com how he's got clips with animations inside the bar- here's what I've got so far: http://cg.psdsliced.com/test1/ - as you can see I have a date/time MC inside the bar_mc which is working fine but whenever I try to have a new rollover/rollout movieclip (or button) inside the bar_mc it won't work/won't show rollover animation.
so does anyone know how the guy at 1000pis.com does it or can offer me any help at all?
Rewind
I read the "building a rewind engine" tutorial, but it is for Flash 4, and the code doesn't translate properly. Does anyone know the Flash 5 method? thanks! -Fred
Rewind
Hi I have a move and wish to once a button is clicked once play a section backwards to a point where it will stop ( using the stop command) I have read the tutorial on this site but it is not very useful could anyone help me. Thanks for reading and any help you give me
Yours faithfully
Sam
Rewind?
How do you rewind an animation back to frame 1 when the user clicks a button?
Rewind
I need a basic actionscript for a rewind button, but i can only find ones for mc's which are gotoandstop commands.
The thing is i want to rewind my clip on mouseover frame by frame, like prevframe, but i want it to stream (i.e. be smooth)/ maybe theres some kinda prevframe loop?
thank you!
Rewind Mc
heres the mc www25.brinkster.com/tilly001/index
when you close the map I want to rewind play to the firs frame where the buttons are. I thought of duplicating the frames in reverse but just to rewind would be easier.
please could you help me as im not sure how to do this.
Rewind
I'm trying to figure out if there is any easy way to create a rewind button in a movie that you can hold down, or press once and will effectively play the movie backwards untill the button is realeased or another one is pressed. Can anyone offer any help?
Cheers, Keef
Rewind
hello you fantastic people out there.. .
please could someone help? i have built a movie that builds a complex animation. what i want to happen is when i click on button a within the moview it plays the animation build backwards and then goes to page a, or when i press button b, the movie plays backwards and goes to page b.. .
hope i have explainied this well enough...
many thanks in advance
tasvin
Rewind Please....
I know it's possible to have a MC clip play backwards, but is it possible to do this in your main movie timeline? FLASH MX.
Rewind Help
I have two buttonS on a movie clip.
On rollover one button plays the mc and stops on rollout.
I want the other button on rollover to rewind and stop on rollout.
Can anybody help me please.
Rewind
how do i get a movie clip to play forwards then backwards and then just carry on bouncing between the first along to the last frame and then back again....
I know its probably obvious but i am a newbie
Rewind
Is there an actionscript code that rewinds back to like 10 or 5 frames? Can someone please tell me it please
How Do I Rewind My FLV?
I have an flv on the stage...with an instance name. How do I tell it to rewind.
This is the code I'm using to tell it to pause. Which is simple.
on (release) {my_flv.pause();
}
Why is making it rewind seem so much more difficult? Can you help me with the code it would take to do that?
Thanks.
Rewind
I'm certain this has been posted a number of times before, and I thusly apologize for not searching - but time is of the upmost importance. This has to be working by 8am tomorrow morning or my head will roll. Thanks whipsers and viknight for your help on this.
The good news is, I went back to basics and have everything working except the menus scrolling back up when you leave them!! This is exciting, especially since I now understand the constructs that make all this happen the way it does.
All I need now is to make the menus roll back up. Anybody have a clean idea or two on how I can make this happen. FLA is available here: http://www.d-w-t.com/pom_menu.fla
I've saved it to mx 2004 format, but I'm using flash8 w/ actionscript 2
Again, I apologize for not seraching old posts, but I'm too short on time for that sort of goose chase.
Thanks!
Rewind
Folks...
How do you rewind a function to the begining after it ends using
the tween classes. I created a screen savor that needs to run, rewind from the beginning, then run again, and so fourth.
thx.
Rewind?
Is it possible to make a Flash main timeline play backwards?
I want a load/unload document that has animation and then the same animation out, rather than copying the frames and enlargening the document, i was wandering if i could rewind the timeline as there are no 'important' symbols running on it.
I would probably use a variable:
Button(on frame 170-250) to cause rewind:
Code:
on(release){
Load = "1"
gotoAndStop('165');
}
On Frame 165:
Code:
if (Load == "1"){
**Rewind script**
}
Flv Rewind
I dont know why but im struggling to seek a video flv component using a button which when pressed seeks to the current time - 1 say. But its not working
I think there is a better method ?
How would you do it..
I have
Code:
this.onEnterFrame = function() {
if (rewind == true) {
trace("rewinding");
var currentTime = video1.playheadTime;
var rewindTo = currentTime-1;
trace("rewind to "+rewindTo);
video1.seek(rewindTo);
} else {
trace("STOP");
}
in this code the button sets the rewind flag...but the movie doesnt run as expected.
Rewind
I'm trying to make a button that will go back one frame until it is on the last one (at which point it will stop). This is my idea of a rewind button.
This is what I have so far:
Code:
var cFrame = int;
cFrame = 85;
this.backwards.addEventListener(MouseEvent.CLICK,BackWards);
function BackWards(event:MouseEvent):void {
while (cFrame > 1) {
this.prevFrame();
cFrame = cFrame - 1;
}
}
backwards is the button that performs the rewind once it is pressed. However, when I compile the script, and press the rewind button, it freezes on a random frame in the middle. I think that it goes too fast. Is there a way to delay a few milliseconds between each loop?
Btw, I also tried it like this:
Code:
var cFrame = int;
this.backwards.addEventListener(MouseEvent.CLICK,BackWards);
function BackWards(event:MouseEvent):void {
cFrame = currentFrame;
while (cFrame > 1) {
this.prevFrame();
cFrame = currentFrame;
}
}
That's pretty much the same thing, and it heeded the same result.
How Do I Tell My Flv To Rewind?
I have an flv on the stage...with an instance name. How do I tell it to rewind.
This is the code I'm using to tell it to pause. Which is simple.
on (release) {my_flv.pause();
}
Why is making it rewind seem so much more difficult? Can you help me with the code it would take to do that?
Thanks.
Please Help Me Fix This Rewind Bar
I am using a pre-made rewind/fast forward button for my movie. It can be found here:
http://denvish.net/ulf/020707/75210_MovieControl.fla
The problem is that my movie has four scenes and the bar disappears after the first scene.
How do I fix this? If you are aware of another pre-made bar that I can use instead, I would also appreciate that.
How To Do A Rewind In AS3 ?
Hi,
Firstly, sorry for my poor english ;-)
I work on a project in AS2 that i have to up in AS3. In that project, I have some clips I use as buttons. This clips are animated when the mouse is over, and the animation rewind when the mouse is out.
But, in AS3, I don't have the function "Rewind". How can I do ? Here the code :
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
_root.gotoAndPlay("legroupe");
}
Edited: 01/25/2008 at 04:57:45 AM by Steph2dijon
How Do I Tell My Flv To Rewind?
I have an flv on the stage...with an instance name. How do I tell it to rewind.
This is the code I'm using to tell it to pause. Which is simple.
on (release) {my_flv.pause();
}
Why is making it rewind seem so much more difficult? Can you help me with the code it would take to do that?
Thanks.
ReWind
How can I tell an external .swf loaded into a container movieclip to rewind from a particular point using a button outside of the external .swf ?
Rewind
How can I rewind the main stage... And by rewind I mean frame by frame... not just jump into one frame. I'm new here... And looking forward to staying. Anyone knows?
MC Won't Rewind
This ought to be something simple. For some reason, it's not!
I've got an mc that attaches to container1. When my _xmouse gets to less than 350, I want the mc to roll back up and it isn't.
The code in paritcular is on either the actions layer of the first frame or on the mc 'containee'.
link! http://www.geocities.com/motiongraphics81/vex2.fla (2 mb)
Big props to anyone who can help out.
-Dan
How Do I Tell My Flv To Rewind?
I have an flv on the stage...with an instance name. How do I tell it to rewind.
This is the code I'm using to tell it to pause. Which is simple.
on (release) {my_flv.pause();
}
Why is making it rewind seem so much more difficult? Can you help me with the code it would take to do that?
Thanks.
Rewind Flv
I am trying to make a projector with 3 pages. On one page a video is loaded via the FLVplayback component. The problem when playing the projector is that if the video is still playing while I go to another page, the video does not rewind. If I go back to the video page, the video plays very fast to the frame it was before and then continues playing at a normal speed. I guess I would need to add some code to the navigation buttons so that the video rewinds and stop. I would greatly appreciate any help or a link to a tutorial
Thanks
Rewind When Rolloff Mc
hi
please could someone help me with this as i'm pretty sure it can be done! i have a series of mclips.. . when i rollover i want them to play, when i rolloff i want the movie clip where ever it is to automatically play backwards from that point back to the first frame.. .
many thanks in advance.. .
tasvin
Rewind Mc/ Mdesign Help
thanks for your help but i dont gettit really. I tried what you suggested see bottom 3 floors
http://www25.brinkster.com/tilly001/index.html
how can i put up the .fla file so you can see it in all its glory.
thanks
please help if you can
REWIND Frame
hi, guy
Any simple idea to make a button for REWIND frame, that mean the TIMELINE opposite run and can stop in a LABEL or frame number !
thank :-)
Rewind A Movieclip?
Ive got a button that when the user clicks, a movieclip gets rewound frame by frame like playing it backwards, until it gets to frame 1. Does anyone know some code for this?
thanks
Rewind A Movie
When I press a button at frame 20, the movie should go back like frame19,18,17,16,...,1
The button is on frame 20 and when you press the button, the movie should go to frame 18 and then rewind
How can I fix that ?
Rewind Button
I am a rookie, and I am trying to script rewind button that I chose from the common library. I can load the movie and make it play, stop, and pause, but I can not figure out how to make it rewind or fast forward. I would like the user to click and hold the rewind button and have the movie rewind, and when they let go, have the movie start playing again. Any suggestions? I included the file.
Rewind/Backwards Help
Hi there,
I see that this code was posted in this section before to reverse/backward a movie clip.
[code]
button_mc.onPress = function(){
this.onEnterFrame = function(){
your_mc.gotoAndStop(_currentframe-1);
}
}
//
button_mc.onRelease=function(){
this.onEnterFrame=null;
}
I understand what this code does...but don't have a clue how to use it in context of my movie clip. I have a clip that I wish to reverse with a button that controls that so when the button is selected the movie clip rewinds to the first frame and stops. Do I put the button inside the clip or on the main timeline where my clip is, also what is meant by button_mc? What has to be changed there? And also does this or your_mc have to be changed?
Give me your feedback, I'm pretty new to this actionscript game!
The Rewind Feature
Hey there,
Can anyone tell me why the rewind feature in the flash player, kills all functions
ie.
txt.onSetFocus = function() {
row = 1;
here = 1;
};
This runs fine when its first loaded then if i rewind using the right-click rewind feature the function is no longer called, its really bugging me as to whether its possible at all or if i'm doing something wrong, any assistance would be greatly appreicated,
se.
Rewind Problem
I have flash movie that uses rewind but it wont stop at the frames I tell it to, it just keep rewinding. ontop of that, once it stops at the frame its told to and finishes rewinding I want it to go back to the first frame of the movie stay there. This is kind of hard to explain so ill add in the atachment for anyone who trys to help me.
Rewind Animation
I need help with the "prevFrame()" thing.
for e.g:
A box with text/images loads - then after clicking on a button this box with text/images should rewind and the new box with new content should load.
how can i do such thing ?
Rewind Code
I'm looking for a piece of code that will rewind a movie(ie play it backwards) when it hits the last frame so a little movie clip will just loop back and forth forever
i've seen the tutorials on how to do it but they always use buttons and a load of other stuff that makes it all complicated
Rewind Frames Help
Need help with a script.
Im making a small section of my timeline "rewind" when buttons are pressed. The scripting works, but it doesn't stop "on the rewind" at a frame, but instead goes all the way back to frame 1. Can someone help to debug?
--------------------------------------------------------
Frame 10 and 22 - Actions / Function
--------------------------------------------------------
Code:
function rewind() {
this.prevFrame();
// this function acts like a rewind button
}
upbtn.onRelease = function () { if (_root.disable2 == false) {_root.onEnterFrame = rewind;}};
function forward() {
this.nextFrame();
// this function acts like a forward button
}
downbtn.onRelease = function () { if (_root.disable == false) {_root.onEnterFrame = forward;}};
stop();
--------------------------------------------------------
Frame 22 - Actions / Function
--------------------------------------------------------
Code:
disable = false;
disable2 = false;
// variables to disable buttons actions
--------------------------------------------------------
Frame 22/Button Instance - Action
--------------------------------------------------------
**** Button Instance is called upbtn ****
Code:
on (press) {
if (_root.disable2 == false) {
_root.gotoAndStop(22);
}
}
--------------------------------------------------------
so basically if I click on the "Upbtn" to "rewind" it sends it all the way back to Frame 1. I need it to stop at frame 10
Wind And Rewind
im trying to find out what how can i turn back -like rewinding- a moviclips movement like for example http://www.techspace.com those buttons on top, how can i make my buttons to rewind back their movement? is it actionscript?
Rewind Button ?
anyone know the code to create a rewind button that will rewind a certain number of frames, say 30?
is it something like: on release, go to and Play, currentframe - 30?
any help appreciated
Play Rewind?
Hi,
Ofcourse there is the action play();, but is there also an action for rewinding like playBackwards(); or something simular???
Greetings, death
|