In this example, is there anyway to fade in and out ‘mcContactAmer’ and ‘mcY’ as well as place them at specific coordinates, other than externally load them as swfs? This is the only thing holding me back from moving forward on this project and my boss would like to move forward, so any help would be greatly appreciated.
This is what my code looks like:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import flash.geom.Point;
var goCompany:Point = new Point(-365, -471);
var goSvs:Point = new Point(-1085, -1078);
var goContact:Point = new Point(-967, -116);
var goHome:Point = new Point(-512.8, -1045.6);
var currentRequest:Class;
var loader:MovieClip;
var fin = Tween = new Tween (loader, “alpha”, Strong.easeOut, 1, 0, 10, true);
btn_company.addEventListener(MouseEvent.CLICK, contentLoader);
btn_home.addEventListener(MouseEvent.CLICK, contentLoader);
function contentLoader(e:MouseEvent):void {
switch(e.target.name) {
case “btn_company”:
currentRequest = mcContactAmer;
new Tween (mc_map, ‘x’, null, mc_map.x, goCompany.x, 1.2, true);
new Tween (mc_map, ‘y’, null, mc_map.y, goCompany.y, 1.2, true);
break;
case “btn_home”:
currentRequest = mcY;
new Tween (mc_map, ‘x’, null, mc_map.x, goHome.x, 1.2, true);
new Tween (mc_map, ‘y’, null, mc_map.y, goHome.y, 1.2, true);
break;
}
loadIt();
}
function loadIt():void {
if(loader != null) {
removeChild(loader);
}
loader = new currentRequest;
addChild(loader);
}