Skip to content

Instantly share code, notes, and snippets.

View RKAN's full-sized avatar

Serkan Camur RKAN

  • Bitberry GmbH
  • Vienna
View GitHub Profile
@RKAN
RKAN / rows.as
Created July 21, 2013 06:46
Row Column Logic
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++)
{
@RKAN
RKAN / fadetoggle.as
Created July 21, 2013 06:58
AS3 Fade Toggle
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 {
@RKAN
RKAN / tweening
Created July 21, 2013 07:00
Tweening to a Relative Position using a Variable in TweenMax
// 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
@RKAN
RKAN / xml_loader.as
Created July 21, 2013 07:04
Basic external XML loader / Published in: ActionScript 3
package
{
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IOErrorEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
/**
* ...