Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > flash actionscript > august 2004 >

flash actionscript : Almost there with movie code, please help


Flu Films
8/3/2004 10:44:19 PM
'Jack' very kindly gave me this code.

I'm sure its me being a dumbass but although there are no reported erros in
the coe it doesn't seem to actually do anything....

Questions: What should my symbol and/or frame be labelled?
When placing code in the 'Main Timeline' am I correct in creating a layer
called Actions and placing the code on the frist frame?
What is the point of 'hth' at the end of the code? - oh... does that mean
'hope that helps'? -...probably, sorry
Can anyone see aht might be missing? I'm trying to create a movie clip that
dupliactes itself, but then the duplicate looses the ability - to duplicate,
and just drags - and also the duplicate can be deleted when the DEL key is hit..

I'm on my last legs can anyone help me?
mandingo
8/4/2004 12:03:51 AM
Have a look at this... I am sure Jack.'s suggestion would have been the same...

inside the movieClip to be duplicated, put this code (in this example I have
called the movieClip - ' myClip ' )

this.onPress = function(){
if(this._name == "myClip"){
counter++;
this.duplicateMovieClip("myClip" + counter, counter);
}else{
this.startDrag();
}
}
this.onRelease = function(){
stopDrag();
}

What that will do is duplicate the original movieClip but all subsequent clips
can only be dragged about the stage, not duplicated...

hope that helps,
cheers
AddThis Social Bookmark Button