저는 Flash로 시작 했으므로 ActionScript 2.0을 사용하고 있고 겉으로보기에는 단순하지만 무언가를 이루려 고 노력하고 있습니다. .큰 이미지로드 및 마스크 플래시
3000x2000 픽셀에 대한 큰 이미지를로드 한 다음 작은 사각형으로 마스크를 적용하여 나중에 이미지를 스크롤하여 볼 수있게하려고합니다.
여기에 제가 지금까지 가지고있는 코드가 있습니다. 빈 흰색 화면이 생성됩니다. 어도비의 문서에서
createEmptyMovieClip("container", getNextHighestDepth());
container.createEmptyMovieClip("fullImage", container.getNextHighestDepth());
//When I replace the above line of code with the line of code bellow the image is displayed but it still not masked.
//createEmptyMovieClip("fullImage", getNextHighestDepth());
var fullClipLoader = new MovieClipLoader();
fullClipLoader.loadClip("fountain.jpg", fullImage);
// Function for scrolling through the image
fullClipLoader.onLoadComplete = function() {
createEmptyMovieClip("mask", getNextHighestDepth());
mask._x = 50;
mask._y = 50;
mask.beginFill(0xFF0000,50);
mask.lineStyle(5,0xFF00FF,100);
mask.lineTo(100,0);
mask.lineTo(100,100);
mask.lineTo(0,100);
mask.lineTo(0,0);
container.setMask(mask);
/*
fullImage._x += _level0._xmouse;
if (fullImage._x>_level0._x) {
fullImage._x = _level0._x;
}
if (fullImage._x<(_level0._x-(fullImage._width-_level0._width))) {
fullImage._x = _level0._x-(fullImage._width-_level0._width);
}
*/
};