Hey rderimay yes, sprites in the later versions of 3.5 and the new 3.6 version have had a bit of a cleanup, although there really should be no loss in functionality. The refactor was made in order to allow faster core methods and a more flexible approach to sprites in the future.
to answer your questions - Sprite2D has been replaced by Sprite3D (in 3.5, both still existed in order to maintain compatibility, but the development for 3.6 forced us to make a decision on removing the deprecated Sprite2D altogether). You can still create a sprite with a bitmapData object - the difference now is that you have to wrap bitmapData in a BitmapMaterial. using materials means you can now have colored sprites, moviematerial sprites etc so i hope you can see the advantages this brings. The same is now true of DirSprite2D (which has been renamed DirectionalSprite) and DofSprite2D (renamed to DepthOfFieldSprite), although the latter won't work particularly well with moviematerials due to the way it attempts to cache different blurring states. If you still want to use ownCanvas on a sprite, it is easily possible by simply wrapping the sprite instance in an ObjectContainer3D. while this is a little more work, the savings an optimisations this approach allows when you are not doing this more than make up for it. handCursor is something that we are looking at reimplementing at the sprite level seeing as it is more widely used, but again, this will work as before if the sprite is wrapped in a ObjecContainer3D I will be posting a full list of updates and changes made in 3.6 as soon as i can cheers Rob On Tue, Sep 28, 2010 at 8:35 AM, Michael Iv <[email protected]> wrote: > Actually Didn't know there was Away3D 3.6 release .... ;) > > > On Mon, Sep 27, 2010 at 11:25 PM, rderimay <[email protected]> wrote: > >> Many thanks for this one. >> A few problems still: >> As DirectionalSprite is not an Object3D any more, the following >> functions/properties like: >> .useHandCursor = true; >> .addOnMouseDown(); >> .addOnMouseUp(); >> >> Any advice how I could recover this functionality? >> >> On Sep 27, 9:51 pm, savagelook <[email protected]> wrote: >> > Scene3D.addSprite() >> > >> > On Sep 27, 3:39 pm, rderimay <[email protected]> wrote: >> > >> > >> > >> > > Update: I think i figured out that Sprite2D has really been replaced >> > > by DirectionalSprite. >> > > So my question is now only: >> > >> > > Scene3D.addChild / removeChild, how to add or remove a child to a >> > > scene as Sprite2D is not an Object3D anymore ?? >> > >> > > THANKS! >> > >> > > Régis >> > >> > > On Sep 27, 8:46 pm, rderimay <[email protected]> wrote: >> > >> > > > Hi there, >> > >> > > > i am facing a problem migrating from 3.5 to 3.6 on a Sprite2D >> object. >> > >> > > > 1. By which object the Sprite2D object has been replaced (is it >> > > > DirectionalSprite ?) >> > > > 2. The old Sprite2D took a BitmapData as input, which >> > > > DirectionalSprite does not but materials. How can I get the >> > > > functionality back using Materials? >> > > > 3. Should it be DirectionalSprite, then the addChild/removeChild >> > > > function of the View3D throw a explicit coercicion warning as >> > > > DirectionalSprite is not a child of Object3D anymore but of Element. >> > >> > > > Many thanks if someone can help! >> > >> > > > Régis >> > > > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air |3D|Unity| > www.neurotechresearch.com > http://blog.alladvanced.net > http://www.meetup.com/GO3D-Games-Opensource-3D/ > Tel:054-4962254 > [email protected] > [email protected] > > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
