How do I make other Flash content display over the top of the pano that was imported?
I have a drop down menu built in Flash that I want to display on top of the pano.
Everything is covered by the pano?
Code: Select all
stop();
/*var myLoader:Loader = new Loader();
addChild(myLoader);
var url:URLRequest = new URLRequest("park.swf");
myLoader.load(url); */
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
var loader:Loader = new Loader();
var url:String = "Panorama_out.swf";
var urlReq:URLRequest = new URLRequest(url);
var vr:MovieClip; // panorama movieclip
// This is done after the swf is loaded.
function finished_loading (e:Event) {
}
function initHandler(event:Event):void {
trace("initHandler: " + event);
vr = MovieClip(loader.content); // cast 'DisplayObject' to 'MovieClip'
// vr.isFlash10=false; // Disable Flash 10 rendering if the container is Flash 9
}
function initPanorama(e:Event) {
// check if the panorama object is available and initialize it
if ((vr!=null) && (vr.pano!=null)) {
removeEventListener( Event.ENTER_FRAME , initPanorama);
vr.x=0;
vr.y=70;
vr.pano.setWindowSize(920,335);
//--------------------------------------------
vr.pano.onClickHotspot=function(id:String,obj:Object,url:String,target:String) {
// add your code here!
gotoAndStop(2);
trace("Point Hotspot:" + id);
if (id == "Park_02")
{
gotoAndStop(3);
}
}
//--------------------------------------------
}
}
// call initPanorama every frame
addEventListener( Event.ENTER_FRAME , initPanorama);
// Tell the loader to call 'finished_loading' after the swf is loaded.
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);
// Tell the loader to call 'initHandler' after the swf is initialized.
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.load(urlReq);
addChild(loader); // add your swf directly to the stage
myButton.addEventListener(MouseEvent.MOUSE_UP, myButtonUp);
function myButtonUp (event:MouseEvent):void{
trace("Hello World");
gotoAndStop(2);
}
myButton2.addEventListener(MouseEvent.MOUSE_UP, myButtonUp2);
function myButtonUp2 (event:MouseEvent):void{
trace("Hello World");
gotoAndStop(3);
}