Controlling MC Playback (forwards/backwards)
Hello all! I'm Mr. Grifter and I'm new around these parts I'm also new to AS as it applies to playback control of a movieclip so here I am.
I guess I should start explaining the concept. In my file I have a movieclip (named FloorMovie) which animates a graphic of a building (over 2000px in height). At frame 1 the building's bottom floor is centered at the registration mark. At frame 17 a keyframe is create and the building's second floor is centered at the registration mark and so on every 17 frames for each floor.
Then I drop in motion tweens in the spaces between keyframes.
In the scene, I have buttons. The concept should be clear now: hit a button and the movieclips animates forward or backward and stops at the desired floor.
I have AS in the first and only frame of the scene and it contains the following:
Code:
elevSound = new Sound();
elevSound.setVolume(25);
function stepForward(MCFrame) {
if (FloorMovie._currentframe == (MCFrame-1)) {
stopAllSounds();
elevSound.attachSound("stop_elevator");
elevSound.start(0, 1);
FloorMovie.stop();
clearInterval(step_timer);
} else {
FloorMovie.gotoAndStop(FloorMovie._currentframe+1);
}
}
function stepBackward(MCFrame) {
if (FloorMovie._currentframe == (MCFrame+1)) {
stopAllSounds();
elevSound.attachSound("stop_elevator");
elevSound.start(0, 1);
FloorMovie.stop();
clearInterval(step_timer);
} else {
FloorMovie.gotoAndStop(FloorMovie._currentframe-1);
}
}
function goToFloor(TargetMCFrame) {
elevSound.attachSound("start_elevator");
elevSound.start(0, 1);
if (FloorMovie._currentframe<TargetMCFrame) {
var step_timer = setInterval(stepForward(TargetMCFrame), 30);
}
if (FloorMovie._currentframe>TargetMCFrame) {
var step_timer = setInterval(stepBackward(TargetMCFrame), 30);
}
}
... and in each button I have code similar to:
Code:
on (release) {
goToFloor(17);
}
where the 17 is the frame at which one of the floors is centered on-stage.
The funny thing is similar code worked when I had it stuffed into each button. It stopped working once I tried consolidating the functions and simplifying everything
Any assistance would be appreciated!
Thanks in advance
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-25-2003, 02:42 PM
View Complete Forum Thread with Replies
Sponsored Links:
Playing MC Backwards & Forwards
Let's say I've got a 50 frame long movieclip in level 2 and it is basically a movie which has stop-positions every tenth frame. Then I got my main movie in level 0 with 6 buttons. Now, depending on which button I press in level 0, my movie in level 2 should start playing. In fact when level 2 is stopped at frame 1 and I press the 2nd button in level 0, level 2 should start playing forward until it is at frame 10 and stop right there. But also, when level 2 is at frame 50 and I press the second button in level 0, level 2 should play backwards until it reaches frame 10 at stop again.
So frame 1 in level 2 must be reached by pressing button 1 in level 0;
frame 10 in level 2 must be reached by pressing button 2 in level 0;
frame 20 in level 2 must be reached by pressing button 3 in level 0; and so on...
This seems kind of difficult because sometimes the movie has to stop at a certain frame another time it has to pass it, and all that with the forwards and backwards ability.
Does someone know how to control something like this?
View Replies !
View Related
Forwards And Backwards Control
Hi
I can easyly control a MC to go one frame forwards every time i click on a button using "next frame" as an action for the button ... but is it possible to make the MC go backwards one frame a click ?
the action "previous frame" just switches between the two last visited frames ... hope u guys can help
Waark
View Replies !
View Related
Looping Forwards AND Backwards
I have a 10 second clip of some video that I'd like to loop, but not in the sense that it starts over after hitting the last frame. I want it to loop backwards -- so hits the last frame of the animation and then proceeds to move backwards till it hits the first frame and then starts over. Basically a continuous clip going forwards and backwards.
I've seen some actionscript that supposedly does this but I can't get it to work -- I'm not a motion graphics guy so pardon my ignorance but I figured you chaps would know better than me.
Thank you in advance for any help.
View Replies !
View Related
Help With Playing MC Forwards & Backwards
I have not used Flash or worked with actionscript for almost a year so I'm a bit rusty. I am trying to get 3 movieclips to trigger corresponding MCs below them to play forwards while hittest is true but stop and play bacwards once hittest is no longer true. All 3 MCs that trigger the 2nd group of MCs have their alpha set to "0" so the viewer won't even be aware of them.
My code works fine playing the MCs forwards but my code to stop & reverse the timeline isn't working.
I appreciate any help.
My code is as follows and my file is here:
PHP Code:
_root.onEnterFrame = function() {
highlightSection(blueHotArea_mc, blueFade_mc);
highlightSection(redButton_mc, redFade_mc);
highlightSection(greenButton_mc, greenFade_mc);
};
function highlightSection(mc1:MovieClip, mc2:MovieClip) {
if (mc1.hitTest(_xmouse, _ymouse, true)) {
mc2.play();
if (mc2._currentframe == mc2._totalframes) {
mc2.stop();
}
} else if (mc2._currentframe>0) {
mc2.stop();
mc2.gotoAndStop(_currentframe-1);
}
}
View Replies !
View Related
Rotating An Object Forwards And Backwards
Have created a hexagonal object and two buttons. I want to be able to press one button and have it rotate the object 60 degrees clockwise, press it again and have it rotate a further 60 degrees and so on until its rotated a full 360. I would like the other button to do the same but in reverse, turn it anticlockwise. Am new to flash and any help would be greatly appreciated.
View Replies !
View Related
Button Effects Forwards And Backwards
Something i've been trying to do but for some reason won't work, i've tried the tutorial for this and couldn't get it to work either, all i want to do is to have a button rollover effect, then when you rollout it does the exact same thing, but backwards. Can anyone help? thanks in advance
Jason
View Replies !
View Related
Forwards Backwards Kinda Problem
Hi,
I'm trying to make a menu for a university project with backwards forwards buttons in. I have made the mc with a hidden button inside it so when you rollover the animation plays one way and then when you roll out, the animation plays backwards. So far no problem.
I also made another blue mc with a button inside which moves from the left side of the screen to the right side when you click it. If you click it again it then moves back to the left side of the screen.
The problem I'm having is that I want to be able to combine both of these animations together. The swf can be seen at
http://www10.brinkster.com/emcoward/flash.html
When you rollover the "about" button I want it to move to the right to show the green square underneath. That bit works fine. However when you click the red "about" button I want it to detach from the green square and move to the other side of the screen and stop there. As the lower blue square does. I then want to be able to click the red button again or click another button and the red "about" button then moves back to join with the green square.
I've tried putting the blue mc inside the about mc but then when you rollover the about button it plays the whole animation and general messes up!
Does anyone have any suggestion? Or maybe a better way of doing this. I thought about attaching the blue square mc using attachmovie, but I couldn't get this to work how I wanted it to.
Thanks
Leroy
View Replies !
View Related
Buttons That Animate Forwards & Backwards
Did a tutorial today on this site under the same name. Required making a movie clip with a transparent "hit" area in the top layer. (A graphic symbol with the opacity set to 0)
You putt this movie clip on to the stage and then write the following code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
Animation works great. My problem is that I only want a very small hit area. The movie that animates as a result of the roll over covers a large portion of the screen.
The hit area then becomes the width and height of the entire movie clip. The backwards animation won't play unless the user rolls off every element contained in that movie clip.
This is a problem, because the buttons underneath this movie clip still remain active. So, if someone was to roll over them, they animate underneath the movie clip that is still open.
Basically I want the hit area to be contained to the original designated space. (The hit area created in the movie clip, as stated above.)
How do I do that?
-Nicole
View Replies !
View Related
Scrolling Movieclips Backwards And Forwards
Hi, I'm trying to make a movieclip that is essentially a bunch of pictures lined up next to each other, and only a portion of that movieclip is seen at any given time (via mask). I have arrows on either end that, onRollOver, I want to tell the movieclip to move either forward or backwards.
The problem I am having is that I can imagine there being to solutions to this problem. One is by having in the timeline of the movieclip the motion of the pictures from one end to the other end, and when the mouse rolls over the forward arrow, it tells the movieclip to play. The only problem is that if I want the back arrow to make the clip move the other direction, I would have to play the timeline in reverse, which I don't think is possible.
The other possible way to do this would be to change the _x value of the mc when the mouse is over the arrow. But the onRollOver call only goes once, so that if I made a function and told it to move the mc._x over 5 pixels onRollOver, it would perform that action only once when the mouse rolls over the arrow, but would not continue to scroll the mc.
Any ideas?
Thanks,
Max
View Replies !
View Related
Animate Forwards Then Backwards Loop?
Hi, I'm really struggling with this and I'd appreciate it if anyone would care to look.
All I want is for the frames in my animation to animate forward then backwards then forwards etc etc in an infinate loop.
I understand that animating backwards is less than easy , but can be done with actionscript. I've read a lot of help files on this but I'm still struggling.
I've uploaded my animation as is (including duff actionscript - my earlier attempt) and I'd really appreciate it if anyone can help and take a look.
Forgot to name the instance of my controller movieclip.
View Replies !
View Related
Controlled Scrolls: Certain Points : Forwards,backwards
Is there anyone who knows how sites, such as Barneys.com,designed by Kioken, can get the images
(movie clips) in the background to shift(left to right) and make it play, reverse direction smoothly? Any advice or scripts would help.
If the question is confusing, try going to the site:
barneys.com and you'll see what I am trying to ask. Look for the screen going from left to right smoothly.
Thanks.
View Replies !
View Related
Timeline Goes Forwards And Backwards But Easing Only On Previous Not On Next?
This file is driving me crazy...I got the timeline to go backwards and forwards with
function Movement() {
if (_root._currentframe > _root.mytarget){
prevFrame();
}else if (_root._currentframe < _root.mytarget){
nextFrame();
}else{
stop();
}
}
this.onEnterFrame= Movement;
and then on the MC at each stopping point
onClipEvent(enterFrame){
_x += (637.4 - _x)*0.06;
_y += (-252.1 - _y)*0.06;
}
It will ease on the 'previous' button but it skips the animation entirely on the 'next' button...just goes direct to the target...
Is there someone that could help me out??? I would really appreciate it!
View Replies !
View Related
Timeline Goes Forwards And Backwards But Easing Only On Previous Not On Next?
This file is driving me crazy...I got the timeline to go backwards and forwards with
function Movement() {
if (_root._currentframe > _root.mytarget){
prevFrame();
}else if (_root._currentframe < _root.mytarget){
nextFrame();
}else{
stop();
}
}
this.onEnterFrame= Movement;
and then on the MC at each stopping point
onClipEvent(enterFrame){
_x += (637.4 - _x)*0.06;
_y += (-252.1 - _y)*0.06;
}
It will ease on the 'previous' button but it skips the animation entirely on the 'next' button...just goes direct to the target...
Is there someone that could help me out??? I would really appreciate it!
View Replies !
View Related
Have ONE Button Play Movie Backwards And Forwards
Right now I have a set of buttons that when you press them, will load an swf into a blank movie clip on the stage called "mtClip".
I want the clip to play as normal when a button is first pressed, then when another button is pressed the move clip will play backwards and then unload.
So far I have this code on the buttons which works, but I really want to see the animation go backwards not just be unloaded.
on(release){
_root.mtClip.unloadMovie();
_root.mtClip.loadMovie("test.swf");
}
I've plowed through dozens of tutorials but nothing covers this issue exactly.
Can anyone help?
Thanks
View Replies !
View Related
[F8] GotoAndPlay Certain Frame In Timeline: Backwards And Forwards
I had the idea of a circular menu, and when the user clicks on a menu item, that one rotates to the top, and becomes highlighted (hopefully with easing). I've searched around here for reversing timelines, etc. but can only find ones that go to the next set frame.
How do I get it to skip past the menu items in between? For example if #1 is at the top and I click on #4, I want it to skip past #2 and #3.
I hope this makes some sort of sense to you guys 'n' gals. Many many thanks in advance for any answers or nudges in the right direction.
Here's a basic menu idea I had:
View Replies !
View Related
Creating An Animation That Goes Forwards Or Backwards Depending On Var?
Hi guys
I would like my animation on the menu_mc.brach_mc timeline to play frame by frame tjecking if it should go forwards or backwards.
When mouse is over it should play forwards, and when the mouse is out it should play from its current position on that timeline and go backwards frame by frame to that timelines frame 1.
How is this done??? I tried the below on my own, but no luck there...
My sample AS:
ActionScript Code:
var back:Boolean = false;
var forward:Boolean = true;
//
menu_mc.branch_mc.onRollOver = goBack(forward);
menu_mc.branch_mc.onRollOut = goBack(back);
function goBack(isOver:Boolean){
mc = menu_mc.branch_mc;
this.onEnterFrame = function(){
if(isOver){
mc.gotoAndPlay(this._currentframe+1);
} else {
mc.gotoAndPlay(this._currentframe-1);
}
}
}
Please give a hint here - thnx
View Replies !
View Related
Playing Movie Clip Both Forwards And Backwards.
heyas, im really new to as3 and am trying to create a picture gallery for my website. i;ve searched high and low as well as tried a lot of things on my own and can't get this to work. what i want it to do is this: i have 7 pictures that have 5 frames of movement (tweened) each, when you click the right button it goes right when you click the left button it goes left stopping at each picture and waiting for the next mouse click. the problem is that i havent found a way to do this in as2 as the solutions i've found ignore the stop(); actions in the time line as well as any other frame actions. (the ones i've seen use nextFrame, prevFrame).
i got pretty close to making it work in as3. I had
Code:
function rightarrow (event:MouseEvent):void {
MC_SceneSelect.play();
}
which does exactly what i want it to on the forward. it was extremely close after duplicating the frames, offsetting them, reversing them, and
using if else conditionals, variables that i had to enter on the frame and some other ugly things like adding and subtracting from the returned variables, but since im going to be using this site-wide i would rather it be portable and a tiny bit more elegant.
other solutions i've tried are a for loop and while loop where the nextFrame runs 5 times, but the animation does not show up in the finished product, instead the loop runs without showing the process, and only displays the end result. I was wondering if this needed something to refresh the view after each iteration of the while loop? below is the function i had:
Code:
function rightarrow (event:MouseEvent):void {
for (i=0; i<5; i++) {
MC_SceneSelect.nextFrame();}
}
I was also curious about passing the currentFrame from a movie clip to the main level function. for example, my MC_SceneSelect.currentFrame returns the frame of the stage timeline, not the current frame of the movie clip. i was wondering if there was something else i needed to do to get that to register correctly.
my last idea was making the frame pass the stop action to the original next frame/prev frame solution, maybe through an eventhandler of some sort but im kind of lost here, so that the next frame function recognizes the frame actions such as stop(); or gotoAndPlay(); etc.
i know theres a ton of questions in this post, so thanks ahead of time for taking the time to post anythgin helpful, it would be greatly appreciated.
View Replies !
View Related
GotoAndPlay Certain Frame In Timeline: Backwards And Forwards
I had the idea of a circular menu, and when the user clicks on a menu item, that one rotates to the top, and becomes highlighted (hopefully with easing). I've searched around here for reversing timelines, etc. but can only find ones that go to the next set frame.
How do I get it to skip past the menu items in between? For example if #1 is at the top and I click on #4, I want it to skip past #2 and #3.
I hope this makes some sort of sense to you guys 'n' gals. Many many thanks in advance for any answers or nudges in the right direction.
Here's a basic menu idea I had:
View Replies !
View Related
Strange Problem - Moving Backwards And Forwards (framewise) Within Scene...
So I have a strange problem - basically, I've got a scene set up where you can move left or right over an image via buttons - you click the "Scroll Right" button, and it pans across to the right side, and vice versa for "Scroll Left". "Scroll Right" works fine - it pans across to the right side, stops, and then the "Scroll Left" button pops up. Click that, and it moves back across to the left side, stops, the "Scroll Right" button appears, and then it flashes back to the main scene - leaving the image's scene entirely.
I have ActionScript set up so that upon clicking the "Scroll Left" button and it hitting the left side, it should gotoAndStop at the prior frame, so that basically it creates a loop between the two sides, using essentially something like 30 or so frames for all of the animations. However, like I said, this doesn't seem to work, it seems to as soon as the animation to scroll left is over go back to the main scene... anyone got ANY ideas?
Here's the FLA and SWF files (the problem is in the "Self Promo" scene - from the main screen, the second from the right image on the bottom):
http://www.kyleconrad.com/temp/main.fla
http://www.kyleconrad.com/temp/mainfull.swf
Thanks for any help you guys can offer -
View Replies !
View Related
[CS3] Control A Looping Frame By Frame Backwards And Forwards
Hello Everyone,
This problem has been driving me nuts for days. Basically I want to do this:
http://www.chevrolet.com/corvette/colors/
control an animation backwards and forwards. I have this action script controling the buttons however It only loops when I go backwards, it gets stuck on the final frame going forwards, does anyone know how I can make it loop both ways:
Thank you so much!
back_btn.onPress = function () {
onEnterFrame = function () {
prevFrame();
}
}
back_btn.onRelease = function () {
delete onEnterFrame;
stop ();
}
if (frame = 1) gotoAndPlay(6);
forward_btn.onPress = function () {
onEnterFrame = function () {
nextFrame()
}
}
forward_btn.onRelease = function () {
delete onEnterFrame;
stop ();
}
View Replies !
View Related
Forwards/Backwards "script"?
Hi Folks,
Can anyone tell me the (probably easy) answer to this question,I need to make backwards and forwards buttons for a "slideshow" inside a movieclip that scroll the pictures. The movieclip will be 10 frames long with different pics on each frame and an initial stop action on the first frame. If the user ever goes higher than frame 10 I want it to go back to frame 1 and if they go lower than frame 1 I want it to go to frame 10.
I DONT want to "cheat" and put different actions on the buttons on frame1 and 10, I want to put the SAME actions on the buttons all the way through
but have tried a few things and can't quite get it, I guess it's going to be an "if frame >than 10..go to 1" type thing, if there's any Actionscript whizz's out there please could you spare me a moment as It probably won't take you two minutes to figure it out, thankyou in advance.
View Replies !
View Related
Playback Movieclip Backwards On Rollout
This should be easy but i can't get it to work right. It plays the movie clip on rollover just fine but what is the conditional statement i use to play the movie clip backword on roll out. I want the movie clip to play prevframe until it hits frame 1. The logic sounds easy but i cant get the syntax right.
on (rollOver) {
_root.myClip.play();
}
on (rollOut) {
//what goes here?
}
thanks,
View Replies !
View Related
Playback Movieclip Backwards On Rollout
This should be easy but i can't get it to work right. It plays the movie clip on rollover just fine but what is the conditional statement i use to play the movie clip backword on roll out. I want the movie clip to play prevframe until it hits frame 1. The logic sounds easy but i cant get the syntax right.
on (rollOver) {
_root.myClip.play();
}
on (rollOut) {
//what goes here?
}
thanks,
View Replies !
View Related
Controlling Playback
I would like to know if there is a way to use a controller playback (fast forward and rewind) to control numerous swfs.
For example:
Main.fla holds the controller
Main.fla calls up several demos that play linearly.
there are six demos. the demo.fla is set up with movie clips on the main timeline(to control total frame #) -- otherwise the audio alone would make a demo over 16,000 frames (the macromedia flash mx 2004 limit)
now is there a way to have the main.fla fastforward and rewind these demos so that at the end of one, it jumps to the other and and the beginning of one you can rewind to the end of the previous? So that it rewinds and fastforwards inside the movie clips not the main timelines of the demos?
please help!
thanks
View Replies !
View Related
Controlling Playback
I would like to know if there is a way to use a controller playback (fast forward and rewind) to control numerous swfs.
For example:
Main.fla holds the controller
Main.fla calls up several demos that play linearly.
there are six demos. the demo.fla is set up with movie clips on the main timeline(to control total frame #) -- otherwise the audio alone would make a demo over 16,000 frames (the macromedia flash mx 2004 limit)
now is there a way to have the main.fla fastforward and rewind these demos so that at the end of one, it jumps to the other and and the beginning of one you can rewind to the end of the previous? So that it rewinds and fastforwards inside the movie clips not the main timelines of the demos?
please help!
thanks
View Replies !
View Related
Controlling The Playback Of My .flv
hi.
just managed to make my very own, very simple .flv-file from After Effects.
like it!
and so, I've set up my .fla to load and display the .flv:
Code:
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
var video:Video = new Video(700, 480);
addChild(video);
video.attachNetStream(videoStream);
videoStream.play("shine_introduction.flv");
now I'd like to fade the video in, as it begins, and fade it out again, when the video has played for 5 seconds.
I think I'll use Tweener for the fading.
so, I have to create a listener of some kind, that reacts, when the video starts playing, and a listener, that reacts, when the video has played for 5 seconds..
how do I do this?
thanks
felisan
View Replies !
View Related
Controlling Movie Playback
can a cursor movement control a movies playback to reverse and forward?
eg cursor moves left movie plays forward, cursor moves right mpvie plays back
cursor on or off hit area movie stops or ciontinues to play for the same frame
View Replies !
View Related
Controlling Playback With Actions....
Okay, here goes. I'm attempting to create an interactive Flash piece in which I have four animations. I need the animations to play at different times (each one will have a button allocated to play it), and when it's run through, the page to return to normal. The page will have also contain a background image and 2 looped animations(movie clip symbols) that I want to run constantly throughout. The problem I've encountered is this...
I can make the playback head jump to a designated frame (i.e the beginning of one of my animations), but as the background image and 2 looped animations only exist in the first frame, they disappear when the head leaves frame 1.
I know that was a bit long winded, but it's hard to find stuff in books when you don't know what your'e looking for!
If anyone could give me a brief runthrough of how all or part of this idea could be achieved I'd be most grateful!
Cheers, Skratchfanatic
View Replies !
View Related
Controlling Playback With Actions....
Okay, here goes. I'm attempting to create an interactive Flash piece in which I have four animations. I need the animations to play at different times (each one will have a button allocated to play it), and when it's run through, the page to return to normal. The page will have also contain a background image and 2 looped animations(movie clip symbols) that I want to run constantly throughout. The problem I've encountered is this...
I can make the playback head jump to a designated frame (i.e the beginning of one of my animations), but as the background image and 2 looped animations only exist in the first frame, they disappear when the head leaves frame 1.
I know that was a bit long winded, but it's hard to find stuff in books when you don't know what your'e looking for!
If anyone could give me a brief runthrough of how all or part of this idea could be achieved I'd be most grateful!
Cheers, Skratchfanatic
View Replies !
View Related
Controlling Playback With Actions.....
Okay, here goes. I'm attempting to create an interactive Flash piece in which I have four animations. I need the animations to play at different times (each one will have a button allocated to play it), and when it's run through, the page to return to normal. The page will have also contain a background image and 2 looped animations(movie clip symbols) that I want to run constantly throughout. The problem I've encountered is this...
I can make the playback head jump to a designated frame (i.e the beginning of one of my animations), but as the background image and 2 looped animations only exist in the first frame, they disappear when the head leaves frame 1.
I know that was a bit long winded, but it's hard to find stuff in books when you don't know what your'e looking for!
If anyone could give me a brief runthrough of how all or part of this idea could be achieved I'd be most grateful!
Cheers, Skratchfanatic
View Replies !
View Related
Controlling Playback Of MC Via Button Within MC
I am trying to build a menu that drops down on release of a button. The menu has button links, and on release of one of these buttons I want the menu to fly up and disappear and go to the respective link. it seems simple but i can't get the menu to respond to the button. I've been stuck on this for a while.
Also I have a preloader but I'm not sure if it's working correctly. if someone could verify that it would be great.
The .fla file wont fit as an attachment on the forum; download it here --> http;//www.geocities.com/alpine_edge3/oddsound.fla (~450K)
Thanks in advance for your help.
-George Marzloff
View Replies !
View Related
Controlling Playback Of MC Via Button Within MC
I have a drop down menu controlled by an on release button and the menu has button links. When a user clicks a link i want the menu to jump back up out of sight and the movie will go to the appropriate destination. I can't get the link buttons to control anything; it may be a problem with the target paths. (the menu is located in the 'main' scene.)
Also I have a preloader as the first scene, but I'm not sure if it's working right. Could somebody verify that it works, and that the preloader doesn't wait to show up until the whole movie is downloaded?
Click the link for the .fla:
http://www.geocities.com/alpine_edge3/oddsound.fla
Excuse the weirdness of the intro.
Thanks for all help
-George Marzloff
View Replies !
View Related
Controlling Playback Of A Movie (MX)
I have say 4 buttons, they control a single time line of a movie instance
Lets call the instance frames_mc which has 100 frames
So Buttons A,B,C,D
What I want the buttons to do is controll the playback relative to where it is,
I have three things I need to be done
buttonb_mc onRollover gotoandPlay the Frames_mc movie from frame 50 onwards. (This one I can do)
a) buttonc_mc if frames_mc on frame 50 stop
if not on 50 gotoandplay 20
(So what is the code for determing if the playhead is on a certain frame on a movie clip? if FrameLoaded?
b) button d_mc if frames_mc on frame 50 then play next frame -1
(What is the code for playing a movie clip in reverse to a certain frame)
help is much appreciated.
View Replies !
View Related
Controlling MP3 Playback Using JavaScript
I have an AS3 MP3 player on a web page that uses the ExternalInterface.addCallback() method to playback mp3 files. The xml is generated dynamically and loads properly. I am able to toggle through the songs and play them from the MP3 player, however my efforts to communicate with the MP3 player from the web page are not working properly.
I am using swfObject to embed the swf movie on the page and the following code to trigger the playback from the page:
Code:
<a href="#" onclick="swfobject.getObjectById('mp3_player').playSong({entry_id},0);">
I could use some guidance on making this connection work properly. Any suggestions?
Thanks
View Replies !
View Related
Controlling 2 FLV Playback Components
Is it possible to control 2 different (but on the same frame) FLV playback components but from 1 flv playback controller.
We are trying to create a video of two layer, a back ground video , and a presenter with alpha transparency in front. The plan is to add a slider to turn the opacity of the presenter up and down.
I can make it work by embedding the two video on the flash time line, but would like to be able to have them as a progressive download using the FLV playback component.
Any advice help
Ps can you change the Alpha of a FLV playback component’s video , like you can if the video is in a movie clip.
Oh yer and I’m on Flash 8
View Replies !
View Related
Controlling Timeline Playback
Is there are a script that will run a swf file in reverse?
For instance, if the beginning of a movie zooms in on something, a button can run the zoom in reverse?
Any help on conrtolling timeline playback would be appreciated.
Thanks in advance.
View Replies !
View Related
NetStream & Controlling Playback
i am using a netStream'd object to play streamed video.
i have 2 ?s i want to ask about
1. thru lots of trial and error, i have found that if i have buttons that will control what FLV the netStream will stream, those buttons have to be on my root, with the object, and the netConn and netStream commands in frame 1. if my buttons reside in a movie clip or in a scroll pane, the audio will stream but not the video. so i put my object, and buttons on the root and my netConn scripts in frame 1 of the root and it works fine. i have also tried putting the scripts, objects and buttons all in the same movie clip, and that didnt work either. WHY IS THAT??! i have tried pathing to my buttons inside movie clips, and have had no luck.
2. this is the script that i also have in frame 1 on the root that is supposed to 'control' my streamed FLVs
rewind is instance name of rewind button, forward is instance name of fast forward button. both of these buttons (have to) reside on the root with the video object, which is named myVideo.
rewind.onRelease = function (){
mynetStream.seek(mynetStream.time - 5);
mynetStream.play();}
forward.onRelease = function (){
mynetStream.play(mynetStream.seek[mynetStream.time =+ 5]);
}
rewind stops the movie. it pauses and then does nothing.
forward does absolutely nothing at all.
what am i doing wrong?
mynetStream is the variable name associated with NetStream.
any ideas?!?!?!
View Replies !
View Related
Mouse Position Controlling Playback Of Mc
from somebody who is a beginer of actionscript, does anyone know the script for:
there is a mc "animation" which is around 20 frames long and
is the full length of the movie (700pixels)
and i want it to play when i have my mouse on the right hand
side of the screen and reverse when on the left side and halt when in the mouse
is in the middle of
the screen.
ive tried searching for tutorials everywhere and i can only find them on when a
mc follows your mouse and doesnt actually play.
if anyone could help it would be great cheers
View Replies !
View Related
Controlling Movie Playback - Looping
Ok,
I have a mc about 20 frames long. I have put this clip on the main timeline and its all cool. I have, however an action on the last
frame which tells the playback head to jump back about a 100 frames and play again.
My problem is this. I need the looping to happen and continue to happen but I only want the clip I mentioned earlier to play once and stop on its last frame. How can I get this mc to only play once even though the playback head will keep on looping past it on the main timeline?
Any help much appreciated.
Thanks
View Replies !
View Related
Controlling Playback Of Flash Animation
this is a very simple question. i have a flash animation which is used by several web pages (main page and sub pages). however, i don't want the animation to play in the sub pages. is there a way of controlling the animation so that you can tell it to only play on certain pages?
it is a standalone .swf file in a html page. it there a way of passing in a parameter from the html to tell it when to play and when not to? any help would be appreciated. thanks
View Replies !
View Related
Controlling Playback Timing Of 3 Different Swfs? How?
I have a single html page that has three different swf files,
in three different table cells.
Is there a way to stably control the playback timing of the
three and keep them in sync, without making them one big
(big resolution-wise, not file size) swf?
They are basically all three small banner ads that transition
from one image to the next, but I want them to transition in
order and stayed synced up. Top banner goes, then a second
or so later right banner goes, then a second or so later, the
bottom banner goes, then repeat...
It needs to work on all the current browsers and also on both
the PC and Mac platforms...
Thanks in advance.
View Replies !
View Related
Behaviors:controlling Sound Playback
Hello, I need help with an animated door (button) I created. When I click on it I want it to open and play a sound. It opens fine when clicked on release, but the sound isn't working right. It plays right away when the flash file loads and plays opposite the time I want it to. (when the door is closed) The door button I have is a movie clip with another layer in it for the sound, so I thought both the animation and sound would react together when I applied the goto and play behavior to it. I applied the behavior in the main timeline. What am I doing wrong?
View Replies !
View Related
Controlling Mc Playback From The Main Scene...
Help!
I'm trying to get an mc symbol to playback different sections of itself in responce to a global variable changing.
Something along the lines of placing this within a keyframe on my actions layer of the main scene:
function init() {
If(x=1){
instancename.gotoAndPlay(20);
}
}
init();
However I can't seem to get it to work and I think it's got something to do with the way in which I'm targetting the mc, as if I place similar code within an onClipEvent(mousedown) of the mc and replace:
instancename.gotoAndPlay(20);
with
this.gotoAndPlay(20);
then I seem to get it working, etc...
Any help would be much appreciated as I've searched various forums and can't really find what I'm looking for!
Thanks for your time (from a proper newbie!)
Jon
View Replies !
View Related
[CS3] Controlling Sound Playback Speed
Hi guys. I was just toying around with trying to get a script that could control sound playback. I'm getting close, but the playback is very choppy.
Here's the first script I've came up with. It's almost working, but it is very choppy.
Code:
//AS2
SoundObj1 = new Sound();
SoundObj1.attachSound("testsound")
SoundObj1.setVolume(25)
frames = 0
fps = 33
everyframe = function(){
SoundObj1.stop();
SoundObj1.start(frames/fps, 1)
frames+=.5
//Playback speed should be halved.
}
onEnterFrame = everyframe
So I thought, okay, I'll just add an extra sound on top of the gap to bridge the choppyness, but it resulted in the same effect as above. Why wouldn't it? One sound starts and another stops... making it a needless extention on the previous script.
So finally I realised I would need 3 sounds over interval-looped frames to get the seamless sound effect I want...
Code:
//AS2
SoundObj1 = new Sound();
SoundObj1.attachSound("testsound")
SoundObj1.setVolume(25)
SoundObj2 = new Sound();
SoundObj2.attachSound("testsound")
SoundObj2.setVolume(25)
SoundObj3 = new Sound();
SoundObj3.attachSound("testsound")
SoundObj3.setVolume(25)
frames = 0
frameswitch = 1
fps = 33
everyframe = function(){
if(frameswitch == 1){
SoundObj2.stop();
SoundObj1.start(frames/fps, 1)
}else if(frameswitch == 2){
SoundObj3.stop();
SoundObj2.start(frames/fps, 1)
}else if(frameswitch == 3){
SoundObj1.stop();
SoundObj3.start(frames/fps, 1)
}
frameswitch++
if(frameswitch > 3){
frameswitch-=3
}
frames+=.5
//Playback speed should be halved.
}
onEnterFrame = everyframe
It seems slightly improved... but only very slightly. Any ideas?
~TheWaste
View Replies !
View Related
Preloading & Controlling Playback Of An External FLV
heya, now i should point out, im fairly new to flash/action script and im not the most compitant programmer so you'll have to bare with me if your answers/solutions take a while to sink in
ok, I'm trying to preload an external FLV file, but i'd like it to pause, so it loads while not playing. Now, I've tried using the FLV Importery thingy in Dreamweaver, and that stops the movie until the user is ready to press play, although i have no idea if its actually being downloaded, (i wouldnt have thought so as its not being streamed :? i dunno...) Ideally, i'd like to have it preloading, and use the FLV Playback component/functionality...
my code so far:
Code:
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("arse.flv");
this.loaded_txt(this.getNextHighestDepth(), 10, 10, 160, 22);
var loaded_interval:Number = setInterval(checkBytesLoaded, 500, stream_ns);
function checkBytesLoaded(my_ns:NetStream) {
var pctLoaded:Number = Math.round(my_ns.bytesLoaded / my_ns.bytesTotal * 100);
loaded_txt.text = Math.round(my_ns.bytesLoaded / 1000) + " of " + Math.round(my_ns.bytesTotal / 1000) + " KB loaded (" + pctLoaded + "%)";
progressBar_mc.bar_mc._xscale = pctLoaded;
if (pctLoaded >= 100) {
clearInterval(loaded_interval);
}
}
the test page: http://www.theste.co.uk/kaka/pants.htm
Any help, suggestions, solutions would be great...
thanks
Ste
View Replies !
View Related
Controlling A Mc Playback With The Position Of A Mouse
from somebody who is a beginer of actionscript, does anyone know the script for:
there is a mc "animation" which is around 20 frames long and
is the full length of the movie (700pixels)
and i want it to play when i have my mouse on the right hand
side of the screen and reverse when on the left side and halt when in the mouse
is in the middle of
the screen.
ive tried searching for tutorials everywhere and i can only find them on when a
mc follows your mouse and doesnt actually play.
if anyone could help it would be great cheers
View Replies !
View Related
|