ActionScript 2.0 :: Adjusting Frame Number In Script?
May 31, 2010
I have a timeline slider part to my animation which starts at frame 1089 and ends at frame 1173, I have a script which allows me to do this and works perfectly when I build it in a new flash file starting at frame 1, I need this code to work for the animation I have built at frame 1089, I dont know which number "1's" in the script relate to the frame number, I have tried changing them all to 1089 but that doesn't work! at the moment as soon as I click on this it jumps back to frame number 1 - which I believe as the code stands is exactly what it should be doing. Please could anyone edit this code so that it realises which frames I want it to work in?
var numOfFrames:Number = 85; // number of frames in the timeline to scrub
var widthOfScrubber:Number = 500; // width in pixels of scrubber bar
var widthOfScrubberSlider:Number = 25; // width in pixels of scrubber slider
[code].....
View 1 Replies
Similar Posts:
May 31, 2010
I have a timeline slider part to my animation which starts at frame 1089 and ends at frame 1173, I have a script which allows me to do this and works perfectly when I build it in a new flash file starting at frame 1, I need this code to work for the animation I have built at frame 1089, I dont know which number "1's" in the script relate to the frame number, I have tried changing them all to 1089 but that doesn't work! at the moment as soon as I click on this it jumps back to frame number 1 - which I believe as the code stands is exactly what it should be doing. Please could anyone edit this code so that it realises which frames I want it to work in?
var numOfFrames:Number = 85; // number of frames in the timeline to scrub
var widthOfScrubber:Number = 500; // width in pixels of scrubber bar
var widthOfScrubberSlider:Number = 25; // width in pixels of scrubber slider[code].....
View 3 Replies
Apr 8, 2003
How to adjust the frame rate of an imported movie so that it would run in its intended fps rate, and not at the same rate as the presentation in which is importing it. (To be more specific, my main presentation runs at 1 fps, but the intro movie I want to add runs at 20 fps). Anyway, along my travels, someone pointed me towards the code at [URL]. I have since downloaded it and tried to get it to work. As it turns out, I know so little about flash and actionscript programming that I am unable to get it to work properly!
According to the comments in the code, it is executed by calling the fPlayControl() function, which has the following syntax:
_levelN.fPlayControl(_root.mcMovie,nFPS)
where (quoting now)
"'N' is the level number of where this swf is loaded and 'mcMovie' is a movie clip on the _root timeline of the movie that is calling this function and 'nFPS' is a number between 1 and 120."
I don't even know what levels are! Are they layers? Thus, the first layer is level 0? Then the next layer is level 1? Next, how do I give an imported movie a name so that I can call this function with the movie's name as parameter? I tried importing a movie into the library, and then giving it a name, but I still couldn't get the bloody thing to work.
My steps to attempt to get this to work: I opened the play_control.fla file, and chose "Import to library..." I then selected my little intro movie, and then I brought up the library, and renamed it. I also choose the "Export for ActionScript" option, which automatically highlighted one or two other options. Then I added this one line after all the other ActionScript code:
_level0.fPlayControl(_root.myintro,1);
Anyway, after doing that, nothing came up. Then I added another layer and inserted the intro movie from the library into it and played the movie again. This time the intro played, but it zoomed along (at I'm assuming 120 fps, which is what the speed is set to in the demonstration file I downloaded). Thus, it still wasn't working.
View 4 Replies
Nov 17, 2009
I have tried this a dozen different ways and I really am at my wits end.
I have a presentation that works like a powerpoint. Everything is working as it should, except one part. I have a movie clip with an instance named slides, and I want to actively display which frame number you are in this move clip.
I have tried more than one why but I see no reason why this should not work:
var frameNum:Number = this.slides.currentFrame;
this.frameText.text = "P�quina " + frameNum + " de 173";
It appears to work at first, but does not update when I navigate the slides. It constantly says 1. Before I just added a function to the back and next buttons to frameNum++ and frameNum--, but after I created the Menu I would prefer it to automatically detect what frame it is on.
View 4 Replies
Oct 11, 2009
I created the following AS for a particular frame
Code:
cnx.addEventListener(CNXConnection.DIGITAL, onDigital_10);
function onDigital_10(e:DigitalEvent)
{
[code]....
While debugging everything works properly if I'm testing that frame.But, pushing a button in another frame, I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference at "frame number:raw number"
I'm quite sure that the problem is that the variable e.Join changes its corresponding e.Value pushing a particular button in another frame (as must be). Any ideas how to link that information to the frame that create the error?
View 1 Replies
Jun 30, 2004
I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?
View 1 Replies
Jun 20, 2007
is it possible to find the frame number of frame label with AS if a button is rolled over, the timeline jumps to a label - which plays a set of 3D rendered frames to 'raise' and element, once a user rolls out of the 'button' area the button is meant to 'lower' - which can be done by simply playing backwards to the previous label.
View 5 Replies
Jun 30, 2004
I am trying to use this if statement with a frame label instead of a frame number. I believe that _currentframe is looking for a number only. Is there a different command that looks at frame labels instead of frame numbers?
View 1 Replies
Jan 31, 2011
Is there a simple way to get the frame number of a frame label?
View 2 Replies
Aug 16, 2009
If I know a frames name, is it possible to get the frame number from the frame name?[code]...
View 9 Replies
Jan 9, 2009
I feel like such an idiot but after trying endlessly I still haven't managed to come up with a way to display the current frame number of nested movie clip ("ecke1") (in a dynamically created text field).The problem really is that I don't know how to have flash keep updating the variable. Here's my latest attempt:
Code:
var frame:int = 0;
addEventListener(Event.ENTER_FRAME,updateframe,false,0,true);
[code]....
View 4 Replies
Oct 12, 2010
I want to change the text of a dynamic text box based on the frame number. Something like this:
Code:
if (_currentframe > 222 && _currentframe < 2222) {
txtMessage.text = "Pump turned on";
}else{[code]......
But this doesn't work.
View 2 Replies
Sep 17, 2009
Is it possible to find out the first frame of a label without going there then put it in a variable in AS2 or AS3?
View 2 Replies
Dec 1, 2009
I'm having difficulty searching it since keyword frame brings up everything. I'm looking to reference the frame number in an if statement.
A small note I'm doing this cause the listeners I'm using to target key presses are interfering with each other when, even when the actionscript is on different frames.
View 3 Replies
Dec 11, 2009
Is there a simple way to get the frame number of a frame label?
I have a bunch of labels on a long timeline, but want to create some calculations based on the number of frames between labels.
View 2 Replies
Dec 19, 2003
I would like to use a conditional to determine if my location is before or after a frame.However, to make it portable I would like to base it on the label name.e.g.
if (_currentframe < "p2")
however, "p2" is the label of a frame.So how do I get the frame number from the frame label? I am making something that when it detects a click, jumps to the next point in the movie. These P1,P2, etc. will be distributed through the movie.
'if jump detected'{
if (_currentframe < "p2"){
gotoAndPlay("p2");
} ELSE IF (_currentframe < "p3") {
gotoAndPlay("p3");
I guess the problem with this is what if the one of the movies isn't as long and doesn't have a "p4" location for example.Probably I can handle this case when I am setting up the variables that contain the frame number of "p2", "p3", etc... checking agains the max number of frames.
View 1 Replies
May 7, 2006
I dont know if it sound stupid if i ask this kind of question as i really dont know how to address frame number below is the code, i have movie clip, i set a condition tat if apple equal true and also if the movie clip inside the movieclipball's frame reach frame 25, the movie will play.[code]
View 1 Replies
Nov 5, 2007
Can a rollover go to a different frame number...
View 2 Replies
Feb 27, 2009
The first Scene of my movie has a video that is streaming on frame one what i would like to have happen is once that video is completed then the flash takes you to the next scene of a specific frame Number.
View 3 Replies
Mar 15, 2010
I am making a website, I have a loaded swf that I want to animate off screen AND THEN unload on a button click, the home button in this case. I have had a shot at making this happen but to no avail.This is the code I have, which currently doesn't work. The function 'frame30' does not fire. I have annotated it so you can see what works and what doesnt.[code]
View 1 Replies
Dec 19, 2003
I would like to use a conditional to determine if my location is before or after a frame.However, to make it portable I would like to base it on the label name.if (_currentframe < "p2")owever, "p2" is the label of a frame.o how do I get the frame number from the frame label?I am making something that when it detects a click, jumps to the next point in the movie. These P1,P2, etc. will be distributed through the movie.
Does this sound like the best idea?
'if jump detected'{
if (_currentframe < "p2"){
[code].....
View 1 Replies
Oct 12, 2010
I want to change the text of a dynamic text box based on the frame number. [code]...
View 4 Replies
Jan 7, 2011
What is the actionscript 3 syntax for retrieving the frame number that our object is currently in ?
View 2 Replies
Jan 25, 2009
I want to addChild at certain frame say 130. And I used the following format
var btn1:Button = new Button();
gotoAndPlay(1);
addings();
[Code].....
put and even I can't get the trace result. how to add childs at any frame number I want
View 3 Replies
Aug 18, 2010
I want to get the current frame and current scene because I want to be able to return to that same exact scene and frame when I click a button that goes to a different scene. When I click a button that says "Exit" I want to go back to the same spot as before.
View 1 Replies
Nov 19, 2005
I'm stuck on this annoying bug of Flash:to animate a character i have different graphic symbols of hand positions inside a single container graphic symbol; that way instead of having to swap different symbols while animating and tweening, i just have to change the number on the "single frame" input box on the properties of the symbol.
It worked fine a few sessions ago, but now it won't let me change the frame number if there's a tween before that keyframe; tha keyframe isn't participating on any tween, and may even have some frames between the previous tweening one. The only way it will change is if i remove the first tween or add a blank keyframe between them, wich of course isn't an option when animating... i know it would work if i add a new layer and continue there, but it'll add a lot of mess to the already busy timeline.
The strange thing is that it remains working on some frames, from the previous session, and if a cut and paste them i can change the frame number freely; but if i try to build a secuence from scratch, it won't let me, even on a new document.
View 2 Replies
Apr 9, 2007
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 Replies
Jul 29, 2007
Is there a way to get Flash to know what frame it's on and pass that as a variable? I can't use counters because I'm using a random frame function.
View 3 Replies
Jun 17, 2009
Is it possible to create a link on an html page that when clicked will load a new page, which has a flash movie on it, but make the flash file jump to, say frame 50, or a frame label?
View 2 Replies
Apr 22, 2010
I have a gallery controlled by 4 buttons. The images are loaded by XML and have a timeline animation. So they slide in and out.I want to add an event listener to the buttons so they finish playing the movie before loading the new image. Can an event listener listen for a frame number in a MC?[code]
View 1 Replies