Форум 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)
-   -   DropShadowFilter - не накладывается на Bitmap? (http://www.flasher.ru/forum/showthread.php?t=80798)

G.W.M 06.06.2006 20:44

DropShadowFilter - не накладывается на Bitmap?
 
DropShadowFilter - не накладываетца на Bitmap в чом проблема вроде в helpe написано что он это поддерживает...

Код:

import flash.filters.DropShadowFilter;
import flash.display.BitmapData;

var form:BitmapData = BitmapData.loadBitmap('form');
var output:BitmapData = new BitmapData(form.width, form.height, true, 0xcccccc);
var shadow:DropShadowFilter = new DropShadowFilter(10, 10, 0xff0000, 100);
shadow.hideObject = true;
form.applyFilter(form, form.rectangle, new Point(), shadow);
attachBitmap(form, 0);


MyXus 06.06.2006 21:28

А пробовал битмап дату в мув класть?

etc 06.06.2006 22:12

Код:

import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.filters.DropShadowFilter;
import flash.geom.Point;

var myBitmapData:BitmapData = new BitmapData(100, 80, true, 0xCCCCCCCC);

var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());

var filter:DropShadowFilter = new DropShadowFilter(10,10,0,100,10,10,1,2,false,false,true);

mc.onPress = function() {
    myBitmapData.applyFilter(myBitmapData, myBitmapData.rectangle, new Point(0, 0), filter);
}

Цитата из хелпа:
Цитата:

BevelFilter, DropShadowFilter, GlowFilter -- The destination image of these filters must be a transparent image. Calling DropShadowFilter or GlowFilter creates an image that contains the alpha channel data of the drop shadow or glow. It does not create the drop shadow onto the destination image. If you use any of these filters with an opaque destination image, an error code value of -6 is returned.
Перевести?

Поэтому юзаем copyPixels


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

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