This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.events.Event; | |
import flash.events.EventDispatcher; | |
import flash.events.IOErrorEvent; | |
import flash.net.URLLoader; | |
import flash.net.URLRequest; | |
/** | |
* ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Your everyday absolute tween that moves movieclip_mc | |
// to 100 on the x axis, taking one second to do so | |
TweenMax.to(movieclip_mc, 1, {x:100}); | |
// A relative tween that moves movieclip_mc to a | |
// position on the x axis 100 units/pixels greater | |
// than movieclip_mc's current position | |
TweenMax.to(movieclip_mc, 1, {x:"100"}); | |
// An absolute tween like the first, but passing in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fadeOff(b2:MovieClip):void { | |
Tweener.addTween( b2, { alpha: .1,time: .35, transition: "easeOutQuad", onComplete:clipOff, onCompleteParams:[b2]}); | |
} | |
function clipOff(b3:MovieClip):void { | |
b3.visible=false; | |
} | |
function clipOn(c2:MovieClip):void { | |
Tweener.addTween( c2, { alpha: 1,time: .5, delay:.1, transition: "easeOutQuad"}); | |
} | |
function fadeOn(c3:MovieClip):void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nSutun :uint = 5; //Kaç sütun olsun | |
var mKare :MovieClip; | |
var nXspace :uint = 5; //x eksenine göre boşluk | |
var nYspace :uint = 5; //y eksenine göre boşluk | |
function createThumb():void | |
{ | |
for (var i:uint = 0; i < nTotal; i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tf:TextField = new TextField(); | |
tf.autoSize = TextFieldAutoSize.LEFT; | |
tf.border = true; | |
addChild(tf); | |
tf.x = 200; | |
tf.y = 200; | |
tf.multiline = true; | |
tf.height = 200; | |
tf.appendText("params:" + "\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//AssetManager.as | |
// usage: AssetManager.getInstance.getAssetByName("MonaLisa"); | |
package | |
{ | |
import flash.utils.describeType; | |
import flash.utils.getDefinitionByName; | |
public class AssetManager | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tr.com.gotoandrock.utils | |
{ | |
import com.greensock.TweenLite; | |
import flash.display.DisplayObject; | |
import flash.geom.Matrix; | |
/** | |
* Helps 3d tranformation applied target back to normal 2D Matrix and look&feel :) | |
* Should only use tween ends with if z value equal 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Embedding the font: | |
[Embed(source="FONT.ttf", fontName = "myFont", mimeType = "application/x-font-truetype", advancedAntiAliasing="true", embedAsCFF="false")] | |
private var myEmbeddedFont:Class; | |
//Creating the textformat: | |
var defaultTextFormat : TextFormat = new TextFormat('myFont'); | |
//Applying the font to a textfield: | |
myTextField.defaultTextFormat = Config.defaultTextFormat; | |
myTextField.embedFonts = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* main.fla -> main.as | |
*/ | |
package | |
{ | |
import flash.display.MovieClip; | |
import flash.events.Event; | |
/** | |
* ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import ExternalInterface class use this instead of trace() to view output in JavaScript console | |
public function log(_t:String):void{ | |
if(ExternalInterface.available){ | |
ExternalInterface.call("console.log", _t ); | |
} | |
} |
NewerOlder