ActionScript 2.0 :: Creating And Deleting Movies - Increasing The Variable This.speed Inside Interval Statements
Jun 14, 2006
I am trying to make a simple game where there are five balls that bounce around the screen and speed up at set intervals. You have to dodge them for as long as possible. Right now I have the game set up so that you dodge for 15 seconds and you win - but I can't delete the balls that are bouncing around, and I don't know how to put in a reset button. I have also tried increasing the variable this.speed inside my interval statements but it doesn't work.
View 3 Replies
Similar Posts:
Mar 23, 2010
I have a movie clip on my scene which has a speed applied to it making it move across the screen. This is duplicated when it reaches the other end of the screen.On my scene I have some action script which is acting as a timer. After a set time I want it to increase the speed of the movie clips, making the game become "harder". I seem to be able to manipulate the alpha of my movie clips but can't seem to trigger the speed increase.If i use a setInterval it seems to trigger the speed increase but it does it each time the movie clip is duplicated (so the delay resets, it does not change once and apply throughout)However, where I am changing the alpha I cannot seem to change the speed.
View 2 Replies
Jul 7, 2009
I've been working on a flash animation that has been set to 12frames per second, but now my boss has told me it needs to be 25fps - but when i change the frame rate in 'modify>document' the whole thing just speeds up. Is there a way to increase the fps whilst retaining the original speed?
View 1 Replies
Oct 16, 2011
The Loaded Swf File Inherits the Frame Rate speed of the Main TimeLine,
Is there a way to control the frame rate of the loaded Swf File.
If I have loaded a Swf File to a Movie Clip container, How can I control the speed of Movie_ClipInstance.CurrentFrame .
View 10 Replies
Jul 20, 2004
As part of a preloader I have a 19 frame movieclip of a 3d star rotating created in swift 3D, it rotates above a normal load bar that shows progress. Currently the star is a separate clip from the loadbar and just rotates as the movie loads, how can I tie the two in together so that the rotation speed of the star gets faster as the movie loads. I have an idea how to do this using tweens but because the star is not animated using tweens, swift generates 19 different frames I'm a bit stuck
View 6 Replies
Sep 3, 2009
I am trying to increase the speed of a movie clip by using a slider. Can someone point me to some information on how to do this? I found this but am not sure my version is picking up the change in frame rate accurately
View 1 Replies
Aug 3, 2011
I have 60 frames I want to increase the fps value for frames from 20 to 30, and the remaining frames fps value should remain the same Using Action Script 3 or Action Script 2
View 10 Replies
Oct 12, 2003
I'm trying to increase the speed of a single movieclip. The frame rate of my movie is 12, and I don't want to increase the frame rate of the entire movie just to speed up one movieclip.
I've seen tutorials all over the web, and all the actionscript controlled speeds of movieclip tutorials are for more interactive animations, such as mouse movements and rollovers.
I'm looking for something that simply plays a movieclip faster on the timeline and I'm sure there is a simple code for this.
View 1 Replies
Nov 5, 2006
I'm working on this "game" and I currently have a ball that increases in speed as you hold down the arrow key. What I am now trying to accomplish is I want the ball to ease to a stop when the user let's go of the keyboard key (onKeyUp). Here's the File. <---Link
Here is my code so far:
var speed = 10;
ball_mc.onEnterFrame = function (){
if(Key.isDown(Key.RIGHT)){
this._x += speed += 1;
} if(Key.isDown(Key.UP)){
[Code] .....
So once you let go of the Keyboard Key I want the ball to slow down to a stop.
View 1 Replies
Jul 24, 2009
is there anyway to change a songs playback speed depending on a speed variable. heres the kicker tho im limited to using only as2.
View 2 Replies
Aug 5, 2009
I need to create a variable inside a MoveClip. The easiest way to do this is to click on a movieclip in the editor and just enter the actionscript on a frame, but because i'm doing this with dynamically created movieclips i need to do it with actionscript.
PS: I'm doing it for sorting purposes in a slideshow.
View 3 Replies
Oct 25, 2005
I have been having trouble creating a movie clip with a reverse rollover effect within a movie which has a reverse rollover effect. that sounds confusing
In essence I wish to create a panel that rolls out on rollover and rolls back in reverse when the you rollout. I have done this using this script
[Code]...
However I wish to make movies within this movie that have the same effect on them. But when I create another movie or button within this movie it is not registering on rollover. I guess because the script on the main movie overrides it?
View 2 Replies
Nov 26, 2004
I have a question which probably isent to difficult.. im making a game in which there are some mines which chase a ship... these mines are created with
[Code]....
View 3 Replies
Nov 26, 2004
im making a game in which there are some mines which chase a ship... these mines are created with
Code:
dot.duplicateMovieClip("dot"+currdot, this.getNextHighestDepth(), {_x:-100, _y:-20});
currdot=currdot+1
inside the dot MC there is a video , it blinks and roatates and stuff when its just floaring around , and when it hits something
Code:
if(this.hitTest(_root.ufo)){
_root.shieldCurr=_root.shieldCurr-_root.dotDamadge;
trace("hit"+this);
this.gotoAndPlay(73);
}
gotoAndPlay(73);
refers to the 1st frame of the explode animation inside the MC frame 1 to 72 is a looping animation now after it plays the exploding animation , i want it to be deleted ive tried a few different things like...
Code:
_parent.removeMovieClip(this);
which dont seem to be working. So id like to remove the movie clip from inside itself.
View 3 Replies
Oct 19, 2010
I'm working on a game for my flash class, where you a question pops up and asks you the name of a US state and you guess the state. I have created the 50 states as buttons with the questions. Each state is in its own frame and i need a way to randomly select a state.
After the game begins i need to crate an array with the frames of all states and then have a random() function select a frame from the array and display the question on the screen. After that it needs to delete the frame from the array so the random() function cannot select the same question twice. Once that is done and all of the data is gone from the array then it needs to move on to a different frame where the total number of questions correct is calculated and its display on the screen.
View 6 Replies
Feb 16, 2010
I am currently trying to set up a mini-test inside of a project (Action Scipt 2)
Basically, it's a multiple-choice test/quiz that adds 1 point to a text box (that will have the number 0 in it to start) if a wrong answer is selected.
[Code].....
So say answer 3 is the right answer, when clicked it'll go to the next frame/question. But if a,b or d is clicked, I need it to show some sort of 'Incorrect' meesage (which will be a text box), show the 'NEXT' button (which isn't visable/clickable until an answer is selected) to go to the next frame/question and add 1 to the 'Total' box, all at the same time.
There will be a total of 3 rounds of 20 questions (60 questions total) and at the end of 3 rounds, if the user ends up with say 20 in the 'Total' box, 5 points will automatically be subtracted from it leaving them with a total of 15 (the 5 points subtracted is a sort of bonus at the end). So on frame 60 for example (the last frame), there would be code telling the 'Total' box to subtract 5 from the ending number. If the total is higher than 0, it'll go to a certain frame and if the total is 0, it'll go to a different frame.
View 48 Replies
Apr 2, 2011
i want to make the elements for an array, each one i++........so
ArrayOne = Array()
ArrayOne[i] = i
i++
make it work so the array would liik like....
ArrayOne = [0,1,2,3,4,5,6,7...]
View 2 Replies
Jun 10, 2011
i want to make the elements for an array, each one i++.[code]can somone make it work so the array would liik like.ArrayOne = [0,1,2,3,4,5,6,7...]
View 1 Replies
Dec 8, 2010
I've developed a touch screen flash application for a sneakers (shoe) shop. It has a 'find a shoe' section, which isn't causing problems, and an 'about' section, which is.The about section is a heavily animated history of sneaker culture. It's animated via the timeline, not via AS3. The problem is that with prolonged use of the about section, idle CPU usage grows, and memory usage grows, eventually making the app unusably slow.
I've made a 'minified' app that does nothing other than create/delete 50 instances of my 'about' movie clip - it doesn't even add those instances to the stage. I've cut basically all code out of the 'about' class, which is shown below:
[Code]...
View 8 Replies
Apr 25, 2009
I'm trying to make a "next track" button. "T" is meant to be track number, and every time they click this button, I wanted "T" to increase by one until T>4 where I need it to go back to T=1 (I've only got 4 tracks). Then, I want, depending on what "T" equals, for it to start playing Track"T" and stop playing previous track. I also want the track playing to be looping continuously. At the moment, everything is muted, until I press the button; where it then plays all four tracks at once. I also have a problem with the mute button, but I've got a strong feeling both are of the same reason. I think my problem is that it does not know what "T" equals to begin with so it accepts all if statements; playing all tracks. But I'm new to Flash (my second project) so I'm not sure.
on (release){
stopAllSounds();
T =T+1
if (T>4){
T=1
} if (T = 1){
_root.snd1.start(0, 100);
[Code] .....
View 3 Replies
May 9, 2008
I'm trying to create a temperature control box for a flash movie and i have it so that two arrows would control the temp, i can't seem to get them to increase the dynamic text field titled target_temp it sets it fine on the first load but then once I try to click the increase arrow the text field doesn't increase, do i need to reload the movie? here is the code I have so far.
Code:
on(release){
target=target-1;
target_temp.text=target;
}
View 1 Replies
Aug 5, 2003
i'm trying to create an menu from a xml file whit two attriburtes, name and link. But i want to each button appear whit 1 sec interval from the others until the menu.lenght is finishes
View 6 Replies
Jun 11, 2011
I'm having problems with deleting what a variable creates on stage!I have a random image loader as seen below.This creates a random image from the list I give it (only 4 in this example) and puts that picture on the stage.[code]Depending on the image the right or left door is the correct door (tr is the left doors name).The code below works fine, it even inserts the _whatPicture randomly again but the problem is the new picture overlaps the old picture, I can't figure out what to type so it will delete / remove the first _image, so that the new image is the only one there.[code]
View 4 Replies
Jan 19, 2006
How can I randomly create some variables as the movie loads so I'll be able to use this variables as a if statement later on and make the movie play diferent labels?
View 4 Replies
Mar 19, 2009
Here is the code I have:
It is supposed to make the movieclip move when it has been 1 second, it doesnt work!
View 2 Replies
Jan 28, 2009
I'm making a small movie in Actionscript 2, but have found a problem related to the scope of my functions.Figure I have an audio/mute movieclip, with a global variable called "elaudio" (boolean). When "elaudio" == true , the volume is up, when "elaudio" == false, the volume is muted.I'm attaching sounds from the timeline using Actionscript with an object sound, this way:
Code:
_root.audio.attachSound("myWav");
_root.audio.start();
[code].....
View 2 Replies
Jan 7, 2011
I'm writing the flow for some navigation functions. There are a lot of tweens involved, so I'm grabbing the onComplete events from them. But I often find I'm referencing a tiny statement that I've had to wrap in a function, like this:
Code:
mc.addEventListener(SOMEEVENT, tinyfunction);
function tinyfunction(e:SOMEEVENT):void
{
mc.visible.false;
}
It seems messy to me. Is there some way to plug simple statements like that right into a listener (rather than a function call)?
View 1 Replies
Oct 26, 2004
PHP Code: azar pin:Number;pin=1234; enter_btn.onRelease = function(){if (pin=input_pin) {gotoAndPlay(3)}} It's a cash machine demo, if you were wondering about the "pin" variables. Basicaly there is an input textbox with the instance name "input1" and the "var" setting is "input_pin" the button has the instance name "enter_btn". If the pin number = pin number typed in, go to frame 3. But it dont work...
View 8 Replies
Oct 26, 2004
Here's the problem
PHP Code:
var pin:Number;pin=1234; enter_btn.onRelease = function(){if (pin=input_pin) {gotoAndPlay(3)}}
[code]....
View 8 Replies
Apr 5, 2010
I have borrowed the code from Tiago's web blog. [URL]. I have noticed a few odd things, and have tried to send off to Tiago himself but have not received any response. The first thing I noticed is the code seems to call for the .php file before it can load, so at times it will generate a "undefined" for both the quote and author. The second thing is, which may tie into the first, there seems to be the occasion where the code doesn't load the php file at all. The author and quote will be blank for a duration. And the third question I have is how do I get the text to fade out again after the fade in after an interval.
Code:
import caurina.transitions.Tweener;
var quote:Array = new Array();
var author:Array = new Array();
var totalQuotes:Number;
var rotateTimer:Timer = new Timer(10000, 100); //rotates the quote every 2 seconds for 100 times
[Code] .....
View 4 Replies