로더와 URLRequest를 사용하여 인터넷에서 .png를 다운로드하여 내 표시 목록에 추가했습니다. 이미 비트 맵이므로 이미 비트 맵 데이터가 내장되어 있습니까? 또는 직접 비트 맵 데이터를 만들어야합니까?ActionScript BitmapData 내장 비트 맵에?
도 왜 displayImage 함수에서 true를 출력 할 때 mouseMoveHandler에서 동일한 trace 문이 false를 반환합니까?
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("http://somewebsite.com/image.png"));
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, displayImage);
function displayImage(evt:Event):void
{
addChild(evt.target.content);
addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
trace(evt.target.content is Bitmap); //outputs 'true'
}
function mouseMoveHandler(evt:MouseEvent):void
{
trace(evt.target.content is Bitmap); //outputs 'false'
}
ouf. 그것은 정말 바보 같은 질문이었습니다. 나는 열을 비난한다. ;) – TheDarkIn1978