subclass of BitmapData gives 1009 error with PixelColorist

8 views
Skip to first unread message

karin

unread,
Jul 5, 2011, 5:08:07 AM7/5/11
to HYPE Framework
Hi,

After trying for days to figure this out, I think it's better to ask
what I'm doing wrong.

I hooked up a webcam to my Hype Fla.....no problem
I created an subclass for the BitmapData class and called that via
PixelColorist and it gives a 1009 error

This is the code so far:

var MyVid:BitmapData=new video(camW,camH);
var vidImage:Bitmap=new Bitmap(MyVid);
this.addChild(vidImage);
vidImage.x=0;
vidImage.y=0;

var color:PixelColorist = new PixelColorist(vidImage, camW, camH)

most of the time or the webcam shows the image but there is no
animation and in the output box the 1009 error, or the animation is
playing (black or white) over the video image.

What am I doing wrong?

regards
Karin

Nicole Chung

unread,
Jul 6, 2011, 9:56:34 AM7/6/11
to hypefr...@googlegroups.com
A 1009 error is often from a movieclip or an instance that is not instantiated yet.

Did you try running the debug mode to see if your instance is returning null?

Perhaps you have to place your instance on the stage (if it is a display object) by using addChild and addChild *has* to be done before you call any methods that require the stage.

OR...if it's something on the timeline the instance has to be on frame 1 (really, all the available frames) or it won't be 'instantiated' and it won't work.

Hope this helps.

karin

unread,
Jul 6, 2011, 2:51:00 PM7/6/11
to HYPE Framework
thanks for your help. At least I figured out where the problem was,
but Josh helped me along with the rest.
So now it works.

regards,
Karin

On 6 jul, 15:56, Nicole Chung <nicole.ch...@gmail.com> wrote:
> A 1009 error is often from a movieclip or an instance that is not
> instantiated yet.
>
> Did you try running the debug mode to see if your instance is returning
> null?
>
> Perhaps you have to place your instance on the stage (if it is a display
> object) by using addChild and addChild *has* to be done before you call any
> methods that require the stage.
>
> OR...if it's something on the timeline the instance has to be on frame 1
> (really, all the available frames) or it won't be 'instantiated' and it
> won't work.
>
> Hope this helps.
>
Reply all
Reply to author
Forward
0 new messages