PDA

View Full Version : loading xml + duplicating movie clip problem



n000bie
November 14th, 2009, 11:43 PM
Hi all,

I recently moved to AS3 from AS2. I am stuck in something like this

1) Load XML data in flash (title, link, logo and description)

2) Duplicate the movie clip which holds the data (i.e. dynamic text fields)

3) Show them horizontally (3 at first)

4) and start scrolling if there are more than 3 (since xml data is generated through php there may be any numbers)

Well, I had completed it in AS2 and now i need to do that in AS3. I just found there is no duplicateMovieClip function in AS3. I am totally stuck.

Please help me.....someone

P.S. : Is there something like MC Tween library for AS3 ?

cbeech
November 15th, 2009, 11:42 AM
duplicateMovieClip: under AS3 we no longer have to deal with archaic methods like this one, where it is quite limiting (for instance, you can only use/attach an instance with this method within the scope of the object being duplicted... but, it has its uses... lol) - and instead anytime you need to bring an Library instance to the stage we use the 'new' operator, as in:

var something:SomethingsClass = new SomethingsClass();
addChild(something);

BUT - if you are generating these dynamically, and loading them externally, you'll need to also the the Loader Class - which is also a form of a DisplayObject.


PS: yes, many - of course the Native Flash Tween class, TweenLite, Tweener, and many more.