ActionScript 1/2 :: Variable To Track Position In Timeline
Sep 10, 2009
I am trying to create a variable in Actionscript 2 that will record the position in the timeline, so Flash knows the user's last position on the timeline.The first line in the mc is: var portfoliostate;On frame 20 of the timeline, I have the following actionscript: portfoliostate = "1_ portfolio";When a button is clicked, I want Flash to recognise if the user has been on frame 20 or not. The code on the button is:this.onRelease = function()[code]However it does not seem to be working. I am implementing this correctly?
View 3 Replies
Similar Posts:
Mar 2, 2010
I have a container Canvas named "cnvList" which contains another component horizontal list "hlist". When i hover the mouse over "cnvList", it should display the current mouse position relative to the container cnvList. I have used cnvList.contentMouseX for this. But it should repeatedly track the mouse position repeatedly even when the mouse is not movedk. Can anyone suggest me with code how it can be done?
View 2 Replies
Aug 18, 2010
does anybody maybe know how to track/trace the current position of a sound file while it is playing?So that it is updated every frame or second?I figured something with trace(sound.position) onEnterFrame, but didn't succeed in realizing this yet.
View 1 Replies
Sep 4, 2009
I may be chewed out for my methodology of how I'm developing this application which I am okay with as long as it enables me to be a better developer.That being said, I was wondering: how do all of you track movie timeline calls?I am building a web site for my company similar to 2advanced as there's just A LOT of graphic elements and animation. Because there are so many calls and a lot of the look is based on one element being called simultaneously and/or exactly after another element I'm having a hard time keeping track of all the calls(yes....I'm doing ALL of these calls in the timeline). Right now I have a hand-drawn tree diagram and it just keeps getting larger and larger.
On another note is there a better way of doing playing each graphic element than "gotoAndPlay" commands on the timeline? I realize that I could have done all of this in external files, but if that's the case then I imagine I would be doing the same thing and just creating a bunch of classes.
View 1 Replies
Feb 2, 2010
I cannot seem to find anything of what I need from google.(Well, I can find the reverse method to what i need ) Basically I wish to access a variable declared in the Root Timeline from my Movie clips timeline.
[Code]...
View 2 Replies
Mar 16, 2007
I simply want to assign a variable to the current frame of the main timeline (not movieclip timeline) I already know about _currentframe and it doesn't help in this case.
View 4 Replies
Feb 8, 2010
I have 2 movie clips, one being loaded into a container MC via "loadMovie();"In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie.
IE: if on frame 1, global value = 1 / if on frame 2, global value = 2 / etc etc I'm familiar with passing variables INTO an external swf, but am stumped on how to do it the reverse way.
View 1 Replies
Sep 2, 2010
How to find Timeline Position of my Movie.
View 16 Replies
Oct 28, 2006
just wondering if it is possible to be able to remeber the timelines position:example:
- the user is say on frame 5 or whatever frame the user is up to (its a quiz senario);
- the user then clicks a link which takes them to frame 15
- when the user clicks on the back button this will take them back to the page which they were viewing whatever that may be for each user.
is this possible or is there any tutorials about it where i can learn this?i have seen one example of it being done where it remebers what level you where at but i ca't remeber where i saw that example/tutorial
View 11 Replies
Oct 2, 2009
I have a mc with thumbnail images ('thumbs_mc'). Within 'thumbs_mc,' I have mc instances that change alpha on rollon and rollout. When clicked, these mc instances also control the main timeline. That's all good and working fine.Now, however, I want something over each thumbnail to indicate which of them is currently active. (I thought about using the same mc for both the mouseover and current marker, but it's problematic since rolling off the mc sets the alpha to 0, destroying the current marker.)
So I figured that I could use another mc (one instance is 'mark_red_btn') and just control its visibility, based upon the where the playhead is in the main timeline.This is what I have in the first frame of the mc that contains the thumbs the mouseovers and the current markers:
mark_red_btn._visible=false;
if (_root._currentframe == "red") {
mark_red_btn._visible = true;
};
Unfortunately, it is not working. The mc 'mark_red_btn' stays invisible even when the main timeline is on the frame labeled 'red.'
View 9 Replies
Sep 3, 2010
How to find Timeline Position of my Movie.
View 9 Replies
Oct 2, 2004
how do u make a currently playing song (s1) move to a new spot in the song?1.position=wure;were wure is the position in milliseconds i want it to bedoes not seem to work .s1.stop;s1.play(wure,0);
View 2 Replies
May 21, 2007
Does anyone know how to control an mc's timeline with the mouse position? So, when you click and drag right it plays the timeline forward and vice versa? I know how to do it with a slider, but I'm stuck on replacing the slider position with the coordinate where you click your mouse...if that makes any sense.
View 2 Replies
Oct 2, 2004
how do u make a currently playing song (s1) move to a new spot in the song? s1.position=wure; were wure is the position in milliseconds i want it to be does not seem to work .
s1.stop;
s1.play(wure,0);
does not seem to work either
View 2 Replies
Feb 10, 2010
how to controll the timeline via moving the moiuse in x (left to right ).basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )
View 17 Replies
May 15, 2005
i want to know if anyone can tell me how to controll the timeline via moving the moiuse in x (left to right basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )
View 3 Replies
May 25, 2009
I'm trying to make a faux 3D rotation animation where if the user mouses to the right the object rotates right and if the user mouses to the left the object rotates left. Depending on how far they move the mouse the rotation should speed up or slow down.I spent a lot of time making an object in 3d studio max and importing the animation of rotation as JPEGs onto the timeline. I figured the most efficient way to go about this would be to make the mouse control the timeline instead of the object itself.
View 4 Replies
Oct 2, 2009
I have a thumbs_mc with thumbnail images. Within thumbs_mc, I have a transparent overlay_mc that functions as a button. Mouse over the overlay_mc and the alpha chages so there is a tint over that particular thumbnailWhen overlay_mc is clicked, the main timeline goes to a particular frame label.What I need to do is have the position of the playhead on the main timeline also determine the alpha of the overlay_mc so the viewer knows which thumbnail is playing.
View 1 Replies
Aug 6, 2009
This must have been done before and be really easy but I am a newbie so just keep coming up with compiler errors. I have built a website in flash cs4 using as3. I have set up the time line so that each different page on the website exists at a different position on the timeline. Sections have been labeled so that I can jump to that section upon button click.
What happens is when the link to the page/section is clicked the timeline jumps to that section and plays an animation that animates the page onto the stage then stops.("in animation") When you click another link the page should animate off of the stage ("out animation")and the next one animates in.
(I have set the time line up so that after each "in" animation there is a stop and after each "out" animation there is a stop.) This is where i'm having the problem.
I have set up event listeners for the button clicks But i can only get them to either play the "out" animation then that stops, using this code:
[Code]...
What i would like to know is how to add the two together so that when a button is clicked the information about what was clicked is added to a variable. The function plays the out animation then when that is complete checks the variable where the page clicked information is then jumps to that section on the timeline and plays it's "in" animation
View 3 Replies
Jan 27, 2010
I've got a movieclip with two layers - a background movieclip, and above that, a mask movieclip (as you might guess, this layer is masking the first). Due to design necessity, the mask is animated on the timeline across 60 frames.The problem arises when I use an Event.RESIZE listener to change the width of the parent movieclip when the browser window is resized. Any code to reference the mask, i.e
parentMC.contentMask.width = stage.stageWidth;
parentMC.contentMask.x = frame.width/2 - frame.contentMask.width/2;
Simply results in the mask animation not playing at all.
View 1 Replies
Sep 17, 2011
I have found a generic recursive loop that stops/pauses all child movieclips. If I change stop to play in the code, it plays all child movieclips simultaneously. I want it to resume only one animation at a time. I want a generic recursive loop that resumes animation from last position (position it was paused) irrespective of whether I have paused on the main timeline animation or animations within child movieclips or animations within grandchild movieclips. (I have animations on main timeline, animations within lastFrame MC of maintimeline, and again within last frame MC of child's timeline).[code]...
View 1 Replies
Feb 23, 2009
when I attach an mc inside another movie clip and then during interaction with the movie change the _x of that parent clip to whatever other value than original location, the _x of the child mc does not change as it regards its position in relation to the parent - moving the parent does not move the child within it how do i find the _x of the child in relation to the _root though as opposed to the relation to its parent?
View 1 Replies
Nov 20, 2009
I have bought some code to make a starry night in my animation but I need to make this either only appear inside a movie clip, or on a certain part of the stage, can anyone tell me how to alter the below code so I can do this? do you I need to add in some x, y coordinates?
import mx.transitions.Tween;
import mx.transitions.easing.*;
var maxStars:Number = 25;
var minSize:Number = 50;
[code]....
View 1 Replies
Oct 17, 2009
I have been approached to design a configurator for a new television product. The Application will let users specify the colours of certain parts of the product and also attach addons, which then updates a cost total.
In the main interface i have a looping animation of the product slowly rotating around 360 degrees that i rendered in 3ds max. When a user clicks a button on the interface i need to load an external movieclip on top of the main animation so it looks as though a certain part has changed colour, this i have acheived. The problem is that when i load the external clip over the original, the loaded clip starts playing from frame 1 and i need it to inherit the playhead position of the main animation so the two layered pieces look as though they are rotating as one. I'm sure this must be possible, unless i need to approach the problem in a different way?
View 7 Replies
Feb 12, 2009
I am working on a client who wants a "Game-like" tour of their facilities on their website. I can use flash and do some very basic actionscript ..especially cutting and pasting
At any rate, I have character that moves on the main tour map and he starts in the parking lot...he can go from one screen ( scene ) to another. But when the character returns to the main tour map he always starts at the same location. As opposed to starting where he just came from. Such as if he just went into the "Process Plant" he should start on the main map at the "Proccessing plant" ... Can I set the X Y coordinates in some type of variable that remembers where he came from when he exits another scene and returns to the main map...?
View 6 Replies
Mar 31, 2010
I have the following working line:
moveMC.y = twn.bounceBall01.y
It successfully gets the y value of bounceBall within the MC twn, and applies it to the y value of moveMC. How do I replace the 01 in bounceBall with the following global variable: globals.data.clk? I've tried using a way that Ned successfully showed me for a different situation, plus tried some other permutations, but Flash says "no way dude".
View 1 Replies
May 16, 2010
I have a AS2 netstream instance, in which I am loading various flv's into. The 'main' video has links to other visble when its playing. I want to be able to store the position of the flv (in seconds) so that when the user comes back to the 'main' video it remembers where it was and contiues to play. This is the code I have written so far regarding this (its probably massively wrong).
var remember:Number;
if(ns.play == ("flvs/reel.flv")) { ns.time = remember; trace ("stored"); }
[code]....
View 1 Replies
Nov 18, 2009
How can I obtain the position of a instance whose name is stored in an variable? If there is a instance whose name I don't know, but the instance's name is store in an variable x. How can I obtain its position?
View 4 Replies
Mar 8, 2011
I would like to load my text variable(numerical value)into the _y = ???;Here is how I'm loading my text file. Variable1 works. Variable2 doesn't(script was a guess)
as
myData = new LoadVars();
myData.onLoad = function() {
[code].....
View 6 Replies
Nov 28, 2010
I run a demo code,it extends Sprite,like follows:
public class Vehicle extends Sprite{ protected var _position:Vector2D; public function Vehicle(){ _position = new Vector2D(); draw(); } protected function draw():void{ graphics.clear(); graphics.lineStyle(0); [code]....
I don't understand following code,because I only define _position and don't define position variable,why I can use position.x? x = position.x; y = position.y;
View 1 Replies