RE: [Flashcoders] loadMovie in a duplicated movieclip

2007-01-17 Thread Don
Sorry Jason, I was typing from memory, not copy / paste...

this[newName]._x = menu_ds.HorizontalPos;

Doesn't work for me, and the only reason I ended up using eval() is because
it's the only thing that worked!

This code doesn't work...

duplicateMovieClip(dupButton, newName, i);
this[newName]._x = menu_ds.HorizontalPos;
this[newName]._y = menu_ds.VerticalPos;

I scoured the net and eval() was the only answer I could find...

I'm publishing Flash 8, AS2

Thanks...



 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 16 January 2007 16:49
To: Flashcoders mailing list
Subject: RE: [Flashcoders] loadMovie in a duplicated movieclip

And could anyone explain why

this.[newName]._x = menu_ds.HorizontalPos;

doesn't work?

Improper syntax.  Try:

this[newName]._x = menu_ds.HorizontalPos;

Also, would recommend against using eval() in this case and use the []
operator instead.

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
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

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.13/632 - Release Date: 16/01/2007
16:36
 

___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] loadMovie in a duplicated movieclip

2007-01-17 Thread Merrill, Jason
Well, to dig deeper, it's hard to comment because I don't know what
_root.menu_ds.hasNext() does, or how _root.menu_ds.Type is set, or
how dupButton is determined.  There could be any number of things
wrong there.  Why are you using a while loop out of curiosity?  Also, I
usually avoid duplicateMovieClip because I always see people complain
about it - either buggy or it's limitations.  For those situations, I
usually create an empty movie clip and attach from the library.  Not
saying that's the right approach, just what I have found works best for
me in most situations.

eval() is the old way, Adobe is pushing Actionscript to sctrict ECMA
specifications, which means using the [] operator instead.  If
this[newName] doesn't work, then something is wrong with the scope,
and I don't know where your clips are set up relative to that statement.
Have you tried sprinkling some traces in your code to find out what's
failing and where? 

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] loadMovie in a duplicated movieclip

2007-01-17 Thread Don
Hi Jason,

I've put buttons in the duplicated movieclips, and they always trace back as
+level0.button_28 or whatever the button number was when created...

I've also traced every variable coming from menu_ds and they all work as
they should... The while loop and the hasNext() come right out of the help
files when iterating through a dataset, I had never used either before.

I think the next step is to look into creating an empty movieclip and
attaching from the library...  This is just too much headache to be worth
it...

Thanks for your time...

Don


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: 17 January 2007 15:17
To: Flashcoders mailing list
Subject: RE: [Flashcoders] loadMovie in a duplicated movieclip

Well, to dig deeper, it's hard to comment because I don't know what
_root.menu_ds.hasNext() does, or how _root.menu_ds.Type is set, or how
dupButton is determined.  There could be any number of things wrong there.
Why are you using a while loop out of curiosity?  Also, I usually avoid
duplicateMovieClip because I always see people complain about it - either
buggy or it's limitations.  For those situations, I usually create an empty
movie clip and attach from the library.  Not saying that's the right
approach, just what I have found works best for me in most situations.

eval() is the old way, Adobe is pushing Actionscript to sctrict ECMA
specifications, which means using the [] operator instead.  If
this[newName] doesn't work, then something is wrong with the scope, and I
don't know where your clips are set up relative to that statement.
Have you tried sprinkling some traces in your code to find out what's
failing and where? 

Jason Merrill
Bank of America
Learning  Organizational Effectiveness
 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
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

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.13/632 - Release Date: 16/01/2007
16:36
 

___
Flashcoders@chattyfig.figleaf.com
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