Hi i try to make a plugin or i want my buttonset as an swf..
so the first questions is where do i put or import the krpano....as file... in the folder where the fla file is ? or should i import it in flash? where and how??
or put it also in the krpano tour project map ..(??)
you can have a look to these files.
i will be happy when i can make this button work with krpano to go fullscreen... then i can work on the rest..
I understand that i export swf and then use as plugin in krpano but.... is see it but doesn't communicate..
I would really appriciate when somebordy can put me on the road with this..
This i have in my flash file
Code
/*
Flash CS3 Example
Version 1.1
(needed krpano version 1.0.6 or greater)
Changes:
1.0 - first release
1.1 - added Fullscreen Button and Events
- wait(blend); bugfix (krpano version 1.0.6)
- loadpano() + action examples
- random viewpoint button
*/
// import krpano as3 interface.as
// - should be in the same folder or in the class path
import krpano_as3_interface;
// create krpano as3 interface object - krpano
var krpano:krpano_as3_interface = krpano_as3_interface.getInstance();
// empty functions? - then it wasn't included in the viewer
if (krpano.get == null)
{
// run plugin swf standalone - no interfaces - add dummy functions
function dummy_get(v:String):String
{
if (v != "progress.loaddone") // avoid progress timer traces
trace("get(" + v + ");");
return "";
}
function dummy_set(v:String,val:String):void
{
trace("set("+v+","+val+");");
}
function dummy_call(action:String):void
{
trace("call("+action+");");
}
krpano.get = dummy_get;
krpano.set = dummy_set;
krpano.call = dummy_call;
}
// first krpano calls - disable default progressbar
if (stage)
{
// run standalone
// no automatic scaling
stage.scaleMode = StageScaleMode.NO_SCALE;
// align on top left corner
stage.align = StageAlign.TOP_LEFT;
}
function startup_plugin(event:Event):void
{
// setup a global RESIZE event to set the positions of all elements when resizeing
// add a Fullscreen event to make changes when switching to fullscreen and back
stage.addEventListener(FullScreenEvent.FULL_SCREEN, stage_fullscreen_event);
// do a first resize
}
this.button_fullscreen.addEventListener(MouseEvent.CLICK, fullscreen_clicked);
function fullscreen_clicked(mouseevent:MouseEvent):void
{
// switch fullscreen mode
// note - the stage_fullscreen_event function will be called then
if (stage.displayState != StageDisplayState.FULL_SCREEN)
{
stage.displayState = StageDisplayState.FULL_SCREEN;
}
else
{
stage.displayState = StageDisplayState.NORMAL;
}
}
Display More
i attach the files so i hope somebody puts me in the right direction..
Thanx
Tuur