ActionScript 2.0 :: Stop After X Amount Of Loops/repeats Of The Movie Symbol?
Aug 27, 2008I have a movie symbol called "dot" of a pulsating dot, but no i would like it to stop after x amount of loops/repeats of the movie symbol.
View 2 RepliesI have a movie symbol called "dot" of a pulsating dot, but no i would like it to stop after x amount of loops/repeats of the movie symbol.
View 2 RepliesIm using flash cs4 pro, designing a website. I put a stop action in the last frame of scene 1 (main page) in the main time line, and that works fine. We have a button in scene 1 that brings you to scene 2 (sub-page), this scene also has a stop function in the last frame because we want it to stop, until the user hits a button to bring them to the desired scene. Now, the stop action in scene 2 seems to work, for about 6 seconds, then it goes right back to scene 1, and LOOPS! through scene 1 and 2 repeatedly, as if the stop function on scene 1 was never there.The button that brings you to scene 2 has the following action
Code:
on (release) {
gotoAndPlay("2","1");
}
the last frame of scene 2 has only a stop action, as does the last frame of scene 1. Why does it loop even with a stop action there?
I am preparing a presentation DVD... DVD will contain wmv video, user manual and another flash exe file... So DVD interface will contain three elements; user manual, a flash exe file and video.. Flash video window will be short-time video, playing like 5-10 seconds then repeats itself... My question is, how could I accomplish to put video window playing certain amount of time then repeats itself, in main window? I need as3 fla example, which could be so useful for me..
View 1 RepliesI am importing a movie clip as a symbol from a SWF using Embed to a AS3 program and, after attaching the movie clip to the stage, the movie clip keeps repeating. Before you ask I have indeed creating a script layer and put a "stop()" on the last frame. In fact the swf containing the symbol works perfectly fine when executed on its own or in Flashdevelop (my choosen IDE). Its only when imported does the clip keep repeating.Here is the code:
Code:
package {
import flash.display.*;
[code]......
I am working on an interactive map. When you roll over a dot on the map a slide moves into view. I've got this working great but when I add script for the roll out the whole movie just repeats over and over and the button doesn't work at all. I've pasted my code below.
View 3 RepliesI have a rich media banner, flv+timeline animation that I could make it to stop after 2 loops with the following code:
on 1st fr: var timer = 0
on 2nd fr: var timer = timer + 1
and last fr:
if(timer>1){
[Code]......
I am working on this animation where, after 3 loops of the movie, I need to stop it ?
View 5 Repliesis there a line of code to pause or stop the timeline for an amount of time?
View 4 Replies[url]...
Can anyone tell me how I would adjust this to play for a set amount of time then stop... or how I would set my timeline up for that to happen?
I animated eyes blinking inside of a movie clip symbol and placed the symbol on a face outside of the symbol.The eyes are stuck on the first frame. I am using CS5. What do I do?
View 5 RepliesI have a scrollout menu for my flash movie, but each of the buttons have to be movies symbols. I try to attach:
on (release) {
gotoand stop(4)
}
But I get the error that this script only works for buttons. Anyone able to lend some assist? I suck at actionscript.
I created a text field but the field stop scrolling after a certain amount of lines. How do i get it to scroll through my text field? here is the code on the up button:
[Code]...
I've been creating this banner: [url removed] which accesses an xml document, replaces some texts etc, but as soon as you open it up in a browser (like with the dropbox link I pasted) the banner only loops on the first movie clip. Put in another way: The banner you see is looping through only the first movie clip. But the swf file (and the html file) work fine from the local path of my computer.
View 1 RepliesI have been having a serious issue with custom video where flash is saying that the amount of the video so far played is MORE than the amount that it has downloaded, which is clearly impossible. This results in various problems, such as the playhead (scrubber) moving past the end of the loader bar. I posted a simple demo that displays the amount loaded and the amount played in text fields. You can see it at: [URL][Code]...
View 5 RepliesSo I have been having a serious issue with custom video where flash is saying that the amount of the video so far played is MORE than the amount that it has downloaded, which is clearly impossible. This results in various problems, such as the playhead (scrubber) moving past the end of the loader bar.I posted a simple demo that displays the amount loaded and the amount played in text fields. You can see it at: URL...[code]I encoded the video at a high rate so that it would download slowly. It may not playback smoothly, which I am not concerned about. What I am concerned about is the numbers below the video what are derived from ns.bytesLoaded and ns.time. If you watch it for a bit, the amount played should exceed the amount loaded.
I double checked the video duration and the bytestotal that flash is reporting and they are correct. I don't know of any way to check the accuracy of bytesloaded.If your internet connection is super fast, you may not see the issue - it only occurs when it is playing back faster than it is downloading - if this is the case, you may need to throttle your speed down, or start downloading a large file while you are watching this demo in order to see the issue.But this is a serious issue and means that building custom video interfaces with loadbars and playheads is impossible!
I put the "stop" action at the end of my movie on the last keyframe, but the movie doesn't stop!
View 14 RepliesI've created a symbol which is a loop of animated dotted line. I've applied blur along its path so it looks like motion blur.If I place this inside another symbol and rotate it, the blur rotates also so the blur is no longer along the axis of the dotted line.Anybody know a way of stopping blur rotating within a nested symbol?
View 2 RepliesSee, I have a Symbol- in's an animation of a "Cycler" (bicycle driver) seen from above and I want to use a function to duplicate it with actionscript as needed.
So far so good, has been done before.
But in this Symbol I have "sub-Symbols" on the timeline (within the Cycler's animation)... how would I do it to use a setRGB on one of them for each duplicated driver individually? The way I tried it now (see attached files) makes the animation stop for the sub-Symbols I use setRGB on (in my example the shirt of the left Cycler and the helmet of the right Cycler).
Why does the animation stop? I had a similar problem before and I solved it by coloring a fixed simple square on a layer and the animation for the motion was really a mask, ontop of it... but why doesn't it work like this?
Feel free to test is yourself- I am open to suggestions. The Cyclers are called "Biker_1" and "Biker_2" and the sub-Symbols are called "Helm", "Koerper" and "Rumpf", for the Helmet, the Body and the "Rump" of the Cycler.
if there is a way to use movie clip instances with FOR loops (yeh I'm not skilled with OOP so I premade mc's instead using loadMovie :for example I made manual SwapDepth function between movieclips, I have hero1_mc, hero2_mc,...,hero6_mc and enemy1_mc,..., enemy12_mc. The code looks something like this:
Code:
if (_root.hero1_mc._y > _root.hero2_mc._y) {
tempDepth1 = _root.hero1_mc.getDepth();
tempDepth2 = _root.hero2_mc.getDepth();[code].....
...and so on, code works fine but if I were to write all compares manually it will be thousand lines of code to check each movie clip with each other.So I was wondering is there any way to put those movie clip instances hero1_mc, hero2_mc... into FOR loop like (code doesn't work, if there could be a way to replace numbers with variables):
Code:
for (i=1; i<18; i++) {
for (j=1; j<18; j++) {
if ("_root.hero"+i+"_mc" > "_root.hero"+j+"_mc") {
.......
so I don't have to type all combinations D: so far I haven't found any way to do so, is there any way to make something similar with FOR loop and movie clips? I'm working on my project with AS2.
I'm making a map editor in flash. For the map area, a dynamic Movieclip will this and that in it will be loaded into a movieclip area, but I realised the problem of how a symbol resizes when a child is too big in the symbol.
Is there ANYWAY to stop it from it from doing this, as I want a specific window for this where you can drag the map around to see the other areas.
I have a movie clip loaded using action script 3 at the start of my animation, I want ito to end at the 120th frame. But I can't use the stop(); command because it will also stop the rest of my animations from the 121st frame onwards. how can I stop the movie clip without stopping the rest of my animations?
View 5 RepliesRight then I'm sure you guys can sort this out very simply. Basically I have this code that creates duplicate instances of a movie clip and puts them on stage with a few random settings where ever the mouse goes.This is cool but I want the duplicates to disappear after a certain amount of time (2-3 seconds or so) - or disappear when a certain amount of them have been placed on the stage.I have played around with the getTimer() function with no joy but I am not even sure if this is the right thing to use.
var num:Number = 0;
_root.onMouseMove=function() {
var temp = _root.attachMovie("flower","flower"+num++,_root.ge tNextHighestDepth());
[code].....
I have flash-10 , when i increase the amount of movie-clips on stage , it crashes
View 2 RepliesI downloaded a flash template and have modified it to suit our company but there is something that I can't do. When the file loads in the browser, music immediately plays and loops until you click a button to stop the music. On our video page, we have video
that we need to play that has sound in it. How do I get the background music to stop when my video plays without having to go up and stop the music manually. The videos are loaded via an external XML document and there are no buttons in the FLA file to link code to. the website is [URL]
I am making a flash movie, using text moving across the screen in semi transparency, sort of as a background. In the center is a white box, and content within that box. The semi transparent text scrolls back and forth throughout the movie. But when the movie loops back to the beginning , the white box and content within it vanish for a second...then reappear as the movie begins again. I don't want that microsecond vanish to happen but I don't know how to prevent it.
View 3 RepliesI'm using Flash CS3, Actionscrip 3.0. I created a movie clip which has a tween and is 10 frames long. I added an actionscript layer and added the code stop(); on the last frame. All layers are visible. I put 13 instances of this movieclip on my main timeline. They continue to loop (or possibly only play twice... hard to tell). I tried adding a mc.name.stop(); code on main timeline at the appropriate place (10 frames after the keyframe where the instances is introduced.) I also tried using the code mc.instancename.stop(); inside the movie clip.
View 0 RepliesI have a small tween animation, which i copied to AS3 code using the automatic feature in Flash CS3. the animation basically shifts a certain movie clip horizontally (only X axis) a few pixels. the line of cose which is responsible for this is: <Keyframe index="4" x="500"/> i wanted to make this animation slightly smarter. i want to have that code take the movie clip to a specific X coordinate no matter where it is on stage at the moment the animation is triggered.
for that i wrote the following code: var n:Number = work_btn.x - (-172.4); whereas work_btn is the instance name of the movie clip controlled by the code and -172.4 is the specific X coordinate i want the movie clip to go to when the animation is triggered. i figured that way, n stores the pixel distance between the current location of my movie clip and its final destination. now is there any way i can tell the code to move the movie clip by n amount of pixels?
[Code]....
I'm making a game where missiles are created using the duplicateMovieClip thing and I've used it a lot before, but i never noticed that there is a limit to the number of layers, around 256, I think. The problem is that i have a bunch of sprites in my games and each of them move(i.e. fire,smoke,shrapnel from rockets,etc) so is there a way to group a large amount of movie clips so that they're on one layer, without putting them into another movieclip? If u want look at a part of my game, well two parts.
View 3 RepliesI have several movie clips on the stage each of which are started by buttons. When started, each clip simply plays a sound every two, four or six frames depending on the clip. The regularity of the sound playback is important. The movies start on frame 2 to avoid sound being heard when the swf file is initialized. On the last frame of each clip I have gotoAndPlay(2); to create the loop.
Now what I'm noticing is that when the loops repeat there's a slight stutter and it sounds like the duration of the first frame is extended. I've tried inserting an additional keyframe at the end of the movie but it doesn't resolve the problem. The loops just aren't regular at the loop point.
I'm creating a simple game called shape wars. The game is shooting game where a blue cube(the player) fires blue shapes at the enemy(the red cube). The red cube also fires red shapes at the blue cube.Here is my code for duplicating the red shapes (this code is contained within the enemy)
onClipEvent (enterFrame) {
//attack
att = random(6);
if (att == 1 && dead == false) {
_root.redBullets++;
[code]....