I'm trying to create a bitmapData - with the dimensions taken from an
MovieClip like this:
var myBitmapData:BitmapData = new
BitmapData(mc.width,mc.height,true,0x000000);
the MC has been added to the stage and I can trace the dimensions - but
this errors...
"ArgumentError: Error #2015: Invalid BitmapData"
it works if I just set the dimensions manually.
Any ideas what's going on - I'm sure it's a stupid thing I'm doing
Cheers
Juan
--
You received this message because you are subscribed to the Google Groups "Bristol Flash User Group" group.
To post to this group, send email to bristol-flash-user-group@googlegroups.com.
To unsubscribe from this group, send email to bristol-flash-user-group+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bristol-flash-user-group?hl=en.
How large are width / height? And are they round numbers? Maybe cast them to an int in the constructor.
Cheers,
Rich
On 28 July 2011 15:20, juan kennaugh <con...@jkennaugh.co.uk> wrote:
Hi all
I'm trying to create a bitmapData - with the dimensions taken from an MovieClip like this:
var myBitmapData:BitmapData = new BitmapData(mc.width,mc.height,true,0x000000);
the MC has been added to the stage and I can trace the dimensions - but this errors...
"ArgumentError: Error #2015: Invalid BitmapData"
it works if I just set the dimensions manually.
Any ideas what's going on - I'm sure it's a stupid thing I'm doing
Cheers
Juan
--
You received this message because you are subscribed to the Google Groups "Bristol Flash User Group" group.
To post to this group, send email to bristol-flas...@googlegroups.com.
To unsubscribe from this group, send email to bristol-flash-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bristol-flash-user-group?hl=en.
--
You received this message because you are subscribed to the Google Groups "Bristol Flash User Group" group.
To post to this group, send email to bristol-flas...@googlegroups.com.
To unsubscribe from this group, send email to bristol-flash-user...@googlegroups.com.
Hi
no - I've rounded them like this:
var w:int = Math.round(mc.width) as int;
var h:int = Math.round(mc.height) as int;
var myBitmapData:BitmapData = new BitmapData(w,h,true,0x000000);
and no joy???
wierd
Juan
--
You received this message because you are subscribed to the Google Groups "Bristol Flash User Group" group.
To post to this group, send email to bristol-flas...@googlegroups.com.
To unsubscribe from this group, send email to bristol-flash-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bristol-flash-user-group?hl=en.