2 msgRemoting - url encoded text
1 msgAdmin - how to unsub???
2 msgFlash Developers
1 msgSwitch back
6 msg[AS3] Timers behaving erratically
1 msgHelp - Are keyboard shortcuts possible forMenuB...
1 msgInternet Explorer and CTRL keyboard trapping
1 msgRead a website in a projector file
2 msgAdmin - list update, part deux
9 msgXPathAPI recursive XML search
1 msgText Rendering in 9
10 msgProblem when loading swf a second time
1 msgAdmin - list update
5 msgThis is really really really annoying
1 msgREMOVE
5 msgList changes- Help!!
9 msgflv question
1 msgxml content into flash

AS 3.0 - Typecast a new Obj instantiated from a...
\ Dave Geurts (23 Feb 2007)
. \ Rob Romanek (23 Feb 2007)

3 msgDo You Need to Clear Intervals in this Case?
Subject:Re: AS 3.0 - Typecast a new Obj instantiated from alibrary linked class to a 'displayObject'
Group:Flashcoders
From:Rob Romanek
Date:23 Feb 2007


 
Hi Dave,

I'm not sure you need to be accessing your bitmap via a movieClip. I'm
doing something similar but I use the bitmap directly from the library. I
se the bitmap up an auto generated class using 'Linkage' i.e. 'myBitmap'
then if I need the bitmapData in yourscript simply say:

var myBitmapData:myBitmap = new myBitmap();
var myBitmapInstance:Bitmap = new Bitmap(myBitmapData, "auto", true);
this.addChild(myBitmapInstance);

No need for a movieClip. I'm going to guess that when you use the
movieClip you are accessing the bitmap as a child of that movieClip and
trying to extract the bitmapData from that. I tried a similar approach and
it did not work. Seems that bitmaps assigned in authoring mode return a
type of Shape and not Bitmap when you try to access them. I'm guessing
this is a bug in the alpha version.

hth,

Rob

On Fri, 23 Feb 2007 13:12:55 -0500, Dave Geurts
<dave.geurts> wrote:

> Hello,
>
> So I have a movieClip in the library that is set to Export as a
> class with the Auto Create Class feature, with the name
> "rotate_sphere". rotate_sphere basically contains a .png that I would
> like to copy as bitmapData to a new bitmap Object so that I can take
> advantage of the smoothing parameter on 'New
> Bitmap(bitmapData,snapping,SMOOTHING)'. Because this object needs to
> scale and I would like to keep it looking "smooth" with keeping the
> edges anti aliased. I am getting a Type Coercion error which reads:
> cannot convert rotate_sphere$ to flash.display.DisplayObject when I am
> trying to get the bitmapData.
_______________________________________________
Flashcoders
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


© 2004-2008 readlist.com