k, i got a hitTest & duplicateMovieClip combined question. got this object that i want to noticed hitTest with this MC called daligObjekt. My problem is that daligObjekt is duplicated very often and it gets a +k in its new instance name, so when i do the hitTest it obviously doesnt rcognize it. I do know u can write +k in the hitTest line aswell but as k number raises faster then the hitTest is done it tion. I know that u can "lure" the system by puting an invisible MC that will always attach to the new duplicated movies but i belive there should be an easier answer.which i bet many do, pls dont hesitate to post itPS. below some AS code if u didnt understand the problem, u might get a hint with the code...!
i just would like to know how to create an "hitTest" script inside a movieclip that is actually part of that hitTest code?I mean... I have mc A, and mc B. and the current hitTest code im using (that is on the timeline) makes mc A, destroy mc B when collide with it... but there are many mc B on the stage (with the same instance name) so, when mc A collide with one mc B, it destroys ALL mc's B... but i want it to destroy only the mc B that he collides, not all the others... maybe an hitTest script inside a movieclip B would work (somethig like "if MC A hitTest ME = i die" (not all the others)).
i am controlling a tractor mc with right and left keyboard keys and let the user move the tractor till it reach a certain point where it touch a mc i want to go to a certain frame and stop the keyboard event listener and also the hit test listenerso finally the tractor is moved by user till it touches the mc then we will jump to a certain framethis certain frame will not have both of the tractor and the mcPHP Code:
This code just generates a new ham_mc where the user releases the original (drag and drop). The original returns to its starting point. I have the same code for a movieclip called cheese_mc, the user can drag and drop cheese too.
So, if more than one of these ham_mc's and cheese_mc's are created, what is the best way to delete the last one created?
I'm sort of stumped why duplicatemovieclip won't work. Or maybe it is just not working the way I'd expect. I have a group of movie clips in a container called blockGroup. Those get positioned on the stage randomly just fine. In addition, I want to duplicate that container and position it 10 pixels greater to the right. That's not working.
I was wondering about the performance of duplicateMovieClip. If for example Ive made a small square using the rectangle tool, made it into a movie clip, and then duplicate it like 100 times, placing them different places on the scene.
How much will this affect the performance? Is there a better way to do it? (how?)
I have a movie clip that contains many many dynamically generated mc's that have also some dynamically generated mc's in them Now i wanna duplicate that large MC .... and of course that does not work cause it will not copy all those small MC's that are contained. If I duplicate all the MC's contained this also will not work. cause they contain generated MC's and so on Okay enough blabla: Is there a possibility to duplicate the big MC containing all the small MC's ???I know Flash can't do it but is there a way around it?I had one idea of keeping an array of all the generated mc's in my MC class. This works fine but when i duplicate one contained MC i wont get it into the duplication target, it will always be inside his _parent movieclip
I've been working with flash for a few years now, and have a few major projects under my belt, but this is an issue that randomly crops up every now and then: duplicateMovieClip simply not playing.Check out the code and see if you can determine the bug:
on (rollOver) { duplicateMovieClip(_root.puma, "puma"+pumaC, _root.getNextHighestDepth()); pMC = _root["puma"+pumaC];
i've got a script of a newspage with php and mySQL (within flash ofcourse).This script got 1 dynamic text field.Now i like to create it different. Every title and body message must be together in 1 MC.So i think the best is to use the duplicateMovieClip statement.I found this code in a book of mine and changed it a bit for where i know. But I still have two problems.
FIrst of all:
All the movieclips will be placed at _x. 0 and _y. 0. And for every record (ID) i need to automaticly create a new MC.I got this code for static adding Mc's but it must be dynamicly loaded and the second mc must come after the first one.i got this actionscript so far:
this code ofcourse creates 10 Movieclips with the instancename "nieuws0" to "nieuws9".do i need to place it in an onClipEvent() ? for now i placed it in the first frame.The original code i found got a random placement. and ofcourse i changed that.
I have a 'start page' on frame one and the main code on frame 2 incl. a button to return to Frame 1 and this is the problem as when the timeline moves to Frame 1, the duplicated MCs (ie pronounClip + promptClip) are still there.I have tried to unload the clips :
Code: this.promptClip.removeMovieClip(); but that doesn't work either...
I'm trying something that should be fairly simple. I want to:- load a jpg into a container clip- when that image is loaded, then duplicate it and move it to a different position- then do a whole bunch of other stuffI'm doing all that using MovieClipLoader.onLoadInit(), and when tracing the duplicated movieClip, without fail, it returns undefined.
Code: var detailImg:MovieClip; // create a loader to handle loading the full image
Why is this not populationg the fiedls with images? The XML is well formatted (I tested)myThumb has a Loader called myPicMC, where the pics are supposed to load. I supposed the proble is with the code in bold blue. [code]
I am making a flash website with a page that is a "newsreader" style, for posting articles. The article info is loaded dynamically from an XML document.
I made a page like this before using AS2, and used the duplicateMovieClip method in a for-each loop to list each news article. I am using AS3 in my new flash document, but am finding that there is no longer the duplicateMovieClip method.
replace the duplicateMoveClip, or another way to accomplish what I am trying to do.
I am trying to duplicate a movieclip unlimited times. Right now it will play when it is rolled over one time and then it will duplicate for the second rollover, but that is it. I need it to keep duplicating every time it is rolled over.
I have an SWF that works fine standalone. However, when I load it into the main movie, it appears that my duplicateMovieClip within the loaded SWF isn't functioning because I only see the first movieclip and not the duplicates. Am I being specific enough?
If you have a movie clip and assign to it via the onClipEvent (Load) OR simply the movieclip.onLoad a whole bunch of data (properties of that movieclip):
When you duplicate that movieclip, does it duplicate all the actionscript contained within?
I was wondering about the performance of duplicateMovieClip. If for example I�ve made a small square using the rectangle tool, made it into a movie clip, and then duplicate it like 100 times, placing them different places on the scene.How much will this affect the performance?
Is there a way to duplicate a movie clip into another movie clip?So far I have only been able to get the movie clip to duplicate itself within the movie clip it is already in though I am calling the duplication from another movie clip (which is where I want it duplicated into).Basically I have pictures (as movie clips) in a scroller. When you click on a picture I want it to duplicate that picture into another Movie Clip outside of scroller on the _root level. This outside movie clip is actually calling the duplication using onClipEvent(enterFrame). So far, though, it only duplicates itself into the same movie clip and so this duplicated picture also scrolls with the scroller (which isn't what I'm wanting).Here is the outside movie clip's actionscript:
Code: onClipEvent (enterFrame) { //tried the below line as well:
I have balls (...sounded pervert) that are created by duplicateMovieClip, yes, they spawn, but right on top of each other, and I don't seem to be able to do anything to them, I tried ball+i.onEnterFrame = function(){} typed in several different ways ("ball"+i, ["ball"+i] etcetc...) And I just couldn't find How to refer to them. i'm trying to spawn them to random positions and make them move in random directions (got the moving part already coded but like I said I can't name them -> can't use it atm.)
Short version: How to refer to balls that are created by duplicateMovieClip?
this is what i have on the maintimeline:[code]I have 4 moveiclips called: redhex, bluehex, greenhex, and yellowhex.what the above code should do is make a 15x15 grid of hexes (yes i wanted all 4 hex mc's overlapping each other at each space on the grid.).Before i added the lines to dupllicate the blue, green, and yellow hexes also... the redhex movieclip duplicated exactly as it should.But after adding the lines to duplicate the blue, green, and yellow hexes also, in the same locations... Nothing at all showed up when i tested the movie (not even the redhex's)
initialize(); function initialize() { for (i=1, r=0; r<15; r++, i++) { for (c=0; c<8; c++) {
[code]...
I have 4 moveiclips called: redhex, bluehex, greenhex, and yellowhex.what the above code should do is make a 15x15 grid of hexes (yes i wanted all 4 hex mc's overlapping each other at each space on the grid.).Before i added the lines to dupllicate the blue, green, and yellow hexes also... the redhex movieclip duplicated exactly as it should.But after adding the lines to duplicate the blue, green, and yellow hexes also, in the same locations... Nothing at all showed up when i tested the movie (not even the redhex's)
I have the movie clip "movie" in my library and the button "btn" on the stage.Now everytime I release "btn", I want to add "movie" to the stage and have it play from predetermined coordinates (let's say _x = 20, _y = 20)...So far, I've tried
Actionscript Code: on (release) {duplicateMovieClip("movie", "movie2", 1);}
but that doesn't do the trick because it doesn't multiply the displayed movies.Everytime you release "btn", "movie" breaks off and restarts,I want it to finish its animation and have ANOTHER one spawn at the origin...
It does dupllicat the Movie Clip but I can't drag the duplicate.I learned this from a very old Flash lesson. I wonder there is a new way to write it now.