Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Подскажите, проблема с выбором мувиклипа. (http://www.flasher.ru/forum/showthread.php?t=127604)

xxx123123 18.07.2009 10:44

Подскажите, проблема с выбором мувиклипа.
 
Код AS1/AS2:

import flash.display.BitmapData;
import flash.geom.Matrix;
var imageLinkage:String = "10.jpg";
var targetX:Number = 0;
var targetY:Number = 0;
var mapX:Number = 0;
var mapY:Number = 0;
var koefX:Number = 1;
var koefY:Number = 1;
var matrix:Matrix = new Matrix();
var sourceBMP:BitmapData = BitmapData.loadBitmap(imageLinkage);
var viewBMP:BitmapData = new BitmapData(Stage.width, Stage.height, false, 0);
var mc:MovieClip = this.createEmptyMovieClip("fon_mc", this.getNextHighestDepth());
mc.attachBitmap(viewBMP,0,"auto",true);
koefX = 1 - (sourceBMP.width / Stage.width);
koefY = 1 - (sourceBMP.height/ Stage.height);
startPanSlide ();
function startPanSlide ():Void {
mc.onMouseMove = function ():Void {
targetX = _root._xmouse * koefX;
targetY = _root._ymouse * koefY;
};
mc.onEnterFrame = function():Void
{
mapX -= (mapX - targetX)/2;
mapY -= (mapY - targetY)/2;
mapX = Math.min(Math.max(Stage.width - sourceBMP.width, mapX), 0);
mapY = Math.min(Math.max(Stage.height - sourceBMP.height, mapY), 0);
matrix.tx = mapX;
matrix.ty = mapY;
viewBMP.draw(sourceBMP, matrix);
};
}



как сделать чтобы бралась не картинка, а мувиклип?
нужен код в котором будет присваиваться не картинка, а мувиклип

etc 18.07.2009 11:04

xxx123123, а что у вас не получается?


Часовой пояс GMT +4, время: 00:27.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.