DuplicateMovieClip Not Playing
Hi Guys,
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]; pMC.onLoad = function() { trace("loaded: "+this._name); this._x = _root.puma._x; this._y = _root.puma._y; this.gotoAndPlay(2); }; pMC.onEnterFrame = function() { trace(this._name+": "+this._currentframe); if (this._currentframe == this._totalframes) { this.unloadMovie(); trace("unloaded"); } }; pumaC++; }
Seriously, this is bugging me to bits, any help would be astronomical, as MX2005 seems to love doing this to me...
Cheers,
Lars
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 01-28-2006, 01:36 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Player Not Playing Not Playing Properly Low Bitrate Sound
Hi,
I have created a flash audio player which can play streaming audio (mp3) files and it takes data from external xml file. Everthing is working fine. But when i used a low bitrate mp3 file (size 600 kb, time 3min approx) , it plays the audio with max speed and get ended in 30 seconds. The same audio file is playing normally in windows media player, or winamp,etc.
Plese give me some idea what is happening ........
Thanks,
Gunjan
Check If Movie Clip Finish Playing Before Playing Next
I'm trying to figure out how to create a conditional variable script to check to see if one of the 4 movies are finished before starting the next selected one.
I have 4 menus with 4 movie clips that have an opening and closing animation in them.
When clicking the one of the buttons I would like it to check and see if any of the movie clips are in the open position. Then have the movie that is in the open position play it's closing animation. Then play the selected category movie that the person clicked on.
I know it's all done with variables but just cant figure out how to put it together.
here is what i have so far.
menuStatus = 0;
trace(menuStatus);
but1.onPress = function() {
if (menuStatus == 0) {
menuwork.gotoAndPlay("start");
menuStatus = 1;
} else if (menuStatus == 2) {
resetMenus();
}
};
but2.onRelease = function() {
if (menuStatus == 0) {
menuwhoweare.gotoAndPlay("start");
menuStatus = 2;
}else if (menuStatus == 1){
resetMenus();
}
};
function resetMenus() {
if (menuStatus == 1) {
menuwork.gotoAndPlay("close");
menuStatus = 0;
} else if (menuStatus == 2) {
menuwhoweare.gotoAndPlay("close");
menuStatus = 0;
}
}
thanks for any help in advance
How Do I Check To See If A Sound Is Already Playing Before Playing When Pressing Play
Okay, i really need some help on this. I have a play button where if clicked will play the sound over the top of it when its already playing, if that makes any sense. the sound is already called on the first frame. if the user clicks the play button again, it will play over it.
heres my play button code. i need to know what to add to add to make it check to see if the audio is already playing. My audio sound is named myMusc.
ActionScript Code:
on (press) {
if (playing != true) {
if (paused != true) {
playing = true;
paused = false;
stopped = false;
myMusic.start(0, 999);
}
if (paused == true) {
playing = true;
paused = false;
stopped = false;
myMusic.start(myMusicPosition, 0);
_root.myMusic.onSoundComplete = function() {
myMusic.start();
};
}
}
}
Thanks
Playing A Certain Frame, After A External Swf File Has Started Playing?
Hi,
This is my first post here.
I need to know how to have a certain frame in my movie start playing, after a external movie I have has started playing.
The problem is basically sync., and I want a certain frame to play only after the external movie begins to play.
I'm using...
loadMovie("http://www.alainshep.com/alain.swf", 66);
if (playing) {
gotoAndPlay("begin");
} else {
gotoAndPlay("start");
}
The external movie plays after it loads, but I just don't know how to set it up for the frame I want to play after it has started playing.
Please Please someone help me..
How To Know If My Sound Is Playing Or Finished Playing?
I`m loading and playing sound like below.
Code:
//SOUND LOAD
var snd:Sound = new Sound();
snd.load(new URLRequest("sound.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
snd.addEventListener(Event.COMPLETE, onSoundLoadComplete, false, 0, true);
function onIOError(evt:IOErrorEvent):void{
trace("sound loading error: ",evt.text);
}
function onSoundLoadComplete(evt:Event):void{
trace("sound loaded");
}
//SOUND PLAY
snd_btn1.addEventListener(MouseEvent.MOUSE_OVER,sndPlay);
function sndPlay(evt:Event):void{
var channel:SoundChannel
channel = snd.play();
}
i would like to have my sound to play only when it`s not already playing.
how can I achieve this?
thank you
How To Know If My Sound Is Playing Or Finished Playing?
I`m loading and playing sound like below.
Code:
//SOUND LOAD
var snd:Sound = new Sound();
snd.load(new URLRequest("sound.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
snd.addEventListener(Event.COMPLETE, onSoundLoadComplete, false, 0, true);
function onIOError(evt:IOErrorEvent):void{
trace("sound loading error: ",evt.text);
}
function onSoundLoadComplete(evt:Event):void{
trace("sound loaded");
}
//SOUND PLAY
snd_btn1.addEventListener(MouseEvent.MOUSE_OVER,sndPlay);
function sndPlay(evt:Event):void{
var channel:SoundChannel
channel = snd.play();
}
i would like to have my sound to play only when it`s not already playing.
how can I achieve this?
thank you
How To Know If My Sound Is Playing Or Finished Playing?
I`m loading and playing sound like below.
Code:
//SOUND LOAD
var snd:Sound = new Sound();
snd.load(new URLRequest("sound.mp3"));
snd.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
snd.addEventListener(Event.COMPLETE, onSoundLoadComplete, false, 0, true);
function onIOError(evt:IOErrorEvent):void{
trace("sound loading error: ",evt.text);
}
function onSoundLoadComplete(evt:Event):void{
trace("sound loaded");
}
//SOUND PLAY
snd_btn1.addEventListener(MouseEvent.MOUSE_OVER,sndPlay);
function sndPlay(evt:Event):void{
var channel:SoundChannel
channel = snd.play();
}
i would like to have my sound to play only when it`s not already playing.
how can I achieve this?
thank you
When A Sound Stops Playing So It Can Start Playing Another Sound :Monitoring Playback
I'm attempting to do a very simple thing and I'm very perplexed. My girlfriend is an opera singer and all I'm trying to do is advance the audio track when the song finishes playing to go to the next frame. On the surface it seems easy, however I can't seem to figure it out. Perhaps you can help?
Check out the movie here: http://www.earthgrid.com/earthgrid/valentina.html
Here's my code its on frame 2 in the movie
Code:
stopallsounds();
s2.close();
s3.close();
var s1:Sound = new Sound();
s1.loadSound("Agnus_Dei.mp3", true);
s1.start();
stop();
Explanation:: the flash movie has buttons that allow you to navigate between the 3 different music tracks.
when you click on a button, first I close the loading of the previous track, ie. s2 and s3, if they are still loading.
What I'd like to do is insert a command that advances to the next track (which happens to be on the following frame, 3) ONLY when the first audio track is finished PLAYING, not finished 'loading'
something like:
s.addEventListener(Event.SOUND_COMPLETE, gotoandplay (3);
);
so that when Agnus Dei finishes playing it goes to the next frame which starts the next track.
but that' doesn't seem to work.
I found this URL in Adobe's support site:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000283.ht ml
it says this:
Your application might want to know when a sound stops playing so it can start playing another sound, or clean up some resources used during the previous playback. The SoundChannel class dispatches an Event.SOUND_COMPLETE event when its sound finishes playing. Your application can listen for this event and take appropriate action, as shown below:
Code:
import flash.events.Event;
import flash.media.Sound;
import flash.net.URLRequest;
var snd:Sound = new Sound("smallSound.mp3");
var channel:SoundChannel = snd.play();
s.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
public function onPlaybackComplete(event:Event)
{
trace("The sound has finished playing.");
}
>> However, when I try to paste in this code into a frame in Flash CS3 it gives an error saying I have to put it in a 'package'
I tried that, putting this code into a file and saving it as a .as file
I really don't get how to do this Package thing in CS3, so I couldnt get the example to work.
If so please contact me Please help!
DuplicateMovieClip
Im duplicating a movieclip and the clips that are duplicated sit on top of my other layers in the movie... I want the duplicated movie clips to lay under my other layers..
Any suggestions?
I'll provide you with the FLA if you want : )
How To Do DuplicateMovieClip?
hi!
I've got a problem that I'm sure will be very easy for you guys to solve.
Here is the my object tree:
_level0.Box
_level0.Item
that means that at the beginning of the movie I have 2 objects on the scene: Box and Items. Both objects are in the root.
Here is the list of the objects after some action:
_level0.Box
_level0.Item
_level0.Box.Item2
You see that Iwant to duplicate Item to the Item2(Item2 should be within the Box).
What should I do? I read all that we have here at this forum, but not found anything for such a simple problem.
Please help me!!!
DuplicateMovieClip - Need Little Help
hi people! i got a small actionscript problem. i think i need the dublicatemovieclip (what a word! ) but i don't understand it:
duplicateMovieClip ("TARGET", "NEWNAME", DEPTH);
i think the target is the movie to dublicate, and the new name is...the name of the dublicatet movie , but what the hell is depth??
if i dublicated the mc can i set any properties too?
thx for answers
Duplicatemovieclip()
I am having a performance problem and I would like to know if the "duplicatemovieclip" call is doing it.
I am using duplicatemovieclip to create a menu of titles. Where each movie clip is hold 1 title. I use duplicatemovieclip to create the rest of the titles and rename each as I create it by duplication.
But this is causing the main flash movie (which holds this menu) to drag (really really drag!) at startup.
Does the duplicate movie clip really slow down the performance ? Also given my situation, do you think there is any other way to do it.
Shreeram
Help With DuplicateMovieClip ... Please
Can anybody help me!!! I have a movieclip duplicating (imatating snow fall) and it takes up alot of processor speed, which limits the amount of extra animation I can put into the movie. I've tried using unloadMovieClip but it does'nt work, what I would really like to do is slow down the snow until it stops completely ... can anybody help me ... please!!!
Ben.
Duplicatemovieclip
Hi,
I am using the below script, I dont particular understand it.....
But I know what I want it to do.
For some reason or another its not duplicate the name of the old instances to the new instances its creating.
Is there any way for it to copy the name of the instance it duplicates.
kv is the name of my movie clip which contains serveral other movie clips , which I need to keep the name of.
while (Number(n)<19) {
n = Number(n)+1;
bn = "kv" add n;
duplicateMovieClip ("kv", bn, n);
setProperty (bn, _x, Number(getProperty(bn, _x))+Number(n*getProperty(bn, _width)));
setProperty (bn add "/b", _x, getProperty (bn add "/b", _x) + (random (20)+1));
set (bn add ":n", n);
}
If any one can help it would be very appriacted.
Cheers
Kaan.
DuplicateMovieClip-- Please Help
In my game that i am making, the movie clip has the following code:
===================================
onClipEvent(load){
randomizer = 39
if (randomizer == 39){
duplicateMovieClip(_root.diamond, "diamond"+i, i)
setProperty("diamond"+i, _x, 100);
setProperty("diamond"+i, _y, 100);
i = i+1
trace("made it");
}
}
=====================================
It is on a LOAD event clip since i only want this action to happen once at the beginning. The first thing that happens is the variable "randomizer" gets a value (in the final version this will look more like "randomizer = random(50)" or somthing). Next it checks if randomizer equals 39 (wich of cource it does but later this WILL be random). Since it does equal 39, it then tries to duplicate the movie clip that is located on the mian timeline, named diamond. But it doesnt work...
This code DOES work if i put it in a button, and say (instead of onClipEvent(Load)) on(release){ then code, it DOES work when i click it... But if its in a movie clip, it wont... Any help? If you have any idea, i would realy appretiate help Thanks!!
Elyxia
DuplicateMovieClip
Hello there,
I have a MovieClip "dot2" inside another MC "dot1"
I would like to duplicate "dot2" at the root of the movie.
example:
duplicateMovieClip (_root.dot1.dot2, _root."dot2"+i, i);
But '_root."dot2"+i' dosen't work. Is there a way to put my duplicate movieClips at the root of the time line??
Thanx for any reply,
Francois.
DuplicateMovieClip
beginner's question:
I want to use the duplicateMovieClip command to help populate a simple menu list of dynamic text fields.
1. Will I need to create a movie to contain the dyn text fields? (I assume I cannot call duplicateMovieClip on text fields. Can you in Flash MX?)
2. How do I pass the vars i need into this movie clip? Such as the dyn text varname? I know I can name the new movie clip, but it doesn't seem obvious to me how to name the dyn text field. they need to have the name ["faqa" + variablename]
thanks!
DuplicateMovieClip Help
ok, final question then i can kiss this project goodbye (for a bit).
i have 3 dynamic text fields that i populate with data from an external xml file. these contain information about articles. col1 = date, col2 = author, col3 = title. simple enough. however, for the fourth column i want to have buttons that will load the article.xml into another textfield. i'm a bit muddled atm on how to set this up.
first question is how do i duplicate buttons? i guess i have to put it within a holder movieclip. but where do i put the loop to duplicate that clip? the loop i tried looked something like:
i = 0;
while(i<xml1.firstChild.attributes.articles) {
duplicateMovieClip(buttonholder, "buttonholder"+i, i);
setProperty("buttonholder"+i, _y, i*16);
i++;
}
but im not sure where to place it :| need to call it with onClipEvent(load) so within the button holder?
to compound the problem, i want the article listing to be scrollable, and the articles to be scrollable. so i have to put the duplicated movie clips in another holder which i can then scroll.
i think i'm tying myself in knots. probably making this harder then it actually is. all i want is an article listing, then to be able to pull the article.xml file's into the swf and display them in the same area once a user clicks it.
any help, links, suggestions (anything!) greatly appreciated.
DuplicateMovieclip
i have some code where I use attachMovie, and i want to change this to duplicateMovieclip. how do i do that??
for (i=0; i<antallBokstaver; i++) {
attachMovie("ordtilskjermMC", "ordtilskjermMC"+i, i);
eval("ordtilskjermMC"+i)._y = 25;
eval("ordtilskjermMC"+i)._x = eval("ordtilskjermMC"+(i-1))._x+eval("ordtilskjermMC"+i)._width;
// set display in each of the duplicated mc's to contain each letter of the chosen words
tnx!
How Do You DuplicateMovieClip?
say I have mcDot and I want 20 of them on stage, how do I duplicate it 20 times and have each instance have a random x and y position and rotation?
DuplicateMovieClip()
How do you place objects in front of duplicated movie clips? When I use duplicateMovieClip() all of the layers on the stage are placed behind the duplicated movie clips. Thanks.
DuplicateMovieClip
I've been playing around with this and all seems straightforward when it it's triggered by a button. The problem is I want to duplicate movies from within a MC with the command in the actions of frame 1 in that timeline.
When I do this Flash tells me I've got scripts that will take too long to process and I should stop them running.
Harrumph.
Ta.
DuplicateMovieClip ?
ok i'm back again....lol . What i've got so far is a button and a pic in a MC (instance MC) . When the mouse runs over the button the MC fades.....ect . What i need is on mouseover the MC needs to duplicate itself, but for some odd reason it dosen't work .
on the button i've got
Quote:
on (rollOver) {
_root.fadding_mc = true;
}
on (rollOut) {
_root.fadding_mc = false;
}
and on the MC i've got
Quote:
onClipEvent (enterFrame) {
if (_root.fadding_mc == true) {
duplicateMovieClip (MC, MC2, 1);
_root.MC2._x = 313;
_root.MC2._y = 75;
if (_root.MC._alpha>0) {
_root.MC._alpha = _root.MC._alpha-1;
}
} else {
_root.MC._alpha = _root.MC._alpha+1;
}
}
thanks in advance
DuplicateMovieClip
One of the most usefull techniques in Flash is duplicating movie clips. Its a little different in MX. Heres a simple script that will have you creating rows and columns in no time:
Code:
for (x=1; x<10; x++) {
newClip = "mc" + x;
mc.duplicateMovieClip(newClip,x);
this[newClip]._y = mc._y + (mc._height *x);
mc._visible = false;
}
Later, I'll post how to assign varibles from an array of data (external,internal) into each duplicated clip.
enjoy
tutash
DuplicateMovieClip
Which syntax should I use to duplicate a MC inside another MC?
I'm trying to duplicate the MC called "box" inside the MC called "square".
When I use This AS :
for (i=0; i <5; i++) {
duplicateMovieClip(_root.square["box"],_root.square["box"+i],i);
setProperty(_root.square["box"+i],_x,i*40);
}
It doesn't copy the MC "Box" 5 times inside the MC "square"!!
Obviously, there's something wrong with the parameters inside the duplicatemovieclip and setproperty, but can anybody tell me what's wrong??
DuplicateMovieClip
I'm using the following Action Script to duplicate a movie clip named star1 when I rollover a button.
on (rollOver) {
x=214;
amount = 9;
while (amount > 0) {
duplicateMovieClip (_root.star1, "mc" + i, i);
_root["mc" + i]. _x= x
i++;
x+=10;
amount--;
}
}
this all works fine, but what I need to know is how do I tell all my duplicated movie clips to play frame number 2 as at the moment they all stop on frame 1.
This is doing my head in
Cheers
Mark
DuplicateMovieClip
Q) I am doing a duplicateMovieClip. I have the following code (which works):
// MC instance name is 'selectButton'
copyCount++;
>> duplicateMovieClip (this.selectButton, "selectButton" + copyCount, copyCount);
setProperty (this.selectButton1, _x, barXPosition);
setProperty (this.selectButton1, _y, barYPosition);
this.selectButton1.mainButton = TITLEARRAY[titleCount];
Unfortunately it's hardcoded (selectButton1, selectButton2...). I'm trying to make this more generic (a variable) so I can put this logic in a FOR loop and do this logic one time versus N times.
copyCount++;
>> var newClip = "selectButton" + copyCount;
>> duplicateMovieClip (this.selectButton, newClip, copyCount);
setProperty (this.newClip, _x, barXPosition);
setProperty (this.newClip, _y, barYPosition);
this.newClip.mainButton = TITLEARRAY[titleCount];
This doesn't work. How can I accomplish this? Thank you in advance!
DuplicateMovieClip
I am trying to figure out how to use the duplicateMovieClip.
I am trying to have a MovieClip appear when you click a button, and every time you click that button again, another instance of that Movieclip will appear. Also, each one of the these clips is dragable. I got the dragable part down, I think, but I just cant get multiple copies of the MovieClip to load. Can anyone help me out.
DuplicateMovieClip Help
First of all, I need a good tutorial on the duplicateMovieClip that is comprehensive and easy to understand, second of all, does anyone know if you can make a duplicateMovieClip follow a motion guide?
Thanks in Advance
Jeff
DuplicateMovieClip();
Ok, I was going to put a small temporary hack to my main header flash file by making snowflakes fall. All the snowflakes and their descent is done within the movie clip and all I do is duplicate the movie clip with a random x coordinate and a y coordinate of 80. Here is the code I'm using:
setInterval(Snow, 500);
function Snow(){
SnowFlake.duplicateMovieClip("SnowFlakeM", 4);
SnowFlakeM._x = random(779);
SnowFlakeM._y = 80;
}
My problem is this, since that function is executed every .5 seconds, the last movieclip that it duplicated is removed from the canvas (while it was playing) and replaced with the new movie in the new spot. If looped fast enough, it looks like the screen is being shot with an automatic rifle. What can I do to make this snow fall?
DuplicateMovieClip
Is there something I need to know about using this command not on the root timeline, but in another MC in which I would like to duplicate other MCs?
I don't have my code here to post, but it's pretty similar to this:
http://www.macromedia.com/support/fl...movieclip.html
I have no problem getting this to work on the root timeline, but as soon as I embed this on a frame within another MC which I place on the main timeline, I never see the duplicated MCs.
Thanks for any help.
RH
DuplicateMovieClip Help
I need help creating 2 columns using DuplicateMovieClip
The number of clips will be a dynamic value but there will only be 2 columns. I don't know what I need to do to set the _y properly based of each clip. Here is what I started:
i = 1;
clipAmount = 21;
clipWidth = mc_temp._width+5;
clipHeight = mc_temp._height+10;
for (i = 1; i <= clipAmount; i++) {
duplicateMovieClip(mc_temp, "part" + i, i);
if (i==1) {
this["part" + i]._x = mc_guide._x;
} else {
this["part" + i]._x = mc_guide._x;
this["part" + i]._y = this["part" + (i-1)]._y+clipHeight;
}
}
I need the clips in the columns to start at "part1" so I can eference them later. Thats whay I created a "mc_temp" clip. I'm also attaching my fla.
Thanks guys
DuplicateMovieClip
I have created a movie clip that has buttons on it which need to refer to the main timeline. The clip is duplicated using the duplciateMovieClip function, but now the buttons don't work. Anyone know what is going on here?
Help W/ DuplicateMovieClip
hi everyone;
i am creating a mouse follow, and i am trying to duplicate the movie that follows many times (i did), but i want to decrease the speed of each dulplicate, but i cant access the "var speed" (which i declared inside the follower movie) using the following
space=10;
for(i;i<8;i++){
duplicateMovieClip(folo,"r"+i,i-1);
setProperty("r"+i,_x,folo._x-space);
setProperty("r"+i,_y,folo._y-space);
"r"+i.speed -=1;
space+=5;
}
"r"+i.speed -=1;
should not each duplicate inherit all vars in the parent movie!!!!!!!
please help
DuplicateMovieClip
I've dragged an instance of two movie clips to the stage and I want one to serve as a mask and the other to serve as the masked image. I'd like to duplicate the movie clip, which serves as the Mask, over and over until the masked image is revealed, but I can't seem to figure out the correct ActionScript code. Can anyone out there help? I think I probably need to create a function and then simply call that function, but I'm not sure and frankly even if that's what I should do, I'm not quite sure how I'd go about it. Thanks.
DuplicateMovieClip
hello
I know how to use the duplicateMovieClip command to create a new MC, but does anyone know the syntax I would need to create a new MC and place it inside an existing MC on the stage?
cheers!
Duplicatemovieclip Help
I want the user to specify a number, and then display that many copies of a movie clip.
i can make duplicatemovieclip produce the extra mc's needed, but how do i refer to each one? there could theoretically be an infinate number, and i need to run a loop and perform actions on each mc.
how do i refer to each mc, is it possible to index them, e.g myMC(1).blah..? and therefore use a for-i loop and do myMC(i).blah..?
thanks ,
Andrew
DuplicateMovieClip (f5)
Is it possible at all to give the duplicateMovieClip a target MC in which it has to put the duplicates???
i know you can give it a depth, but I want the duplicates to be put into another MC.
thanks!
DuplicateMovieClip()
Hi,
When I duplicate a movie clip, it always seems to appear *on top* of any layers it should be under. eg. duplicating movieclipA on layer 1 puts the duplicate above anything on layer 2. this means its not possible to have duplicated movie clips affected by masks etc... Is this right? Or am i being really really dumb. hope someone can help....
thanks,
Tim.
DuplicateMovieClip
when using the duplicateMovieClip command inside a movieclip, can I only duplicate clips inside this clip?
Or can I use complete paths to duplicate other clips on the main timeline?
_Is that clear???
Hmmmmm I'm not sure I've worded that the best, hopefuly someone will get me.
Intravenus.
DuplicateMovieClip
please help to fined out the difference between these---
duplicateMovieClip(nine_mc, "nine"+k+"_mc", k);
duplicateMovieClip("nine_mc", "nine"+k+"_mc", k);
What i am finding is- movie clips are not duplicated with the second line of code.
DuplicateMovieClip
Thanks nunomira.
again i am stuck at this point
This code i've written on a movie clip-----
onClipEvent (mouseMove) {
if (hitTest(_root._xmouse, _root._ymouse, false)) {p=_root.r; //r is number obtainer at runtime
// ab is the movie clip depending on the value of r
ab=eval("_root.nine"+p+"_mc");
trace(ab._x); // working fine
// ab movieclip to be duplicated
ab.duplicateMovieClip("_root.ninex_mc",200);
trace(eval(_root.ninex_mc)); // undefined
}
}
at the last line it is not working, can anyone fine the mistake in duplicating movie clip?
DuplicateMovieClip
According to the Actionscript Dictionary, I should use the following code for duplicating movieclips:
(action assigned to a button)
on (release) {
amount = 10;
while (amount>0) {
duplicateMovieClip (_root.flower, "mc"+i, i);
setProperty ("mc"+i, _x, random(275));
setProperty ("mc"+i, _y, random(275));
setProperty ("mc"+i, _alpha, random(275));
setProperty ("mc"+i, _xscale, random(50));
setProperty ("mc"+i, _yscale, random(50));
i++;
amount--;
}
}
However... this doesn't work.
Now if I change the target in the setProperty lines from "mc"+i to "_root.flower", then it does work.
Would make more sense if the setProperty functions were called before duplicating the movie.
Explanations are most welcome.
DuplicateMovieClip
I'm trying to duplicate a Movie Clip when a movie is clicked on a screen.
so i'm also trying to combine 2 events , the following the mouse/cursor and duplicate when the mouse is clicked
This is what i havew so far-
onClipEvent (load) {
Mouse.hide();
startDrag(this, true);
}
on (release) {
amount = 1;
while (amount>0) {
duplicateMovieClip (_root.mark, "mc"+i, i);
setProperty ("mc"+i, _xscale, random(250));
i++;
amount--;
}
}
Its not right, what I'm trying to do is duplicate an movie where the mouxe is clicked.
DuplicateMovieClip {help Please}
hello all,
here is what i am tring to do. i want take the value of an array(value1) and apply that value to a movieClip(square) then duplicate the mc that many times going up on the y axis, like a graph. i can do this but it looks staic,
i was wondering if someone can help with the code to animate the movieclip(square), based on the array value.
thanks, so much,
chuck
DuplicateMovieClip... How?
I'm trying to make a game in Flash MX 2004 Professional, and I need to use 'duplicateMovieClip'. But... how do I use it?
DuplicateMovieClip();
Can someone paste a script that duplicates a movie clip whn the movie loads???
onClipEvent(load) {
this.duplicateMovieClip(box2, 10);
box2._x=10;
box2._y=10;
}
WHats wrong with this one??
Never works! Aaargh!
DuplicateMovieClip
I'm trying to duplicate a MC and have it placed 40 px under the first one. I put this code on the MC i want duplicated but nothing happens. Whats wrong with it?
onClipEvent (load) {
if (this._name == "textbox" && _root.button.count >= _root.button.i){
duplicateMovieClip(this, "textbox" + _root.button.i, _root.button.i);
setProperty("textbox"+ _root.button.i, _y, 40);
_root.button.i++;
}
}
DuplicateMovieClip
Hi, I'm trying to duplicate a movie clip as soon as the timeline starts playing. I have this script so far but its not working:
onClipEvent(enterFrame) {
count=3;
i=1;
while (count<3) {
duplicateMovieClip(_root.ball, "ball"+i,i);
setProperty("ball"+i,_y,25);
}
i++;
count--;
}
Can someone help me?
-G
|