ActionScript 2.0 :: Detect Which Frame The Movie Is At In A MC?
Sep 22, 2002Which script do I use to detect which frame the movie is at in a MC?
View 2 RepliesWhich script do I use to detect which frame the movie is at in a MC?
View 2 RepliesIs there some code that I can use to detect whether a frame has already been played? What I'd like to do is detect yes or no, then jump to a specific frame depending on the condition.
View 11 RepliesI am trying to figure out how to stop a user from resizing the page below 800x600. I have found how to load a new url or swf when below a certain resolution but is it possible to load a frame or movie when the resolution is resized below 800x600 and goes back to the previous frame if resized back above 800x600? I have symbols attached to the corners of the stage. Resizing looks terrible.
View 1 RepliesDoes anyone know how to trace out the frame rate that a swf is currently playing at?I've tried creating two date objects on adjacent frames, running the getTime() method on each and subtracting the difference but it seems to be the same regardless of what I set the movie's frame rate to in the property inspector...I am basically trying to monitor the performance of an animation at runtime and make adjustments on the fly based on how fast or slow the movie is playing.
View 4 RepliesI have external swf on frame 1. I would like to to detect its last frame or when it stop playing so I could jump to the next frame.
View 1 RepliesI have my flash on multiple scenes, and would like to play an animation when clicking on the navigation button before switching to a different scene.
I'm halfway to accomplishing this.
Here is what i used
Code:
_root.gotoAndPlay("changepage1");
_root.onEnterFrame=function(){
if(this._currentframe=="changepage2"){
[Code]....
The above code is on a blank keyframe. Changepage1 is the start of the animation and Changepage2 is the end of the animation.
Upon clicking the navigation button it plays the above scenes.
However it doesn't change scenes to scene "Home2".
Is there an event listener to use to detect whenever I am leaving a particular frame on my timeline? If I am correct, Event.FRAME_EXIT only works on the newer versions of Flash. Is that correct? (I am working with CS3.)
View 1 RepliesI'm detecting key presses with the follow code:
main.as
ActionScript Code:
package
{
import flash.display.MovieClip;
[Code]....
I have a movieclip placed in the main timeline. Inside that movieclip, there is another movieclip.I need to know the current frame number of the inner movieclip when the animation is playing.And report that current frame number back to the actionscript in the main timeline.
View 2 RepliesAny way to detect the frame rate of an external swf and then change the frame rate of the original file to that?
View 1 RepliesI'm building a simple 360 degree image rotation effect using single frames and forward and back buttons. I'm new to AS3 and have managed to create functioning buttons... (so my code may be a bit odd!)But now I also want to advance frames by clicking and dragging on the image itself (or on an invisible button sat on top of the image).Although there are some threads here which have asked the same thing, I don't understand how they were answered. My code is below, and the file I am practising with is on:URL...At the moment if you click on the image area it will advance but as there is no code detecting mouse direction, it just goes forward. Can anyone help me understand how to implement a simple direction detection and then use this to decided whether to advance or go backwards.[code]
View 16 RepliesI'm new for flash. I would like to know I need to fire what event which can detect frame animation finish? I need to pass a parameter from swf to flex to inform frame animation finish.
View 2 RepliesI am trying to detect the AS2 stages frame rate w/o timers. My FlashAsset for Authorware and Director can detect it using #frameRate from the outside of the SWF.
Does anyone know a undocumented command or how to address the stage as the MovieClip? I cannot use Timers, etc. to accomplish this do to programming restrictions of an old Flash Asset one of the two platforms I am using requires.
I have a function with Enter_Frame running and have it tween during the function. I know you could use object.y=object.y + 1 instead of the TweenLite i'm using now. But TweenLite gives the best effect I wanted. My problem now is, I wanted to remove the enter_frame function when its not collision each other. But when I traced hitTestObject, it have like a split second where the hitTestObject result return 'false'. So the tweening can't really finish 1st, and remove enter_frame run early while the object is still collisioning.
private function checkCollision (e:Event):void
{
//detect collision in array
[Code]....
Is it possible that contents (huge) in the first frame will detect preloaders scripts?when the contents are being exported to the first frame? I know one solution that the instance of the image or a movie clip can be used. But when I am using dynamic content I cant use instances anyway.
View 4 RepliesI got it working for using the e.target of the mouse but now I need to filter through the array on enter frame and detect whether a collision is detected.[code]
View 4 RepliesHow to detect the MovieClip playhead that is in play() condition or stop() in one frame?
View 3 Repliesit possible to set the frame rate of an externally loaded movie to a different frame rate than the movie it is embedded within. I basically have a flash site that loads flash movies using loadMovie command, however, the frame is lost within these movies and simply adopts the main site frame rate.
View 2 RepliesI'm currently making an animation which will eventually exceed the 16,000 frame limit (don't ask haha), so, short of making two movies and having to just start up the next one, what is the code for loading a movie? I presume they need to be in the same directory? So basically all I want is on the last frame of the movie the code executes and the second movie file opens up and starts. I guess I'd want the current movie to close, too.
View 1 RepliesJust finally making the transition from AS2 to AS3.All i need to do at this point is make two buttons which will control the movie to goto next frame and previous frame. I have gotten how to make the buttons go to a specified frame number and also a button to go to a specified external url but no success in making a simple next/previous pair of buttons.
stop();
but1.addEventListener(
MouseEvent.MOUSE_UP,
[code]....
i created a two layer in time line in one layer there is a movieclip called mc1. In the same layer in 15th frame i have another movie clip mc2. Inside the movieclip mc2 i created another movie clip at frame10 now if i clik the the mc1 on first frame The movie clip should goto and stop at tenth frame
View 4 Repliesi have a movie clip with a dynamic text field being animated...i have a text file with this in it
&textline1=time
&textline2=place
&textline3=year
&textline4=month
now how do i make the movie clip to first go from frame 1 to 10( last frame in teh movieclip) with the text time and then when the movie clip starts again it should say place and so on and so forth.. depending on how many textline variables i define in the text file?
I need to create a script that will jump to a certain frame in the scene when a movie cilp reaches its last frame. Putting a goto... within the MC itself doesn't work. I assume that I need to create a listener of some sort....I haven't been able to find what I need in any documentation (and I'm even been looking through AS dictionaries going back to Flash 4).
View 1 RepliesI'm doing a rather fancy button with up,down,rollover,rollout,and static states, something the standard flash button structure isn't capable of as far as I can tell, I've tried it.
Here's the setup: My main timeline has a series of frames with stop(): scripts, and each frame has a movie clip representing what should happen during that state: still, rollover, rollout, mousedown, mouseup I can't get the mouseup event to work.
[Code]...
I would like to detect if a movie is idle: fully loaded and no use interaction and no other functions are running... Then will call to run some layout optimization functions
View 5 RepliesI have an animated movie clip on my stage with aprox 100 frames with a stop action on the movie clip's timeline frame 1. I have a button on the root timeline that starts the movie clip animation but what I want is a way of detecting when the last frame of the Movie Clip is reached.i.e when movie clip gets to the last frame trace something..
View 3 Repliesis it possible to link a frame inside a movie clip from main time line?
View 4 Replieshow to code this on a button
onrelease
gotoandplay(10); // i need delay here before activating the next code below//
gotoandplay(80);
the trick is.. i want the button to play frame 10 to 40 then after playing from frame 10-40 the movie stops and then play frame 80 to 100
i'm very new at flash and finally ended all the work i wanted to do here. now i just need to had the actions so it will run properly. basically i just need it to stop in each frame and run the animation of the movie clip on that frame. if it's i can put the project here so you can see what and were i need to had the actions.
View 1 RepliesI have four movie clips (.f4v) in 4 frames in a movie with watch buttons.. This movie has them been imported into a main movie container that has next and previous buttons. However if i play a movie then hit next frame, the movie continues to play in the background. The code below shows one of the actionscripts for a movie clip and then the main actionscript in the main movie.[code]...
View 1 Replies