ActionScript 2.0 :: Looping MC Repeating Action
Jul 20, 2011
rotating and moving along y axis... its position in the stage is x = 120 and y = 20 base on its properties.. but when i test it, tracing(_y) shows dat d first value comes 42.85 and not 20(value from the properties).. i dont know how to get its exact value just like what is seen from the properties.. i've tried to have an if statement that if the value of _y = to the y coordinate the blade position will alter its movement(at first its _y -= 2; going down movement, id like it to alter its movement when _y turns = 90), it never turns like i want. here is my facebook email add(URL)
[Code]....
View 6 Replies
Similar Posts:
Nov 29, 2011
I have sound attached to the button, and it's played when the button is pressed. How to do that after pressing button, sound is played continuously? Without action script.
View 12 Replies
Mar 19, 2009
I'd like to create an endlessly looping movie that loads 3 images, then fades out each one using a tween to reveal the image just beneath it. As soon as the third image fades, I'd like for the animation to start over and just keep repeating. I'm trying to use a timer. I would imagine that a "for" loop would be used to repeat the animation but I can't determine how to make loop more than a select number of times. Below is the code I have.
View 11 Replies
Feb 13, 2012
I am attempting to loop a portion of an animation in Adobe Flash Professional using actionscript 3.0.
I have added 2 extra layers to my project, called "Labels" and "Actionscript".
I have named the Labels layer "loop" and and added a blank keyframe at the start frame of the sequence I want to loop. On the Actionscript layer, I have added a blank keyframe at the last frame of the project and added the following actionscript code:
[Code]...
View 1 Replies
Apr 10, 2009
I'm developing a game for my final year project at university that has a character who can move up and down on screen. The upper half of the screen is reflected in the lower half so that there are actually two characters on screen at once, each reacting exactly the same way to keyboard input.One of the mechanics involves the two avatars changing positions relative to their halves of the screen which requires a spacebar press to execute. The problem I'm having is that I don't want the characters to change positions once every frame if the spacebar is held down. I need to implement some sort of delay once the spacebar is pressed so that the characters won't swap positions for another second or so.
Code:
var plachaFlipPointY:Number = char.mc.y;
var shadowPlachaFlipPointY:Number = schar.mc.y;
[code]....
View 8 Replies
Feb 18, 2010
The script for my timer worked for one button but as soon as I set up the other 2 buttons to do the same, I started having a problem where the rollover action would go after the set amount of time was up but then would repeat itself once after the set amount of time was up again. just to clarify, if it needs it, the reason I don't have a rollout attached to these buttons is because I want the menu to stay out until you leave the menu area
so I have an invisible button called menuin_btn which sits to the right of the menu and covers the rest of the stage where the content will be, so you have to rollover that area for the menu to roll back in. The "rollin" in my code brings the movie clip to frame 16 (the end) where I have a gotoAndStop(1); command to get it back to frame 1 so the rollover can be used again. I've attached a zip with my current flash file and swf and here is what my current script looks like on the main scene:
[Code]...
View 3 Replies
Oct 2, 2006
Code:
_root.navigationMC.onPress = function() {
startPreload("blue.swf");
}
If I wanted to change an action from a button click to a frame-based action, what do I use instead of onPress? The hints from the AS editor are all click-based.
View 1 Replies
May 8, 2009
I have a slideshow that is looped ... it contains 5 slides.I am using a gotoandPlay action to control the slide show.
on (release) {
this._parent.gotoAndPlay("98");
}
There is a fade transition between slides.When a button is released ... I want to gotoandPlay (frame 98) ... and then have it stop 10 frames later on (frame 108). Frame 98 includes the transition ... if I just gotoandStop on frame 108 ... I loose the transition.Is there any way to incorporate a stop action, after a gotoandPlay action on my button ... without naming instances etc.I.E.
on (release) {
this._parent.gotoAndPlay("98");
STOP ON FRAME 108 INTEGRATED HERE
}
Everything I have attempted is not working.
View 1 Replies
May 23, 2009
I just want to make a simple button action using actionscript 2 but I can't get it to work! I'm sorry for even asking but I've been at this for too long now for it to not work I'm using Adobe Flash CS4 and I do the following --
File -> New Flash File (ActionScript 2.0)
Insert -> New Symbol
Name - test
Type - button
Export for ActionScript
Identifier - test
And then draw it in using the keyframes and add the code to 'Actions - Button' for my button
Code:
on(release) {
trace("trace");
}
I click on the button and it animates but no action event in the trace?
View 3 Replies
Nov 4, 2010
How can I get an action to follow another action when a button is clicked? When a button is clicked, I want the timeline to go to a certain frame and play and when it's done playing, to go to another frame and play. I basically want two actions in one function.
[Code]...
View 1 Replies
May 2, 2003
i want to do this:
on (release) {
_root.nextMovie = "externalmovie.swf";
_root.cover.gotoAndPlay("close");
[code].....
View 1 Replies
Jan 27, 2011
I am using code from a tutorial that I downloaded to get an Home.swf to preload in my "index" page.the problem is that a part of the code reads
movie1_btn.onPress=function(){
startPreload ("Home.swf");
}
which means that I have to create a button to get the .swf file to load, how do I edit this code so that the action begins on it's own at that frame?
View 5 Replies
Feb 2, 2010
The issue I am running across is this: I encoded and embedded a movie clip to act as the background. There are other animations that can and will loop, as the movie resets itself. But there are some elements that I only want to run once and not repeat once the embedded movie loops (link introductions, where objects fly in and transition into the button). How can I set the one time animations to fire just once, while keeping the embedded animation on a loop?
View 1 Replies
Feb 2, 2010
I am fairly new to Flash and I am constructing a website. The issue I am running across is this: I encoded and embedded a movie clip to act as the background. There are other animations that can and will loop, as the movie resets itself. But there are some elements that I only want to run once and not repeat once the embedded movie loops (link introductions, where objects fly in and transition into the button). How can I set the one time animations to fire just once, while keeping the embedded animation on a loop?
View 1 Replies
May 12, 2010
By the way I'm still really new to Flash and AS3.I'm writing this quiz that gets questions and answers from an xml file in the same directory and displays the question in a TextArea, the available answers in a list, and additional text in another text area.Most of it was working the way I wanted and I noticed the apostrophes weren't coming through the XML so I thought I'd try escaping it with a not thinking. I did a publish preview and saw that my list loop became infinite populating my answer list. I took the out and still had the same problem. I backed out as far as I could in the AS3 and couldn't find anything that would cause it to continually loop like that. I traced a statement at the beginning of the script and realized it was actually looping the whole app not just an event or function. I'll reply back with the code.
View 1 Replies
Jun 3, 2009
i made two buttons, first called buttonA and the second buttonB.each button will run a movieclip when it's clicked now, the first time when i try it it works wonderfull, then when i keep clicking it, the scrips repeats causing the moviclips to pause or run again, the more i click the more it repeats ,
View 2 Replies
Sep 14, 2010
Is something wrong in this syntax? I'm getting only the first record and it keeps on repeating. When the php file is being tested in the borwser, it shows its data correctly in this format. AA,,BB,,CC,,DD,,
senderLoad.sendAndLoad("http://www.web.com/bb.php",receiveLoad,"POST");
txt2.html=true;
receiveLoad.onData = function(src) {
[code].....
View 18 Replies
Sep 25, 2010
I have a website with a mc inside a mc. The nested clip keeps repeating , I want the nested clip to run 1 time. I have stop actions on each clip, it delays, but won't stop repeating.
View 6 Replies
Oct 20, 2003
if there is a piece of code that will count from 0 through 9 and then just keep repeating over and over?
if there is would there be a way of controlling the spped of the count - so it could go really fast or quite slow??
i tried
[AS]onClipEvent (load) {
myValue = 0;
}
[Code].....
View 5 Replies
Dec 3, 2009
I have a simple mp3 player, with PLAY PAUSE PREVIOUS and NEXT buttons. the problem i have is if you click the play button more than once, the mp3 clip will start to play itself as many times as you clicked. this sounds really bad..u could have the clip playing over itself 5 times.
Code:
if(play button is clicked ONCE){
(deactivate play button until next song);
}
in other words, only one PLAY-button-CLICK allowed per song...
View 7 Replies
Mar 10, 2010
I am dynamically playing a video.flv file on the stage when a button is clicked. It plays fine but continuously repeats itself. I want it to play once and the disappear.
View 2 Replies
Apr 25, 2009
So, I downloaded a simple sound loop from Flash Kit.
I am building a Flash webiste and want the sound to loop once the movie loads. I have added a stop and play button to the movie in case the viewer doesn't want the sound on. I understand sound can be annoying.
I add the following code to the FRAME 1 of the movie. Everything works fine but when the loop finishes, it just stops. How do I get it to continue looping? Also, as I navigate to other sections of the movie.. I want it to continue playing and not restart when I go back to say "Home". Home starts at frame 1 as well.[code]...
View 9 Replies
Jun 8, 2009
I'm just starting to learn to make my own functions and was trying to make a walk sequence. My original program used an elaborate series of counters and onEnterframe, but I want to take a different route (basically starting from scratch) because my walk sequences always turned the avatars into picasso paintings when two or more keys were pressed simultaneously. I'm more familiar now with set and clear timeout, but what do I do if I want a specific sequence to count up, then down, or rotate back and forth, like the pendulum of a clock? starting with a basic function like function walk(bodypart){bodypart._rotation += 45;}. if (keyUsed == 68){walk(square_mc);} what do I have to change so the square rotates back and forth +/- 45 degrees while depressed?
View 1 Replies
Jun 16, 2010
On the stage of a flash app I have several movieclips that keep repeating. Now I need a movieclip that doesn't repeat. It should play once, and then keep its last state on stage. I can't find out how to stop this movieclip from repeating.
View 3 Replies
Nov 9, 2010
In AS3 how do I stop a repeating key press?I just want to press a key once and something happen.My code you hold the key down and the action repeats.
private function getkeyDown(e:KeyboardEvent):void {delete dict[e.keyCode];} private function getkeyUp(e:KeyboardEvent):void {dict[e.keyCode]=true;} private function check_keys(){....if (dict[Keyboard.DOWN]==true) { myplayer.movedown(mybackList); ...
View 1 Replies
Sep 15, 2011
I built a Flash clock. The Clock working! Visible working! Sound working! BUT the sound seems to be plays EVERY frame instead of just the very first frame one time. Stops great but multiple songs seems to be playing. Is it my ENTER_FRAME code causing the problem? If so, what should that line read?[code]...
View 3 Replies
Mar 22, 2010
I have converted a short clip to an .swf file, i want to implement it on my website:
<object width="400" height="300">
<param name="movie" value="movie.swf">
<embed src="movie.swf" width="400" height="300">
</embed>
</object>
When i play it it autoplays (that's fine) but it also keeps repeating over and over, i'd like it to stop at the end and just display the end frame (as mentioned i converted a movie so i cant do it with actionscript in the .fla file).
View 1 Replies
Aug 5, 2009
I am using a code to load images into random movieclips and this works ok but I am getting a lot of repeated numbers
totalPlaces=6
for (i = 1; i < totalPlaces; i++) {
rannum=random(27)+1
[code].....
View 0 Replies
Aug 7, 2009
So I figured out how to play my video's and have button's pop up to select a next video. Here's a copy of my code:
ActionScript Code:
import fl.video.FLVPlayback;
import fl.video.VideoEvent;
[code]......
View 0 Replies
Nov 28, 2010
The problem I am having is that once I click back button on my scene to go back to home page, the animation of papervision3d kick-starts on top of already existing papervision3d animation. It doubles each time.
Is there a way to remove it? something like removeChild(); or it's nothing similar to that?
View 0 Replies