2007의 게시물 표시

filter.saturation

var myFilters = fl.getDocumentDOM().getFilters(); for(i=0; i if(myFilters[i].name == 'adjustColorFilter'){ myFilters[i].saturation = 0-100; } } fl.getDocumentDOM().setFilters(myFilters);

setTimeout

function hello(){ trace("hello") } intervalID = setTimeout(hello, 1000) clearTimeout(intervalID)

onLoadComplete

var loadListener:Object = new Object(); loadListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void { trace(">> loadListener.onLoadComplete()"); } loadListener.onLoadInit = function(target_mc:MovieClip):Void { trace(">> loadListener.onLoadInit()"); } var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.addListener(loadListener); var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); mcLoader.loadClip(" http://www.w3.org/Icons/w3c_main.png ", mc);

플래시 폰트

What you see is what you get :: 네이버 블로그

Using Drawing API methods and scripting animation

import mx.transitions.Tween; import mx.transitions.easing.*; var mclListener:Object = new Object(); mclListener.onLoadInit = function(target_mc:MovieClip) { target_mc._visible = false; // Center the image on the Stage. target_mc._x = (Stage.width - target_mc._width) / 2; target_mc._y = (Stage.height - target_mc._height) / 2; var maskClip:MovieClip = target_mc.createEmptyMovieClip("mask_mc", 20); with (maskClip) { // Draw a mask that is the same size as the loaded image. beginFill(0xFF00FF, 100); moveTo(0, 0); lineTo(target_mc._width, 0); lineTo(target_mc._width, target_mc._height); lineTo(0, target_mc._height); lineTo(0, 0); endFill(); } target_mc.setMask(maskClip); target_mc._visible = true; var mask_tween:Tween = new Tween(maskClip, "_yscale", Strong.easeOut, 0, 100, 2, true); }; this.createEmptyMovieClip("img_mc", 10); var img_mcl:MovieClipLoader = new MovieClipLoader(); img_mcl.addListener(mclListener); img_mcl.loadClip("http://www.helpexamples.co...

Filter

import flash.filters.BlurFilter; import mx.transitions.Tween; import mx.transitions.easing.*; this.createEmptyMovieClip("holder_mc", 10); holder_mc.createEmptyMovieClip("img_mc", 20); var mclListener:Object = new Object(); mclListener.onLoadInit = function(target_mc:MovieClip) { target_mc._x = (Stage.width - target_mc._width) / 2; target_mc._y = (Stage.height - target_mc._height) / 2; var myTween:Tween = new Tween(target_mc, "blur", Strong.easeInOut, 0, 20, 3, true); myTween.onMotionChanged = function() { target_mc._parent.filters = [new BlurFilter(target_mc.blur, target_mc.blur, 1)]; }; myTween.onMotionFinished = function() { myTween.yoyo(); } }; var my_mcl:MovieClipLoader = new MovieClipLoader(); my_mcl.addListener(mclListener); my_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", holder_mc.img_mc); The preceding code is separated into three sections. The first section imports the required classes and packages. The second

Motion

import mx.transitions.Tween; import mx.transitions.easing.*; new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Back.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Bounce.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Elastic.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Regular.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeIn, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeOut, 0, 300, 2, true); new mx.transitions.Tween(mc, "_x", mx.transitions.easing.None.easeInOut, 0, 300, 2, true); mx.transitions.TransitionManager.star...

Brower Resize for Flash

Creative Design, design[pu:] :: 네이버 블로그