How to convert shapes drawn with ActionScript to movie clips?
August 19, 2008 6:02 PM
Subscribe
How do I convert a shape drawn with ActionScript to a movie clip that can have mouse actions in Flash (ActionScript 2)?
Maybe I'm missing something really basic here, but a couple hours of research in all the likely places haven't produced anything. Bascially I'm using
some functions for creating isometric drawings and I would like to be able to address the shapes they create as objects with onRollOver and onRelease and so on. Any help would be appreciated.
posted by nímwunnan to computers & internet (4 comments total)
createEmptyMovieClip("shape01_mc", 1);
shape01_mc.lineStyle(1, 0xcccccc, 100);
shape01_mc.moveTo(0, 0);
// blah blah blah, finish drawing your shape ...
So after drawing the shape in the new movieclip, you can assign your rollover and release functions to that movieclip.
shape01_mc.onRollOver = function(){
//do something
}
shape01_mc.onRollOut = function(){
//do something
}
shape01_mc.onRelease = function(){
//do something
}
posted by joe vrrr at 7:42 PM on August 19, 2008