stop();
try {
//TweenLite.to(pre_mc, .5, {y: "-100", ease:Back.easeIn});
trace("see ya pre");
var myTimer:Timer = new Timer(2500, 1);
myTimer.addEventListener(TimerEvent.TIMER, ToolGone);
myTimer.start();
function ToolGone(event:TimerEvent):void {
TweenLite.to(rotate_mc, .9, {alpha: 0, ease:Back.easeInOut});
}
var myTimer2:Timer = new Timer(2000, 1);
myTimer2.addEventListener(TimerEvent.TIMER, GetOut);
myTimer2.start();
function GetOut(event:TimerEvent):void {
trace("uh oh! the timer has begun");
var buttons:Array =[moreInfo_btn,rotate_btn,magnify_btn];
var links:Array =["HiltiCallouts.swf","Hilti-Rotation.swf","Hilti-Magnify.swf"];
var hotspotY:Array =[20,40,0];
var link = String(links[0]);
var currentBtn:MovieClip;
var previousBtn = MovieClip(buttons[0]);
var hotspot:Loader = new Loader();
addChild(hotspot);
function initSite():void {
for (var i:Number = 0; i < buttons.length; i++) {
buttons[i].id = i;
buttons[i].alpha = .2;
buttons[i].buttonMode = true;
buttons[i].mouseChildren = false;
buttons[i].addEventListener(MouseEvent.MOUSE_OVER, btnOver);
}
previousBtn.mouseEnabled = false;
previousBtn.alpha = 1;
hotspot.y = hotspotY[0];
hotspot.load(new URLRequest(link));
trace("link");
trace(link);
}
initSite();
trace ("initSite");
function btnOver(e:MouseEvent):void {
e.target.alpha = 1;
e.target.addEventListener(MouseEvent.MOUSE_OUT, btnOut);
e.target.addEventListener(MouseEvent.CLICK, btnClick);
}
function btnOut(e:MouseEvent):void {
e.target.alpha = .2;
}
function btnClick(e:MouseEvent):void {
try {
link = String(links[ e.target.id ]);
hotspot.y = Number(hotspotY[ e.target.id ]);
trace(link, hotspot.y);
e.target.removeEventListener(MouseEvent.MOUSE_OUT, btnOut);
e.target.removeEventListener(MouseEvent.CLICK, btnClick);
currentBtn = MovieClip(buttons[ e.target.id ]);
currentBtn.alpha = 1;
previousBtn.alpha = .2;
currentBtn.mouseEnabled = false;
previousBtn.mouseEnabled = true;
previousBtn = currentBtn;
hotspot.load(new URLRequest(String(link)));
} catch (error:TypeError) {
trace("IOTypeError catch: " + error);
} finally {
trace("Finally!");
}
}
}
} catch (error:TypeError) {
trace("IOTypeError catch: " + error);
} finally {
trace("Finally!");
}
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.