Hi all,

I'm trying to duplicate a clip and I'm getting a type mismatch error. Undoubtedly it's something silly but I'm not getting anywhere fast.

I have a flash movie with a .as file attached. In the .as file, I want to copy a movie clip.
Inside the _customerArt array are two MovieClips

This is the code here:

   *    _currentCustomer = _customerArt[customerType];
       createEmptyMovieClip("_newCustomer", getNextHighestDepth());
//duplicateMovieClip("_currentCustomer", "_newCustomer", this.getNextHighestDepth()); trace("_currentCustomer = ["+_currentCustomer+"] and _newCustomer = ["+_newCustomer+"]");
*
two things, the duplicate line is only commented out to allow the trace to work (the mismatch stops execution) the trace outputs the following:

* _currentCustomer = [_level0.mcDavid] and _newCustomer = [_level0.mcSalesScreen._newCustomer]*

I have tried creating the empty clip and not creating it - no difference. Both _currentCustomer and _newCustomer are vars declared at the top of the class.

Any idea why I'm getting a type mismatch?

Docs say:

*duplicateMo**vieClip(target:String, newname:String, depth:Number) : Void *

looks to me like I'm using two strings and a number.

i have tried this definition:

* duplicateMovieClip(target:MovieClip, newname:String, depth:Number) : Void*

and I have also tried

* _newCustomer = this.duplicateMovieClip("_currentCustomer", this.getNextHighestDepth());*

But that's not working either.

Any ideas?

Cheers

David
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to