I'm doing an example from Friend of Ed's Foundation Actionscript 3.0 Animation and it is not working. Sadly, Ed isn't very responsive.
Here is the class definition itself:
I coded out the Flex stuff. He says after this code, well if you are using the Flash IDE then just embed an image in your library, export it for actionscript, and call it the class "Picture" and everything will work.
public class TransformColor extends Sprite
//public var Picture:Class;
public function TransformColor()
private function init():void
var pic:Bitmap = new Picture();
pic.transform.colorTransform = new ColorTransform(-1, -1, -1, 1,255, 255, 255, 0);
1136: Incorrect number of arguments. Expected 2. | var pic:Picture = new Picture();
1067: Implicit coercion of a value of type Picture to an unrelated type flash.displayBig GrinisplayObject. | addChild(pic);
TypeError: Error #1007: Instantiation attempted on a non-constructor.
Any ideas? I just want to finish this off so I can get to the next chapter which is much more exciting.
Do not link to the bitmap itself in the library.
Put the bitmap in a MovieClip and link to that.
Solved. Program Works.
Hey, I'm sure we are working from the same book and I too have this issue. However, I cant quite figure out how to do what you say. I know what needs to be done, (i think) but not how to code it. can you show sample code of how to make this work? I don't want to physically place it on the stage, I want to code it the right way. Meanwhile, moving on to the next chapter.
Click Here to Expand Forum to Full Width
Poll by Flashkit.com