Показать сообщение отдельно
Старый 23.05.2007, 19:52
Мыкыта вне форума Посмотреть профиль Отправить личное сообщение для Мыкыта Найти все сообщения от Мыкыта
  № 9  
Ответить с цитированием
Мыкыта

Регистрация: Mar 2003
Адрес: Россия, Санкт-Петербург
Сообщений: 565
ну собсно варинтов много опять же блерим во времени блерим от пользовательских действий и т. п. вот что нарыл в хелпе помоему очень все понятно и динамично
Код:
import flash.filters.BlurFilter;
System.security.allowDomain("http://www.helpexamples.com");
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
    // Center the target_mc movie clip on the Stage.
    target_mc._x = (Stage.width - target_mc._width) / 2;
    target_mc._y = (Stage.height - target_mc._height) / 2;
};
this.createEmptyMovieClip("img_mc", 10);
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mclListener);
img_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", img_mc);
var blur:BlurFilter = new BlurFilter(10, 10, 2);

var mouseListener:Object = new Object();
mouseListener.onMouseMove = function():Void {
    /* Moving the pointer to the center of the Stage sets the blurX and blurY properties to 0%. */
    blur.blurX = Math.abs(_xmouse - (Stage.width / 2)) / Stage.width * 2 * 255;
    blur.blurY = Math.abs(_ymouse - (Stage.height / 2)) / Stage.height * 2 * 255;
    img_mc.filters = [blur];
};
Mouse.addListener(mouseListener);