Revision: 47611
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 11, 2011 07:30 by landock
Initial Code
import com.greensock.*;
import com.greensock.easing.*;
var currentTween:TweenMax;
var bgTween:TweenMax;
function randomRange(min:Number, max:Number):Number {
return Math.random() * (max - min) + min;
}
function getNewColor() {
return (Math.random()) * 0xffffff;
//trace(newColor);
}
function runTween() {
var scaleR:Number=randomRange(6,18);
currentTween=TweenMax.to(logo_mc,10,{rotation:randomRange(0,120),alpha:randomRange(.5,1),scaleX:scaleR,scaleY:scaleR,x:randomRange(0,500),y:randomRange(0,300),ease:Sine.easeInOut,onComplete:runTween});
}
var timeline:TimelineLite = new TimelineLite();
timeline.insertMultiple([ new TweenLite(quote_mc, 1, {alpha:1, ease:Sine.easeOut}),
new TweenLite(qa1_mc, 1, {x:350, ease:Sine.easeOut, delay:1}),
new TweenLite(qa1_mc, 0.25, {alpha:0, ease:Sine.easeOut, delay:4}),
new TweenLite(qa2_mc, 1, {alpha:1, ease:Sine.easeOut}),
new TweenLite(learn_btn, 1, {alpha:1, ease:Sine.easeOut})],
0, TweenAlign.SEQUENCE, 0);
runTween();
//add hand cursor
learn_btn.buttonMode = true;
learn_btn.useHandCursor = true;
//assign eventListeners
learn_btn.addEventListener(MouseEvent.MOUSE_OVER, navOver);
learn_btn.addEventListener(MouseEvent.MOUSE_OUT, navOut);
//on mouse over do this
function navOver(e:MouseEvent):void{
//trace(e.target)
TweenLite.to(e.target, 0.75, {scaleX:1.2, scaleY:1.2, ease:Back.easeOut});
};
//on mouse out do this
function navOut(e:MouseEvent):void{
TweenLite.to(e.target, 0.25, {scaleX:1, scaleY:1,ease:Back.easeIn});
};
var _url:String = "";
if (LoaderInfo(root.loaderInfo).parameters.clickTAG) {
_url = LoaderInfo(root.loaderInfo).parameters.clickTAG;
myButton.addEventListener(MouseEvent.MOUSE_UP, handleMouse);
learn_btn.addEventListener(MouseEvent.MOUSE_UP, handleMouse);
}
function handleMouse(event:MouseEvent):void {
navigateToURL(new URLRequest(_url), "_blank");
}
Initial URL
Initial Description
Initial Title
netdoc insterstitial
Initial Tags
Initial Language
ActionScript 3