all groups > flash actionscript > february 2007 >
You're in the

flash actionscript

group:

Weird Drawing Issues


Re: Weird Drawing Issues Raymond Basque
2/22/2007 1:50:20 PM
flash actionscript:
The dimensions are changing as you draw. Get your width and height before
you draw:

private function pcDrawThumbBorder(target:MovieClip):Void {
var _w = target._width;
var _h = target._height;
target.createEmptyMovieClip("border_mc", target.getNextHighestDepth());
target.border_mc.moveTo(0,0);
target.border_mc.lineStyle(5, borderColor);
target.border_mc.lineTo(_w, 0);
target.border_mc.lineTo(_w, _h);
target.border_mc.lineTo(0, _h);
target.border_mc.lineTo(0,0);

}

Weird Drawing Issues SymTsb
2/22/2007 6:36:16 PM
Hey guys. Check the link below. Access is 123456789.

http://www.fedlerstudio.com/flash/previews.swf

After the images load, you'll notice that the right side bottom and bottom
line segments for the border appear to be drawing slightly off key from where
they should be. It's straightforward AS but I've provided that as well.

This function for the border isn't called until onLoadInit fires from my
MovieClipLoader (it's actually part of the onLoadInit). At first, I thought it
was because the function fires while the image is loading but that's impossible
as far as I know since it will not fire until AS for the target is loaded but
even so, that would result in a much larger box around the image as well since
the thumbs are generated from the full size image.

Any ideas as to why my movie is having issues??

private function pcDrawThumbBorder(target:MovieClip):Void {
target.createEmptyMovieClip("border_mc", target.getNextHighestDepth());
target.border_mc.moveTo(0,0);
target.border_mc.lineStyle(5, borderColor);
target.border_mc.lineTo(target._width, 0);
target.border_mc.lineTo(target._width, target._height);
target.border_mc.lineTo(0, target._height);
target.border_mc.lineTo(0,0);
}
Re: Weird Drawing Issues poisoniver
2/22/2007 7:08:27 PM
Check to make sure everything is not rotated it looks like the code is ok but
something on the stage is moved by a degree or two.

Just go to your Align Transform Panel and check everything because it is not
the code as far as I can tell.
Re: Weird Drawing Issues SymTsb
2/22/2007 7:40:58 PM
Thank you. That was indeed the issue. I'm not sure I understand how or why
the dimensions would change as I'm drawing seeing as the image is already
loaded into the movie but storing the dimensions at the start of the function
fixed the problem. I appreciate the help.
Re: Weird Drawing Issues Rothrock
2/22/2007 8:03:17 PM
AddThis Social Bookmark Button