Fix for Error #1063: Argument count mismatch on BitmapData Expected 2, got 0.

by troy on September 7, 2008

Normally creating blank BitmapData requires you pass in an the width and height in pixels.  But what about when you embed an image with a linkageid?  You'll get the above error trying to create a new myEmbeddedImage(); unless you pass it with two numbers, even if they don't mean anything e.g.

var bdata:BitmapData = new imageInLibraryLinkageID(0,0);

I would have thought that these would be optional for embedded assets.  Fix originally discovered here.

Leave a Comment

Previous post: Flash: Some characters could not be converted to outlines…

Next post: Flex | 360 Recap, and conference