View Full Version : translate from AS3 to AS2
killahert
August 1st, 2007, 01:21 PM
can anyone translate this from AS3 to AS2,
var mc_Shadow:DropShadowFilter = new DropShadowFilter();
mc_Shadow.color = 0x11222;
mc_Shadow.blurX = 8;
mc_Shadow.blurY = 8;
mc_Shadow.angle = 66;
mc_Shadow.distance = 0;
my_mc.filters = [mc_Shadow];
senocular
August 1st, 2007, 01:27 PM
its the same
killahert
August 1st, 2007, 01:30 PM
hmm why its not working if I set my movie to AS2
senocular
August 1st, 2007, 01:46 PM
make sure you are importing the filter
killahert
August 1st, 2007, 02:05 PM
make sure you are importing the filter\
:D that's what I was missing? ?
import flash.filters.DropShadowFilter;
:D thanks senocular
wvoets
August 1st, 2007, 02:12 PM
There is an overview of the differences between AS2 and AS3 in the help files or on this url: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html?migration.html
Pretty useful if you want to check if something's changed.
senocular
August 1st, 2007, 02:24 PM
since most classes in AS3 require importing, Flash CS3 imports them automatically (at least those in the flash packages - the classes native to the player). In AS2, only a few do and since you aren't required to import used classes in AS2, Flash doesn't do it for you.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.