ActionScript 2.0 :: DuplicateMovieClip - What Is Target / Newname And Depth
Feb 6, 2009
duplicateMovieClip(target,newname="",depth);
Need explanation about duplicating a move clip? What is target? Newname? and depth? How would you make a movie clip that would be duplicated on the press of a button?
View 5 Replies
Similar Posts:
Apr 8, 2011
I can't figure out how to get the depth of event target Object...
My code looks like this:
Code:
private function createFooterItem(footerItem:XML):void {
var button:Sprite = new Sprite();
button.graphics.beginFill(0xFF0000, 0);
[Code]....
View 3 Replies
May 11, 2004
putting a movieclip into highest depth without knowing which clip is in the highest depth
View 2 Replies
Sep 29, 2003
On the attached exercise, is it possible to stop further items being dragged onto a target when the target box is full?
View 1 Replies
Nov 28, 2011
What is the difference between target and currenttarget in flex?What is the difference between Target and Current Target in Flex especially in mouse events.
View 2 Replies
Feb 11, 2008
I have created a emptymovieclip which contains 1 shape and then i have a uplicateMoviclip, and it posistion with {_x:Number,_y:Number}my code:
Code:
this.createEmptyMovieClip("shape", this.getNextHighestDepth());
shape.beginFill(0xFF0000);
[code].....
View 2 Replies
Apr 15, 2010
CS3 rotate and duplicateMovieClip?
View 2 Replies
Jun 29, 2010
I'm creating a flash menu and I have this AS code on the first frame:
[code]...
My problem is, that when these MC's duplicates, there is only one (last) which is working.
View 3 Replies
Jan 14, 2011
[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?
View 1 Replies
Jun 20, 2011
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.
This is what I have:
Code:
maxBlocks=20;
createEmptyMovieClip("blockGroup",-1);
for(i=0; i<maxBlocks; ++i){
[Code].....
View 2 Replies
Feb 29, 2012
This is not working, dont know what's going on as I've been about 4 hours on the web searching for a solution...
[Code]...
View 9 Replies
Feb 13, 2004
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?)
View 1 Replies
Mar 26, 2004
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...!
[AS]
onClipEvent(enterFrame){
_root.dalig = _root.kroko.krokoHuvud.hitTest(_root.daligObjekt);
[code].....
View 4 Replies
May 15, 2005
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
View 6 Replies
Jan 28, 2006
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];
[code].....
View 6 Replies
Mar 17, 2006
I need to have an mc duplicate itself under its own onClipEvent(load) handler. To put it perhaps more clear, something like:
onClipEvent(load) {
//clips duplicate itself
}
I have tried all sorts of combinations of _root.clip.dMC, this.dMC,
View 4 Replies
Mar 27, 2006
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:
[AS]
depth = 0;
for (copy = 0; copy < 10; copy++)[code]....
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.
View 4 Replies
Dec 7, 2006
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...
[code].....
View 2 Replies
Jan 23, 2007
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
[code].....
View 2 Replies
Feb 6, 2007
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]
View 2 Replies
May 17, 2007
I found this tutorial but for some reasion I am unable to delete the duplicated movie clips created would anyone know how?
View 3 Replies
May 5, 2008
Code:
myListener.onLoadInit = function(target_mc:MovieClip) {
var ref:MovieClip = target_mc.duplicateMovieClip("ref", target_mc.getNextHighestDepth());
[code].....
View 3 Replies
Mar 10, 2009
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.
View 3 Replies
Jun 23, 2009
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.
The code:
[code]...
View 2 Replies
Sep 15, 2003
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?
View 4 Replies
Jan 18, 2004
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?
View 1 Replies
Feb 13, 2004
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?
View 1 Replies
Feb 24, 2005
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:
[code].....
View 6 Replies
Aug 30, 2010
qi have a movieclip which is added to the stage:
var profileholder:profileHolder=new profileHolder ;
inside of profileholder is another movieclip(infoBtn) that acts as a button.when the mouse is over profileholder i want to do something with infoBtn like:
//profOver is the over state of profileholder
function profOver(e:Event) {
e.target.infoBtn.alpha=1;
}
this doesn't work and brings up this error:ReferenceError: Error #1069: Property infoBtn not found on flash.display.Loader and there is no default value.
at main_fla::MainTimeline/profOver()
i also tried:
function profOver(e:Event) {
var item:profileHolder=e.target as profileHolder;
item.infoBtn.alpha=1;
}
and get this error:TypeError: Error #1009: Cannot access a property or method of a null object reference.
View 1 Replies
Dec 12, 2008
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?
View 2 Replies