Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Play A Movie Clip Slow Then Fast



Hi

I have created an movie clip that has 20 frames running at 30FPS its a motor running with a fan on the front.

Is there any way that when I start the motor (movie clip) via a button that I can get the movie clip to start slowly and then go fast (and stay fast).

Regards, Dave



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-15-2006, 03:53 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Mouse Triggering A Movie Clip To Move Fast/slow
I am trying to work out how to make the mouse move a movie clip fast and slowly as the mouse moves around the stage. I've seen it done on other sites and cannot figure it out. What I want to have is a clip containing buttons and as you move the mouse near the clip it slows down so the user can click the buttons and as you move the mouse away it speeds up. I was hoping that someone might be able to steer me in the right direction with the correct action script!

[CS3] : Fast-forward Play For Movie Clip
Hi,

I have embedded a short movie clip (called 'clip') into flash (not as an flv),
and added the following code to make it run in fast-forward mode. It works fine in the beggining, but crashes after a minute or so ! Any idea why ?

package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.Event;

public class SmartFastForward extends Sprite {
public function SmartFastForward() {
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(event:Event) {
if (clip.currentFrame < clip.totalFrames-1)
clip.gotoAndStop (clip.currentFrame + 2);
else
clip.gotoAndStop(1);
}
}
}


Thanks !

SWF = Fast, EXE = Fast, HTML = Slow? Whats Going On?
Hello everyone,

Has anyone else ever had the problem where the *.swf will work fine, the published *.exe will work fine, but playing an *.swf file in an HTML file slows it down heaps? I have lots of example files to demonstrate and help explain this one...

Here is an example of one of my old super-super-simple games. I use this one because of its simplicity, there shouldn't be too much to slow it down, right? It is made in flash 6, but of course it plays in the flash 8 web player - which isn't usually a problem.

Here's the link to the executable file: www.dxinteractive.com/walkthestork/walkthestork3.exe

And heres the link to the HTML file:
www.dxinteractive.com/walkthestork

Play both and you'll see the executable runs perfectly, but the HTML runs slower than it should. Not only that, the "slowness" isnt uniform, so raising the frame rate to compensate on the HTML version doesn't work. I thought something must be slowing it down, so I took away the backdrop, then the scoring thing, then deleted all the code. I was eventually left with only one motion tween and it still ran about 60-70% of the speed it should. I tried changing the type of AS, the flash player version, the _quality, everything I could think of and it would not play at normal speed through an HTML.

I then deleted everything and drew some animated scribbles, and it still ran at about 3/4 speed. Play these two (flash 8 files) side by side and note the difference in speed:

Heres the slow HTML:
www.dxinteractive.com/testing/bigtest.html

And heres the regular-speed EXE:
www.dxinteractive.com/testing/big%20test.exe

Has anyone ever had this problem? Is it just my computer? How can it be fixed? The frame rate in reaction games is everything, and I would like them to run the speed they were intended to. Any help is greatly appreciated. In fact, this is such a big problem to me affecting sooo many games that if anyone solves this, they get their name in the credits on my webpage if they want

Part 2 - Movie Loads Too Fast And Won't Play The Mc
Here is what I have in the "navigation" movie button
on(release){
_level0.gotoAndPlay("label");
}
on(release){
whereToGo="label";
}

Here is what I have in the "b" movie
gotoAndStop(_level0.whereToGo);

- the movie is called from the base so there is
The "navigation" tells it where to go on the base movie.
The frame that it goes to already has a load movie going on.
So it loads that movie "b" into the clip.

I have it working great except for the movie loads to fast and does not have time to play the movie clips in that movie.

Usually the page turns up blank.

Any ideas?

Fast Forward Movie Clip
I have tried searching the forums for this, but have had no luck.

Does anyone have a script for a fast forward and rewind for the movie playback buttons?

I am using Flash MX and the playback buttons from the library.

Thanks!!!

Attach Movie Clip? - FAST HELP. Thank You
[FLASH 8]
Hey, I need help with somthing please :

How do you get this to work when it's with in a function?
Example:


Code:
function c1sectionadd() {
this.attachMovie("NF02", "move03", 395, {_x:12.2, _y:603.6});
this.attachMovie("NTtrees01", "move11", 397, {_x:12.9, _y:521.8});
this.attachMovie("WB01", "move10", 4, {_x:-6.0, _y:608.0});
clearInterval(sectionadd);
}
And it is being called from:


Code:
onClipEvent (enterFrame) {
if (this.hitTest(_parent.player.hit)) {
if (addc1mc != false) {
_parent.sectionadd = setInterval(_parent.c1sectionadd, 100);
addc1mc = false;
}
}
}
The above code is in a movieclip's actions, it's located directly on the stage.
Thanks to all who respond

Slow Down Movie Play
I know this is probably a simple solution, but I'm stuck. My Flash MX document consists of a movie that plays as a continuous loop (a scrolling banner) across the top of the web page. I need to slow the movie down. Just adding time into the movie timeline doesn't seem to do it, unless I just need to add more time. Is there an actionscript that will pace the movie playing?

Thanks!

Frame W/ Movie Clip Playing Too Fast
erf!!!! I'm going batty here. I have created a webpage and have a pre loader on the first frame (which works fine) and then an animation sequence which I have made (according to the lil timeline bar) 30 secs long, but when I veiw it- the loader shows up and then the animation is over in the blink of an eye! It's supposed to slide all the bits of the page layout in nice and slowly. (and yes I am vewing it live online not locally, and yes I have emptied my cache) Is this just some glich in mx? am I doing something wrong ?(I'm still learning flash )
I can send in the fla or give you the URL if ness if no one can give me an obvious reason for why it's doing this.
thanks heaps!

Fast Forwarding And Rewinding A Movie Clip
I need to be able to control a movie clip's frame rate (fastforward button) and at times a rewind button. when i set up both buttons with the action only the rewind "rwButton" works. when i flip the order and put the rwButton script first and the ffButton second the fast forward works. what did i do wrong?


ffButton.onPress = function() {
ffw = true;
};
ffButton.onRelease = function() {
ffw = false;
};
onEnterFrame = function () {
if (ffw == true) {
_root.video.gotoAndPlay(video._currentframe+5);
}
};


rwButton.onPress = function() {
rw = true;
};
rwButton.onRelease = function() {
rw = false;
};
onEnterFrame = function () {
if (rw == true) {
_root.video.gotoAndPlay(video._currentframe-5);
}
};

Fast Forward Movie Clip Timeline
Ok, so yesterday i was wondering if there was an easy way to do this, and i put my head to the grinder thinking this up...

Basically, here's the script I'm using to achieve a fast forward. It affects the main timeline by having a slider give it a # value that is added to the _currentframe. So it basically tells it to skip X amount of frames to give the illusion of the animation playing faster.

I can get it to work on the main timeline, when it's there. But when I bundle it together in a mc, I cant get the code to to just effect the movie clips timeline. I dont know when to use _root, this, or if and where I should plug in the movie clips instance name of "red_mc". If anyone could help and tell me where I went wrong I'd be very grateful.


Code:
this.onEnterFrame=function (){
_root.createEmptyMovieClip("controller_mc",1);
controller_mc.onEnterFrame=function(){
_root.gotoAndStop(_root._currentframe+mySlider.ratio);
if (_root._currentframe+mySlider.ratio > _root._totalframes){
_root.gotoAndStop(_root._totalframes);
}
}
}
this.onRelease=function (){
controller_mc.removeMovieClip();
}
this.onReleaseOutside=function (){
controller_mc.removeMovieClip();
}

Fast Forwarding Sound Within A Movie Clip
Hello all,

I am trying to create an animation of a person with sound. I've created a movie clip with three layers. One for the animation, the second layer for the sound that I have imported to the timeline (instead of linking the sound as an object) and the third for the AS but I have no clue as to what AS I should put.

I have put this MC on my main timeline and I do have a Fast Forward button on my main timeline which does fast forward the animation of the movie clip but not the sound. How do I fast forward the sound part of the MC and make the sound stop at the end of the movie clip too? Please advise also as to which method would be best to use the sound - on the timeline (if so, stream, event, start??) or through linkage?

I have done my fair share of research and have tried to solve this on my own but I can't seem to apply the techniques and can't figure out the variables and instance names. Any clarification would be helfpul!

Apologies for any annoyances but thanks!

Why Does My Flash Movie Play So Slow?
I have a flash movie that is very simple and it's only about 50K and 20 seconds long. But I've had a number of people complain that when they look at it over the net it plays very slowly. When I check it on my computer it goes just fine. Is there something I might be doing to cause this, or is there something I can do to prevent it? Why would this happen?

Fast And Slow
I have two files. One uses a switch and counter to trigger a sequence of movie clips. The other uses an array and setInterval to do the same job when a button is pressed. The file using array is very slow compared to the first file. I've tried adjusting my times and values, but can't achieve the same effect. Can anyone see where I might have gone wrong?

Here are my files:

http://www.super71.com/files/fast.fla
http://www.super71.com/files/slow.fla

Slow And Fast Animation
I see this on a lot of flash sites. The animation will speed up, slow down, etc..

Something will zoom across the screen and then stop. I can't do this without changing the main fps for the document. That doesn't work.

How will I go about doing this? I have Macromedia Flash MX 2004 Professional.

Thanks

Fast/Slow Buttons
Hi,

I'm trying to create a button that when pressed, will increase the frame rate speed, and when clicked again, will slow it back down. Does anybody know if this is possible and how it can be accomplished?

Fast Forward And Slow Mo
Does anybody know the script for a button like if you press it it'll make the movie go faster and another one when you press it it'll go slower?? ...

Please help...

Fast/Slow Buttons
Hi,

I'm trying to create a button that when pressed, will increase the frame rate speed, and when clicked again, will slow it back down. Does anybody know if this is possible and how it can be accomplished?

Flash Running Slow On Mac's And Fast On PC's...please Help
Our movie runs fantastic on a PC but is slower than hell on a MAC. Has anyone ever experienced this issue and if so, did you find a resolution?

Please advise. Thanks in advance!

Fast -> Slow -> Stop Using Actionscript
i am after a script (lost thru reformat) that allows an animation to start of very fast then slow down then stop as it gets nearer its finishing point. this works well for a shape moving from left to right. it starts off fast then as it gets to its destination is slows down to a halt.

what script is used for this please?

Movie Clip Runs Slow When There Are Multiple Movie Clips Running
Hi, Can someone help me out? I have made a flash where a movie clip containing text runs at the same time that a second movie clip runs (movie clip 2). I used function updateCursor() to replace the standard mouse symbol with the movie clip symbol (movie clip 2). After the scene runs a few times at the correct speed, everything within it slows down markedly, which I don't want. Why is this happening? Any ideas? I have actually seen something similar in Flash 5...but I can't figure out how to keep this from happening!!

Help - Flash Movie Plays Fast By Itself, But Plays Slow When Loaded Within Another Flash Movie
I have a flash website which I tried to update recently. In particular, I am updating my photo gallery which I load within another flash using loadMovie. Before updating it, everything worked fine. The update is not completed yet, but I notice that my photo gallery is playing extremely slow compared to before. I did add some new graphics such as fading in and stuff like that, but nothing serious. If I played the clip by itself, ie. typing in the actual photogallery.swf, it plays at full speed. When I run the photogallery through my regular website, meaning loading it through loadMovie, it plays very slow. The photogallery.swf is only 58k in size, so download speed shouldn't be the case. Nevertheless, I tried adding a IfFrameLoaded just in case but that didn't solve my problem. Anybody has any ideas why it might be playing slow when I'm using the loadmovie function and plays fine when I just reference it directly?

Slow Down Movie Clip?
I've imported an AVI into Flash MX and saved it as a movie clip symbol. The clip plays a little too fast (no matter what setting I use on import) and I'd like to slow it down once it's loaded. Is there a way to do this?

I'd like it to go about half speed. I'm sure there's an actionscript solution, but I can't figure it out. Thanks.

rgb

Slow Down A Movie Clip
Hi guys,

I have this movieclip which has 6 frames and each frame displays a graphic of the face of a dice with the frame number relating to the number on the dice. What I am wanting to do is play through these frames but gradually slow down the frame rate over a period of time until it eventually stops. Simulating the rolling of a dice.

I know you can't actually adjust the frame rate of a specific movie clip but I was wondering if there is some kind of work around using ActionScript.

Thanks for your help.

Greg

Timer Counts Too Fast On Slow Machines?
Hi all
I am doing intro at the frame rate of 30...I have different scences after the end of every scence it jumps to next scence...this is done with delay timer from pixellogic and here is the script...

// set reference to this smartClip on the maintimeline
_root.pausePixelClip = this;

// making this smartclip graphic invisible
_visible = false;

// pause the parent layer
_parent.stop();

// set the delay value to milliseconds
delay *= 1000;

// set the startTime var which is used to determine if a second has passed
startTime = getTimer();

// function checkTime() checks to see if the timer is finished
function ckTime () {

// set the current time
currentTime = getTimer();

// check to see if the delay time is over
// if it is continue playing
if (currentTime > (startTime + delay)) {

// remove all the variables
delete delay;
delete currentTime;
delete startTime;

// tell the _parent timeline to play
_parent.play()

}
}


this works on fast machines but on sloy it counts too fast....is there any trick...??? or a timer that reads real time fromsystem and jumps only when that given time is over?


any soultion??
many thanks
pilotx

Flash SWF Is Slow, Fast If MTV.ca Is Open In Another Tab / Window
Here is a weird one, but their must be some sort of reason.

I am developing a site in AS3, utilizing the tweenlite classes. Works fine on a mac but does not work well on my PC. This is not a heavy file at all, almost all vector based. I opened mtv.ca up in another tab went back to the page I'm working on and noticed it is now just as fast. As soon as I close MTV.ca in the tab it goes back to slow behavior. This is the same for both firefox and IE.

Does anyone have any idea of why that could be?

Edit: I noticed when the video is playing on another site the swf runs at a much faster speed.

MP3 Stream Speed Is All Over The Place (fast And Then Slow)
I am trying to stream an MP3 from the server. If I request the mp3 file from the server in the client by doing quote:ns.play("mp3:Test"); it will play at the correct speed. However if I create a stream that doesn't exist by doing quote:ns.play("songs"); and then on the server I quote:Stream.get('songs').play('mp3:Test', -2); the playback is all messed up. It speeds up and then slows down, it sounds all choppy. Extremely inconsistent and painful to listen to.

Here is the client:
quote:
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.media.Video;
import flash.events.NetStatusEvent;

public class Music extends Sprite {
var nc:NetConnection, ns:NetStream, vid:Video;
public function Music()
{
vid = new Video();
addChild(vid);
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, function(e:NetStatusEvent) {
if (e.info.code == 'NetConnection.Connect.Success') {
ns = new NetStream(nc);
vid.attachNetStream(ns);
ns.play("songs");
//ns.play("mp3:Test");
trace('connected');
nc.call('songPlay', null);

}
});
nc.connect("rtmp://mydomain.com/music/selections");
}
}
}


and here is the server side
quote:
application.onAppStart = function() { trace('app music started'); };

application.onConnect = function(client) {
trace('client connecting');
application.acceptConnection(client);
client.songPlay = function() {
trace('client called play');
Stream.get('songs').play('mp3:Test', -2);
};
};

Fast -> Slow -> Stop Animation Using Actionscript
i would like to know how to move a shape from left to right using actionscript. the movement should be fast up until it gets to the end point then slow down as it reaches it. i would also like to do this type of animation for a sahpe that shrinks. so basically it starts off as a sqaure or large rectangle then it shrinks up from the bottom while the top stays at the same value. i hope this is being explained well.

Fast -> Slow -> Stop Animation Using Actionscript
i would like to know how to move a shape from left to right using actionscript. the movement should be fast up until it gets to the end point then slow down as it reaches it. i would also like to do this type of animation for a sahpe that shrinks. so basically it starts off as a sqaure or large rectangle then it shrinks up from the bottom while the top stays at the same value. i hope this is being explained well.

Flash Video Slow & Fast Motion?
Hello!
Is there a possibility by using actionscript to make an external .FLV play in a slow or fast motion, meaning at different frame rate?

G.
BHF

Inconsistent (Fast Or Slow) Playback In Some Browsers - AS3
Hi there!

I'm a newcomer to the forum. First forum I've ever joined actually. I just can not for the life of me figure out what's going wrong.

Here's my project: http://www.nohander.com/mnr
Here's the problem: In some browsers, the navigation bar at the top works how I want it to. The "slider" moves over the various buttons rapidly. This is the case for Firefox and Safari on my PC. In others, namely Internet Explorer on my PC, or Firefox on my Mac, the "slider" moves much slower than I would like. Check it out. It might go fast for you, it might go slow.

I've programmed before, in other languages, and I have found Flash to be challenging but not impossible. One thing you'll notice right away is that my code is very very messy. I haven't got all the efficient ways down pat just yet.

At any rate, here's the entirety of the code involved:


Code:

////////////// BEGIN CODE ////////////////////////


stop();


var mcButtons:MovieClip;
var vLmc:URLRequest;
var buttonLoader:Loader;

//following code is for button loader
buttonLoader = new Loader();
vLmc = new URLRequest("buttons/blackButtons.swf");
buttonLoader.load(vLmc);
buttonLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);

//following code is for project loading purposes
//stage.contentLoaderInfo.addEventListener(Event.COMPLETE, onNavLoaded);

//following is more necessary variables for operation.  -BK
var slideTime:int = 1;  //duration of moving timer. lower numbers = faster movement
var slideAmount:int;
var mousedX:int; //button X that is currently selected/mousedover.
var slideLeft:int = 25; //this amoutn has to be bigger than slideMax. distance left to go when the move amount starts to get reduced again
var distLeft:int;
var slideMax:int = 5;
var buttonClicked:int = 0; //has a button been clicked? If it has, don't moveback.


//set these following values depending on which button for which page
var origX:int = button01.x; //this is the original x position of the button which corresponds with the current page.
var pageButton:int = 1; //which button is the button that corresponds with this page?


var sliderMove:Timer = new Timer(slideTime);

sliderMove.addEventListener(TimerEvent.TIMER, sliderTimer);


//make the buttons invisible till it's loaded
button01.visible = false;
button02.visible = false;
button03.visible = false;
button04.visible = false;
button05.visible = false;

//button event listeners.
button01.addEventListener(MouseEvent.MOUSE_OVER, button01touch);
button01.addEventListener(MouseEvent.MOUSE_OUT, button01out);
button01.addEventListener(MouseEvent.MOUSE_UP, button01press);

button02.addEventListener(MouseEvent.MOUSE_OVER, button02touch);
button02.addEventListener(MouseEvent.MOUSE_OUT, button02out);
button02.addEventListener(MouseEvent.MOUSE_UP, button02press);

button03.addEventListener(MouseEvent.MOUSE_OVER, button03touch);
button03.addEventListener(MouseEvent.MOUSE_OUT, button03out);
button03.addEventListener(MouseEvent.MOUSE_UP, button03press);

button04.addEventListener(MouseEvent.MOUSE_OVER, button04touch);
button04.addEventListener(MouseEvent.MOUSE_OUT, button04out);
button04.addEventListener(MouseEvent.MOUSE_UP, button04press);

button05.addEventListener(MouseEvent.MOUSE_OVER, button05touch);
button05.addEventListener(MouseEvent.MOUSE_OUT, button05out);
button05.addEventListener(MouseEvent.MOUSE_UP, button05press);







            //var bytestotalButton = buttonLoader.loaderInfo.bytesTotal;
            //var bytesloadedButton = buttonLoader.loaderInfo.bytesLoaded;
            
            buttonLoader.visible = false;
            buttonLoader.blendMode = BlendMode.LAYER;
         

//this following function is executed when buttonLoader is loaded
function onLoadComplete(evt:Event):void {
   //trace("It's loaded");
   mcButtons = buttonLoader.content as MovieClip;
   addChild(mcButtons);
   //addChildAt(mcButtons, stage.numChildren+5)
   //AND SO NOW mcbuttons is completely at my disposal!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   mcButtons.gotoAndStop(pageButton);
   
   ////////////////\\\\\\\\\////////////////////\\\\\\\\\\\/////////
   // THIS NEEDS TO BE CHANGED DEPENDING ON WHICH PAGE YOU'RE ON!!!!!!!!!!!!!!!!!!!!!!!!!!!
   mcButtons.x = button01.x;
   mcButtons.y = button01.y;
   ///////////////////////////////////////////////////////\\\\\\\\\\\\\\\\
   
   //make the buttons visible!!
   button01.visible = visible;
   button02.visible = visible;
   button03.visible = visible;
   button04.visible = visible;
   button05.visible = visible;
   
}



//button PRESS functions. what happens when you click a button.
function button01press(evt:MouseEvent):void {
   buttonClicked = 1; //deactivates normal procedure.
   navigateToURL(new URLRequest("index.html"),"_self");
}
function button02press(evt:MouseEvent):void {
   buttonClicked = 1; //deactivates normal procedure.
   navigateToURL(new URLRequest("about.html"),"_self");
}
function button03press(evt:MouseEvent):void {
   buttonClicked = 1; //deactivates normal procedure.
   navigateToURL(new URLRequest("education.html"),"_self");
}
function button04press(evt:MouseEvent):void {
   buttonClicked = 1; //deactivates normal procedure.
   navigateToURL(new URLRequest("services.html"),"_self");
}
function button05press(evt:MouseEvent):void {
   buttonClicked = 1; //deactivates normal procedure.
   navigateToURL(new URLRequest("contact.html"),"_self");
}



//button callToMove functions. called when buttons are rolled over.
function button01touch(evt:MouseEvent):void {
if(buttonClicked == 0) {
   //trace("Mouse01 moused over");
   
   //sliderMove.stop();
   mcButtons.gotoAndStop(1);  //go to the appropriate corresponding frame within mcButtons
   distLeft = button01.x - mcButtons.x;
   if(distLeft < 0){
      //trace("Negative");
      slideAmount = -1;
   }
   if(distLeft > 0){
      //trace("Positive");
      slideAmount = 1;
   }
   
   mousedX = button01.x;
   //trace(mousedX);
   sliderMove.start();
}
   
}
function button02touch(evt:MouseEvent):void {

if(buttonClicked == 0) {
//trace("Mouse02 moused over");
   
   //sliderMove.stop();
   mcButtons.gotoAndStop(2);  //go to the appropriate corresponding frame within mcButtons
   distLeft = button02.x - mcButtons.x;
   if(distLeft < 0){
      //trace("Negative");
      slideAmount = -1;
   }
   if(distLeft > 0){
      //trace("Positive");
      slideAmount = 1;
   }
   mousedX = button02.x;
   //trace(mousedX);
   sliderMove.start();
}
}
function button03touch(evt:MouseEvent):void {
if(buttonClicked == 0) {
   //trace("Mouse03 moused over");
   
   //sliderMove.stop();
   mcButtons.gotoAndStop(3);  //go to the appropriate corresponding frame within mcButtons
   distLeft = button03.x - mcButtons.x;
   if(distLeft < 0){
      //trace("Negative");
      slideAmount = -1;
   }
   if(distLeft > 0){
      //trace("Positive");
      slideAmount = 1;
   }
   mousedX = button03.x;
   //trace(mousedX);
   sliderMove.start();
}
   
}
function button04touch(evt:MouseEvent):void {
if(buttonClicked == 0) {
   //trace("Mouse04 moused over");
   
   //sliderMove.stop();
   mcButtons.gotoAndStop(4);  //go to the appropriate corresponding frame within mcButtons
   distLeft = button04.x - mcButtons.x;
   if(distLeft < 0){
      //trace("Negative");
      slideAmount = -1;
   }
   if(distLeft > 0){
      //trace("Positive");
      slideAmount = 1;
   }
   mousedX = button04.x;
   //trace(mousedX);
   sliderMove.start();
}
   
}
function button05touch(evt:MouseEvent):void {
if(buttonClicked == 0) {
   //trace("Mouse05 moused over");
   
   //sliderMove.stop();
   mcButtons.gotoAndStop(5);  //go to the appropriate corresponding frame within mcButtons
   distLeft = button05.x - mcButtons.x;
   if(distLeft < 0){
      //trace("Negative");
      slideAmount = -1;
   }
   if(distLeft > 0){
      //trace("Positive");
      slideAmount = 1;
   }
   mousedX = button05.x;
   //trace(mousedX);
   sliderMove.start();
}
   
}


//button moveBack functions, as a result of mouseOut. these don't really have to be modified from here on.
function button01out(evt:MouseEvent):void {
   //trace("Mouse01 moused out");
   
   if(buttonClicked == 0) {
      mcButtons.gotoAndStop(pageButton);  //go to the appropriate corresponding frame within mcButtons
      distLeft = origX - mcButtons.x;
      if(distLeft < 0){
         //trace("Negative");
         slideAmount = -1;
      }
      if(distLeft > 0){
         //trace("Positive");
         slideAmount = 1;
      }
   
   mousedX = origX;
   //trace(origX);
   sliderMove.start();
   }
}
function button02out(evt:MouseEvent):void {
   //trace("Mouse02 moused out");
   if(buttonClicked == 0) {
      mcButtons.gotoAndStop(pageButton);  //go to the appropriate corresponding frame within mcButtons
      distLeft = origX - mcButtons.x;
      if(distLeft < 0){
         //trace("Negative");
         slideAmount = -1;
      }
      if(distLeft > 0){
         //trace("Positive");
         slideAmount = 1;
      }
   
   mousedX = origX;
   //trace(origX);
   sliderMove.start();
   }
}
function button03out(evt:MouseEvent):void {
   //trace("Mouse03 moused out");
   if(buttonClicked == 0) {
      mcButtons.gotoAndStop(pageButton);  //go to the appropriate corresponding frame within mcButtons
      distLeft = origX - mcButtons.x;
      if(distLeft < 0){
         //trace("Negative");
         slideAmount = -1;
      }
      if(distLeft > 0){
         //trace("Positive");
         slideAmount = 1;
      }
   
   mousedX = origX;
   //trace(origX);
   sliderMove.start();
   }
}
function button04out(evt:MouseEvent):void {
   //trace("Mouse04 moused out");
   if(buttonClicked == 0) {
      mcButtons.gotoAndStop(pageButton);  //go to the appropriate corresponding frame within mcButtons
      distLeft = origX - mcButtons.x;
      if(distLeft < 0){
         //trace("Negative");
         slideAmount = -1;
      }
      if(distLeft > 0){
         //trace("Positive");
         slideAmount = 1;
      }
   
   mousedX = origX;
   //trace(origX);
   sliderMove.start();
   }
}
function button05out(evt:MouseEvent):void {
   //trace("Mouse05 moused out");
   if(buttonClicked == 0) {
      mcButtons.gotoAndStop(pageButton);  //go to the appropriate corresponding frame within mcButtons
      distLeft = origX - mcButtons.x;
      if(distLeft < 0){
         //trace("Negative");
         slideAmount = -1;
      }
      if(distLeft > 0){
         //trace("Positive");
         slideAmount = 1;
      }
   
   mousedX = origX;
   //trace(origX);
   sliderMove.start();
   }
}



//move the slider
function sliderTimer(evt:TimerEvent):void {
   
   //trace("Start Slider Timer");
   mcButtons.x = mcButtons.x + slideAmount;
   //trace("MOVED! slideAmount = " + slideAmount + "   mcButtons.x = " + mcButtons.x + "   distLeft = " + distLeft);
   
   //IN THE "POSITIVE" CASE
   if(distLeft >= 0 && slideAmount > 0) { //check to see if positive
   if(slideAmount < slideMax && distLeft > slideLeft) {
      slideAmount += 1;
      //trace("Increase slideAmount!   slideAmount = " + slideAmount);
   }
   
   if(slideAmount > 1 && distLeft <= slideLeft) {
      slideAmount -= 1;
      //trace("Reduce slideAmount!   slideAmount = " + slideAmount);
   }
   
   if(distLeft > 0) {
      //slideAmount += 1;
      distLeft = distLeft - slideAmount;
   }
   
   if(distLeft <= 0) {
      mcButtons.x = mousedX;
      sliderMove.stop();
   }
   } //end positive check
   
   
   //IN THE "NEGATIVE" CASE
   if(distLeft <= 0 && slideAmount < 0) { //check to see if negative
   if(slideAmount > -slideMax && distLeft < -slideLeft) {
      slideAmount -= 1;
      //trace("Increase slideAmount!   slideAmount = " + slideAmount + "  distLeft = " + distLeft);
   }
   
   if(slideAmount < -1 && distLeft >= -slideLeft) {
      slideAmount += 1;
      //trace("Reduce slideAmount!   slideAmount = " + slideAmount + "  distLeft = " + distLeft);
   }
   
   if(distLeft < 0) {
      //slideAmount += 1;
      distLeft = distLeft - slideAmount;
   }
   
   if(distLeft >= 0) {
      mcButtons.x = mousedX;
      sliderMove.stop();
   }
   } //end negative check
   
}



///////////////////// END CODE ///////////////////////


Try not to LOL to much at my code.

Maybe it's the convoluted-ness of the code itself which is the problem. But why do some browsers handle it fine while others don't? I can't find an answer anywhere. Any suggestions?

Thanks muchly!


-BK

[edited by admin - code wrapping]

Play Movie Clips To Fade Off THEN Play New Movie Clip
Hey guys, I've been doing a little searching and I can't find the answer to my dilemma.

I've made up some buttons that play a little movie clip animation when pressed. The scenario is like this: Push the "Illustration" button and little files pop onto the screen. Each file will be a button that opens up an image. Push the "Pictures" button and the "Illustration files" should fade off the screen so the "Pictures files" could pop in in it's place.

I can't find a way to make the "Pictures" movie WAIT for the "Illustration" movie to be done before it pop in. One goes in, and the other simultaneously goes out and I don't want that.

Is there any way?

Really Slow When Going Inside Movie Clip
I just migrated to a Vista machine from XP. Now when I try to go inside a movie clip, it takes a long time. I am seeing a series of dotted line rectangles as it migrates. Is there some way in Flash 8.0 to turn this off?

Thanks!
Brad

Flash Movie Clip Run Very Slow
I have about 10 of "coconut tree" Movie Clips, 1 clouds movie clip, 1sea movie clip. The problem is when i run all of the movie clips together, the animation run very slow. Can anyone help me please................................................

thanks

Frame Rate Fast In Projector, Slow In Browser?
Please help!

When I play my SWF locally (i.e., hard drive) through the Flash Player, frame rates are correct.

When I play my SWF locally in a blank HTML page through IE6.0, frame rates drop by about 20%!

The problem is that my narrated voiceover doesn't sync with the animated graphics when viewed in the browser.

Does anyone know a solution?

Help Frame Rates: Projector Fast, BROWSER SLOW?
I have a SWF, WHICH IS NOT ON THE INTERNET --- IT'S ON MY HARD DRIVE.

Played via Projector, frame rates are as they should be.

Played in an HTML page in IE6.0 LOCALLY FROM THE HARD DRIVE, frame rates are 20% slower.

There is no sound --- just graphics. SWF is 600x800 pixels, with light animation ONLY.

Can anyone please indicate why the browser plays the SWF slower? AGAIN, THIS SWF IS ON MY HARD DRIVE.

Thank you!!!

When I Click On A Movie Clip I Need The Movie Clip To Goto And Play Frame 2
i have created a movieclip and draged it on to the stage i tryed used on mouse down then tell target goto and play but that ment when ever the mouse clicked any where, how do i tell in to only play when i click on the movieclip ?

HOW TO PLAY A MOVIE CLIP IN REVERSE AND PLAY ANOTHER SIMULTANEOUSLY
I need to find out how to play a movie clip in reverse. As well how to play another movie clip, forward, at the same time... any help?

christianpalino@hotmail.com

Thanks,
Christian

I Need A Movie Clip To Play, Stop And Play Again In The Next Frame
I need a movie clip to play, stop and play again in the next frame. So pretty much i have to get the movie clip to play once and stop then when you go to the next frame it should play again once and stop again. What i have is a slide show type thing where you click on the next button to advance to the next frame and in each frame i have all the animations in their own movie clips.

-Thanks

My Script Is Making My Movie Clip To Run Slow...
Hi there.

While trying a new way to do things. I got a message -quite ugly- saying that "my script was making my movie clip to run slow and that might affect my computer and bla bla bla"



I have to create 19000 little squares. I tried first by creating one by one but at number mc_b_3000 i got more then tired and decided to look for a better way.

I know that i have a quite "small" loop, but how could i avoid the ugly message when my users see the movie?



here is the code:




Code:

for (i = 1; i < 19001; i++)
{
duplicateMovieClip(mc_b_e, "mc_b_g_" + i, _root.getNextHighestDepth());
}

p=1;
i=0;
j =0;
p_x = 31;
p_y = 99;
while ( j < 201)
{
if(i == 95)
{
i=0;
j++;
p_y= p_y+10;
p_x =31;
}
p_x = p_x+10;
_root["mc_b_g_" + p]._x = p_x;
_root["mc_b_g_" + p]._y = p_y;
i++;
p++;
}
thanks...
cheers.
Leo.

My Script Is Making My Movie Clip To Run Slow...
Hi there.
While trying a new way to do things. I got a message -quite ugly- saying that "my script was making my movie clip to run slow and that might affect my computer and bla bla bla"

I have to create 19000 little squares. I tried first by creating one by one but at number mc_b_3000 i got more then tired and decided to look for a better way.
I know that i have a quite "small" loop, but how could i avoid the ugly message when my users see the movie?

here is the code:


Code:
for (i = 1; i < 19001; i++)
{
duplicateMovieClip(mc_b_e, "mc_b_g_" + i, _root.getNextHighestDepth());
}

p=1;
i=0;
j =0;
p_x = 31;
p_y = 99;
while ( j < 201)
{
if(i == 95)
{
i=0;
j++;
p_y= p_y+10;
p_x =31;
}
p_x = p_x+10;
_root["mc_b_g_" + p]._x = p_x;
_root["mc_b_g_" + p]._y = p_y;
i++;
p++;
}

Multiple Layers Of Same Movie Clip Slow Whole Thing Down
I'm still pretty new at this, this might be a question with a totally obvious answer....

My clients gave me a 3 large images (700x525) that they want to flash. The size is giving me difficulties because everything is quite choppy, so my first question is: is there a way to deal with large images so the flash isn't choppy-looking?

There is a transition element between categories of images that is made of of transparent circles morphing and fading out, so you see all this motion and suddenly notice the background when the circles fade. I made this a movie clip that runs about 4 seconds. In my flash file I have 4 layers, each with the same movie clip starting all at the same time. When I view it on the web, it is really slow and choppy:
http://www.theberryman.com/flash/blueCircles2.html (looped so you just see this part).

Here is another version with just one instance of the movie:
http://www.theberryman.com/flash/blu...tOneMovie.html

The question is: Why should 4 instances of a movie playing slow it down so much, and is there anything I can do that would change it? My only thought at this time is to add more layers and circles to the movie to cover the whole 700x525 image at one shot and then just use the one instance, instead.

[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip

lets say that there are 4 buttons are in movieA, and the other clip is called movieB

when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on

so far my code for button1 is:

on (release){
this._parent.movieB.gotoAndStop(5);
}

on (release){
_root.movieB.gotoAndStop(5);
}

button2:

on (release){
this._parent.movieB.gotoAndStop(10);
}

on (release){
_root.movieB.gotoAndStop(10);
}

with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame

can anyone shed some light on this?

Stop And Play Button For Movie Clip Within Moive Clip
hi i have problems with my buttons. i have got 2 fla files. 1) shell.fla 2) content.fla.

The shell.fla has a movie clip(name:holder) to load the content.swf. And within the content.swf i have got movie clip within movie clip.

Thru a search from the forum i came across this script

first frame:


Quote:




function stopAllClips(clip) {
clip.stop();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
stopAllClips(clip[i]);
}
}
}
};

function startAllClips(clip) {
clip.play();
for (var i in clip) {
if(typeof clip[i]=="movieclip") {
if(clip[i]!=clip) {
startAllClips(clip[i]);
}
}
}
};




for the button:


Quote:




on (release) {
if(!_root.stopped){
_root.stopAllClips(_root.holder_mc);
_root.stopped = true;
} else {
_root.startAllClips(_root.holder_mc);
_root.stopped = false;
}
}




everything works fine except after i pause and play, i doesn't play from where it has stopped. Anyone has got any ideas as to how i can solve this problem. Thanks very much.

Making More Than One Movie Clip Play From Another Clip
Hello,
It's been a while since my last post and I am afraid I am just as oblivious as I was before. Here is my dilema: on the main stage I have movieclip a,b,c,d I click on "a" to make the movie play. Now I want to click "b" to make that movie play but I would like a to go back to it's original position by finishing it's timeline which sends it back to the original position. Then I would like to be able to click on "c" and it would send "b" back to it's original position not in this order but randomly depending on which movieclip you select. How can I make this happen? Thanks for any help.

Anthony

How Do I Play A Part Of A Movie Clip From Another Movie Clip?
Hello
On the main timeline (_root), I have a movie clip with a button inside it. I want that button to link to and play from a particular frame in another movie clip which is located on a different frame in the main timeline (_root). How do I do that?

peace,
cc

[F8] Play Movie Clip Inside Another Movie Clip
Hi,

I have a movie clip inside another mc and I want to make the mc inside to play once the user rolls the mouse over it. The problem is that when user rolls mouse over, they can't reach the inside mc because they just roll over outer mc.

Is there any way to do this?
(tried:

Code:
outer_mc.inner_mc.onRollOver = function(){
outer_mc.inner_mc.play();
}
but did not work)

Any help will be very much appreciated.
E

TellTarget To Play A Movie Clip Within A Movie Clip
I currently have two movie clips in my scene with a button that lies inside one of the movie clips. We will call this movie clip for the sake of this post "ph." The button inside of ph has a rollOver/rollOut movie clip called "Buick_rollOut" attached to it as a parked movie clip through tellTarget. Currently Buick_rollOut only works if I put the parked movie clip on the same level as ph. I want Buick_rollOut to be within the movie clip, ph, that contains the button. I want that button be able to tellTarget the location of Buick_rollOut within ph. I hope this makes sense. Here is my code for the button that lies within ph. (this code only works when Buick_rollOut is located outside of ph on the same level).








Attach Code

on (rollOver) {
tellTarget ("/Buick_rollOut") {
gotoAndPlay ("rollOver");
}
}
on (rollOut) {
tellTarget ("/Buick_rollOut") {
gotoAndPlay ("rollOut");
}
}

TellTarget To Play A Movie Clip Within A Movie Clip
I currently have two movie clips in my scene with a button that lies inside one of the movie clips. We will call this movie clip for the sake of this post "ph." The button inside of ph has a rollOver/rollOut movie clip called "Buick_rollOut" attached to it as a parked movie clip through tellTarget. Currently Buick_rollOut only works if I put the parked movie clip on the same level as ph. I want Buick_rollOut to be within the movie clip, ph, that contains the button. I want that button be able to tellTarget the location of Buick_rollOut within ph. I hope this makes sense. Here is my code for the button that lies within ph. (this code only works when Buick_rollOut is located outside of ph on the same level).

on (rollOver) {
tellTarget ("/Buick_rollOut") {
gotoAndPlay ("rollOver");
}
}
on (rollOut) {
tellTarget ("/Buick_rollOut") {
gotoAndPlay ("rollOut");
}
}

Remote MP3's Play Too Fast
I'm trying to make a flash player that plays remote MP3's, and all my MP3's play super-fast.

They play great in every other player I've ever tried, software and hardware. I understand the flash player only plays a certain range of sample rates, but since re-encoding the world's MP3's is not an option, I was wondering if anyone has found a way around this problem?

If I do have to re-encode all my podcast's episodes, is there a way to use the LAME encoder to do this? I can't seem to figure it out on windows... (linux looks like I could use the command-line, but then again, I can't write the flash in linux, so I'm having to bounce back and forth)

Any ideas of what I should do?

Copyright © 2005-08 www.BigResource.com, All rights reserved