I have several questions:
Question 1:
Is it possible to pass data to loaded movie clip with hotspot action?
In custom skin I added flash SWF element named "html_loader"
html_loader serves for displaying info about specific spots in panorama(s) and it basically
loads external html: 1 image and text, and it enables scrolling if needed.
This is AS3 code for loaded clip:
Code: Select all
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
public class externalContent extends Sprite {
public var scroller:Scroller = new Scroller ();
public var scrollContent:TextField = new TextField ();
public var textFormat:TextFormat = new TextFormat ("Arial", 12, 0x000000);
public var textLoader:URLLoader = new URLLoader ();
public function externalContent ():void {
scrollContent.x = 20;
scrollContent.y = 20;
scrollContent.width = 500;
addChild (scrollContent);
scroller.x = 570;
scroller.y = 20;
scroller.scrollTarget = scrollContent;
scroller.trackHeight = 350;
scroller.maskHeight = 350;
scroller.trackSpeed = 8;
scroller.justification = "left";
addChild (scroller);
textLoader.addEventListener (Event.COMPLETE, textLoaded);
textLoader.load (new URLRequest ("externalContentText.html"));
}
public function textLoaded (event:Event):void {
scrollContent.htmlText = textLoader.data;
scrollContent.setTextFormat (textFormat);
}
}
}
Is this possible?
Question 2:
I have educational tour with 30 panoramas. Visitors should visit 1st one, than next, etc.
On the bottom I need to have 30 clickable dots, each when clicked should open specified panorama name. I'm creating dots dynamically, and I can pass panorama names from array list.
2.1 Which code should I use and put into click action to load specified panorama?
2.2 Can I use numbers (from Tour Browser) instead of actual panorama names?
2.3 Does p2vr provide feature functions to load previous and next panorama with arrow buttons?
I would like to be able to navigate to previous or next panorama from current one, by clicking navigational arrows
Instead clickable dots, maybe I will use another approach: scrollable panorama thumbnails, but with same click action.
I'm using p2vr 4.1.0 pro
Thanks
Regards