Building a swf interface

  • I'm OK with Flash - building buttons etc, so I'm thinking of just having a single swf as my main control panel instead of a row of graphics.

    But I'm confused about where to put the relevant xml code. For example, in the "move left" button all I need to put on the flash button is this:


    But how do I actually include that ? And what about toggle actions ?

    Perhaps if someone has already been down this road they might like to share some knowledge ?


  • well flash is a little more complicater but alot stronger when you choose to use it.

    first you have to register the krpano class, this allows you to communicate with krpano. Copy the file in the root of your fla file. then in the actions panel:

    then you add a Eventlistener to your buttons, this allows you to listen to certain user inputs. Like a Mouseclick.

    nameofyourbutton.addEventListener(MouseEvent.CLICK, ClickFunction)
    otherbutton.addEventListener(MouseEvent.CLICK, ClickFunction2)
    function ClickFunction(evt:Event):void
    krpano.set("movevectorx",0) //your click action
    function ClickFunction2(evt:Event):void
    krpano.set("movevectorx",0) //your click action
  • It's a shame there isn't an example that's a bit more useful. That fla file may have all sorts of example code, but it isn't even remotely close to a usable control panel.

    I was hoping there may have been something like a Flash control panel example in the same way there is a plain graphic xml control panel. Much, much easier just to modify that way.

  • Those interfaces are very good, but I mean just a simple panel of controls: up, down, left, right, fullscreen toggle, sound toggle, rotate toggle etc. A row of buttons, but all done in Flash as a single swf. I'm really just trying to make my standard "panorama starter" file as basic as possible. I think having all standard controls in one simple swf would be good.

    ( By the way Zephyr, I love your photography. It's very crisp and sharp, but has a slightly unusual look. Not HDR but perhaps some sort of extra processing ? )

  • Well, most surroundings are from a real photographs. But the trees and the houses you see are 3dmodels. I combine them both with photoshop, and try to match the colors of the renders with the colors of the photograph. The tour located at w w w[dot] ring zuid gro nin g en[dot]nl/virtual/ shows this better, at the top you have a row of buttons that switch between the different type of infrastructure options.

    Next to that I use the HIGHSHARP filter, and combined with 3d models it sometimes gives a bit "oversharpened" look because, photos are alot softer irl then renders.

  • Hi,

    just use in as3 the same action calls like in the xml,
    the interface to control krpano is always the same (xml, as3, js)

    e.g. - for a simple zoom in button: (it only changes the value of the "movevectorz" variable)


    <plugin name="in" .. ondown="set(movevectorz,-1);"  onup="set(movevectorz,0);" />


    have also a look in the included plugin example source files (.as)

    best regards,

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!