ActionScript 2.0 :: Duplicate Clip Makes Comp Crash
Jun 12, 2004Whenever i try to do a duplicateMovieClip command on flash, my comp always crashes when i try to test. I have flash MX, and a good computer.
View 7 RepliesWhenever i try to do a duplicateMovieClip command on flash, my comp always crashes when i try to test. I have flash MX, and a good computer.
View 7 RepliesOk. Whenever i try to do a duplicateMovieClip command on flash, my comp always crashes when i try to test. I have flash MX, and a good computer
View 7 RepliesI'm no expert in actionscript and certainly not in AS3 but I managed to create (witfrom this:a eleastic string effect from a point to a draggable movieclip.Problem is the script seems to crash flash or the browser when I test it. (Not right away just when I'm playing around with the movieclip)Sinse I'm in over my head in the script I compiled I'm not exactly sure whats wrong.bit of google research hinted that it might have something to do with removeChildAt() wich I changed from removeChildAt(0) to removeChildAt(1) to prevent it from removing my movieclip.Hope somebody has the patience to read through my script to see what I did wrong.
Object(this).leaf_mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
var origX:int = Object(this).leaf_mc.x + 1;
[code]........
I have a web application that converts SVG files into swf ones. In order to do so, there are 3 steps:
1 - Running through SVG Files in a folder
[Code]...
Code:
function showBigScreen()
{
[code].....
I'm using a loop to duplicate a MC named MCbutton, which is all good.
[Code]....
When we want to know if a MovieClip animation has ended, we use to listen the enter frame event and check if current frame is the final one (where the movieclip frame has a stop).
But we've thought on a new idea: to extend MovieClip and override stop method. In the override we dispatch an event indicating the animation is ended. So, we hope the clip to find a stop in a frame, call the overriden method and execute both, the super.stop() and the event dispatch.
I have several movie clips on the stage. They are draggable. I want to be able to drag the movie clip, then when it is dropped, a copy of that movie clip will appear where the first one had been, and the first one will just stay where it is on the screen.
However, I'm running into problems with the syntax.
Here is my current code:
[Code].....
I posted last month about how to duplicate a movie with a mc in the library in the timeline. [URL] except now my code strategy has changed since and now I need to duplicate mc casted from objects loaded from an XML file, and I create a class file for easier xml management. My goal is to make a wrap around effects for animated menu icons that use separate swf files. this is the function I try to create, but my concern is in the else statement:
[Code]...
how can i duplicate a movie clip and then place it on a certain place on the stage
View 5 RepliesWhy this code is not working. Here I have a movie clip named 'mainmovie' in the scene. And inside that movie I have a text box named 'textBox' Look at this code the movie is duplicating in my code but the value is not coming inside the text box...
[Code]...
Whats the best way to customize UI components (all the cool sites have custom scroll boxes, text boxes, scroll easing etc.) in mx 2004? can any point me to any solid tutorials? or books? eg:[URL]
View 1 RepliesI have found a little FLA which demonstrates how the duplicate movie clip can be used.I tried to simplify and adjust the AS according to my needs. With some part i was successful but with some i wasn't.
i want to be able to set the beginning X position of the clips as "0" in X values. but when i assign "0" to the this._x , it naturally generates/duplicates all the clips at the same point. What I'm trying to achieve by doing this is, when the stage is scaled in means of width my clips should start to originate from the very left of the stage whatever the stage's width is.
my second question is how can i adjust the speed?When I stretch the stage width they(duplicated clips) all speed up in order to travel the whole stage in the same amount of time as they do with the initial/beginning stage width. I want the speed to stay constant whatever the distance is.
I have a series of movie clips that are dynamic text fields created with the createTextField call. The text field is dragged and dropped onto a box. At that point I want to create a duplicate of that text field and to then position it on top of the box. The code appears to be creating a duplicate of the original clip and the traces are all successful, however, the actual movie clip is not displayed anywhere on screen.
I feel that it has something to do with the depth. Originally, I was passing this.getNewHighestDepth to duplicateMovieClip but that seemed to result in my existing text fields disappearing instead!
[Code]....
Ok, I have a simple duplicate movie clip for loop, but I want the duplication of the movie clip to be delayed by a setInterval. This is what I have so far:
[AS]myNumber = 10;
for (count=0; count<myNumber; count++) {
myClip.duplicateMovieClip("myClip"+count, count);
this["myClip"+count].clipText.text = count;
this["myClip"+count]._x = (this["myClip"+count]._width+2)*count;
}[/AS]
works fine. How could I add a setInterval to delay that script?
I'm creating a drag and drop movieclip to colour a different movieclip. I need to duplicate the first instance so as the original stays in the same place (on the pallette), and then the dragged one can be removed after it has been dropped into the area. This is the script for the dragging and dropping of the original instance, but I can't figure out the duplication/removal part:
on (press) {
startDrag("_root.pallette1");
this._alpha = 70;
[Code]....
in the first duplicate move clip I'm loading an array. I want to duplicate the movie "slide" again. so i get the same movie with the array and an other name on the right of the original movie.at this moment It only loads one slice from the array and I need all//mMaskedSLice//array with the gotoandstop
View 2 RepliesWhen i Release a button/movie clip i want to play other movie clip and i want to duplicate this movie clip. For exemple i have a castel and when i press it i want a soldier go to a position on the "map" . If you have an ideea (and you have) please tell me how to solve this problem. Look at this example : [url] when i use a key a duplicate mc (a soldier) go up on the castel .
View 6 RepliesWhen using 'duplicateMovieClip()' is it possible to specify a path and x and y values on which the clip to be duplicated ? I have searched for the duplicateMovieClip syntax and this is what I found: duplicateMovieClip (target, new name, depth).
View 5 RepliesI am "trying" to experiment on have one movie clip load an external image and then telling it duplicate the movie clip with the loaded contents... is this possible? Here is what I have on the "loader" movie clip:
[Code]...
But this doesn't seem to be working as planned.
i am trying to add a duplicate movie clip, for my MMOG, when another player enters the room. I am using this code:
[Code]...
Ok, I have a simple duplicate movie clip for loop, but I want the duplication of the movie clip to be delayed by a setInterval. This is what I have so far:[AS]myNumber = 10;
for (count=0; count<myNumber; count++) {
myClip.duplicateMovieClip("myClip"+count, count);
this["myClip"+count].clipText.text = count;
[code].....
look at this thread [URL] now the movie works which is great but i want to have a lot more balls. i could create 150 of them and give each an instance name but that would take forever. is there a way to do this with actionscript. i know i can duplicate a movie clip although i don't know how to put them in that box formation like i have them in this movie but can i duplicate them into that formation and assign each an instance name that consists of a number so that when [i] is equal to their instance name the clip will play.
View 4 RepliesI�d be grateful if anyone can answer what should be a simple problem. I�m building a Flash program that has many movie clips (like they all do). At one stage I need to duplicate a specific movie clip and make it appear in another movie clip.
PS: The movie clip needs to be added by actionscript as it is made on the fly in the program, hence it cant be in the original .fla file � if that makes sense.
I have a problem in dispatching a customEvent. I already managed to dispatch custom events in other projects and all worked well so i can't understand what's different now. I have a WSConnectorEvent that extends Event
[Code]...
I would like users to be able to:
- add input textbox components on click
- limit the number of times they can do this
- limit the chars to x number
url...can anyone see the works? or can't get past the initialising stage? i test on both my mac and pc and it's working, i ask some of my friends to test also... some can view, a few others cannot get pass the initializing stage somehow, it just seems that after the init() and getService it doesn't return the results for those comps which can't get pass the initialising stage.
View 2 RepliesI just read a thread on how to duplicate a movie clip and drag and drop it with AS2. However, I keep getting a syntax error on line 3. Attached is the file.
View 1 RepliesI'm using AS3 in timeline. I'm trying to duplicate a movie clip that exists on stage. I'm unsuccessfully using the following code:name of movie clip on stage = ball_mc.[code]how to duplicate a movie clip not using its class name.
View 2 RepliesDuplicate a movie clip with the click of a mouse?
For example if you had a shooting thing and you had to launch an object called "pro" (instance name)
how would you duplicate "pro" to get it so that a repeated hit of the right arrow button would launch multiple "pro(s)"?