Flash tour demo for FLASH9

Q&A about the latest versions
Post Reply
heyongping
Posts: 2
Joined: Mon Oct 29, 2007 4:40 pm

Code: Select all


import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;

//全景导入的函数
function loadPanorama(swffile:String,panstr:String,fovstr:String,titlestr:String) {
	var loader:Loader;
	loader = new Loader();
	var url:String;
	url=swffile;
	var urlReq:URLRequest = new URLRequest(url);
	var vr:MovieClip;
	function finished_loading(e:Event) {
	}
	function initHandler(event:Event):void {
		vr = MovieClip(loader.content);
	//vr.x = 300;
    //vr.y = 300;
    vr.pano.setFov(fovstr); 
    vr.pano.setPan(panstr);
	}
	loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);
	loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
	loader.load(urlReq);
	addChild(loader);
		
   var mctitle = new MovieClip();
   var istext : TextField = new TextField();
       istext.text =titlestr;
	   istext.textColor = 0xffffff;
       istext.autoSize = TextFieldAutoSize.LEFT;
	mctitle.addChild(istext);
    this.addChild(mctitle);
	mctitle.x=90;
	mctitle.y=548;
	
	setChildIndex(topface, this.numChildren - 1);//设置层深
	setChildIndex(SHOWB, this.numChildren - 1);//设置层深
	setChildIndex(mctitle, this.numChildren - 1);//设置层深

}
//end

//载入时打开第一页
loadPanorama("keting.swf","-70","60","TEXT");

//loadPanorama("{file}","{fov}","{pano}");


//按钮事件的侦å
akash
Posts: 10
Joined: Wed Feb 21, 2007 6:48 pm

I tried this in AS3, it gives quiet a few errors.
It says unidentified property "topface"
and also the same for SHOWB.
I'm not at all good at any kind of ActionScript, so any help would be much appreciated.

Thanks,
Akash
akash
Posts: 10
Joined: Wed Feb 21, 2007 6:48 pm

anybody got a reply for this??? I did create a movie called SHOWB and topface, still no luck. Please help somebodyyy...

Thanks in advance...
User avatar
thomas
Chief Gnome
Posts: 2613
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Did you create instances of all those clips you are using like "topface"? Can you upload the whole FLA somewhere?
MfG, Thomas
Post Reply