|
|
PanoSalado: autorotator, cursors, interface, etcWell, it is just about time for an update to PanoSalado. I've made a few significant changes to the architecture, implemented the autorotator, and coded a "first-draft" implementation of custom cursors. First up, the architectural changes. The interface (2d buttons and such), have been moved to interface.swf, so Main.swf loads PanoSalado.swf and interface.swf and any other .swf files in the Main.xml file, and then it orders them at the correct z-index. The benefit of this is that interfaces to PanoSalado can now be made in Flash, Flex, or pure actionscript compiled in either. So a designer can use a preferred tool to make a custom interface, or a designer can use a "stock" interface just by switching the .swf that is loaded in Main.xml. This will make it really easy to skin a tour. Here is a sample of the main xml file: <main>
<layer id="PanoSalado" url="PanoSalado.swf?xml=PanoSalado.xml" depth="0"/> <layer id="Interface" url="interface.swf" depth="1"/> <layer id="Cursor" url="Cursor.swf" depth="10"/> </main> Communication between .swf's is handled by direct actionscript calls, but for convenience, you can use the same command from interface.swf as you would have used in the XML for PanoSalado. Here is a comparison, so you can see what I mean: container.autorotate.addEventListener(MouseEvent.MOUSE_DOWN, autorotatePress, false, 0, true);
function autorotatePress(e:MouseEvent):void <stageAlignedSprite id="toggle_autorotator"
align="br" offsetX="-254" offsetY="-47" onPress="toggleAutorotator" > <file>graphics/rotate_normal.png</file> </stageAlignedSprite> Both of them pipe "toggleAutorotator" into the execute function. Note that it is still possible to put interface buttons in the XML for PanoSalado, using syntax like the above, if desired. Next up, this is a relatively minor item, the autorotator works now. Whee! And, it is of course all configurable in the XML. And lastly, I put together a custom cursor extension based on the very nice cursors from hum@no.id (who I think is associated with the Deval player). Thanks for the cursors! The implementation of the cursors is not perfect, due to things that I can fix, and other things I can't fix. What I can't fix is that Flash Player is single-threaded, and everything runs at the same frame rate, so when something (rendering the scene in Papervision) brings the frame rate down, the cursor becomes jerky, since it is just a bitmap being moved each frame to the position of the (invisible) mouse pointer. Any Flash based panorama player is going to suffer from the same problem. The other, fixable problem is that the custom cursors hide the hand cursor when mousing over buttons, so watch for that to be fixed eventually. Here is the updated PanoSalado demo: Zephyr
|
New forum topicsRecent commentsWho's onlineThere are currently 0 users and 4 guests online.
|
thnx Patrick... *Over btns
thnx Patrick...
*Over btns not show Hand cursor
Hands and cursors in PanoSalado
Over btns not show Hand cursor
There is no pleasing you is there?
I just noticed that too; that's an easy enough fix I think.
Cheers,
Hand Cursor and Custom Cursors
Yes, you are right. I mentioned in the post that the custom cursors stop the hand cursor from showing up. This can be fixed, but I haven't thought of an elegant, good way to do it yet, so it has not been done.
Zephyr
Hand Cursor and Custom Cursors
Yes, you are right. I mentioned in the post that the custom cursors stop the hand cursor from showing up. This can be fixed, but I haven't thought of an elegant, good way to do it yet, so it has not been done.
Zephyr
Нelper examples with
Нelper examples with Pointers:
KRPano - http://www.krpano.com/panos/sanctuarie/sanctuarie.html
FPP - http://flashpanoramas.com/player/examples/distorted2.html
Custom cursors and hand/pointer on non-pano Objects
Hey there:
I currently have the cursor behaving appropriately in PanoSalado. It's a simple matter of setting "useHandCursor=true" on the appropriate Objects.
[I'm not sure what Moon's links are supposed to show, except other players playing nice.
]
This was much simply=)
This was much simply=)
About Autorotator
Hi there,
I have been trying it, but It seems that cannot be activated thougt the hotspots.
Regards
Autorotator in PanoSalado
Hi Ilie:
The example (linked in the above post) works just fine for me. I can start/stop autorotation all day long!
The AutoRotation button is the one at the far left in the demo. Try again!
What browser/os/flash are you using?
Cheers,
Patrick
Re: Autorotator in PanoSalado
Hi Patrick
The example works fine in firefox and Iexplorer and Flash players 9 and 10 as far as I have check it, the problem comes when you call the autorotator from a hotspot, from the interface buttons works fine.
when you click in the hotspot it stops after the first frame
I have check the code a bit but I am quite new to ActionScript and don't see where could be the problem
Regards
Ilie
Autorotator
Hi Ilie,
If I understand you right, the autorotator button in the interface is working for you, but when you click the green and white bulls-eye hotspot to go to the next pano the autorotator stops. Correct me if I am wrong. The autorotator stops for me when I do this as well, it stops any time you interact with the scene. It could be made so that it does not stop when you click on a hotspot, I suppose. It would require a minor modification in CameraController.as to check and see what has been clicked, and it would require implementing a classification system in PanoSalado.as with a panorama object category, and a not panorama object category. Right now the panorama cube or sphere is not categorized differently than a hotspot, except for the trivial difference that the one hotspot in the scene is a plane, but you could put a cube hotspot in the scene.
Zephyr
Autorotator
Hi, Sorry both.
I'll try to explain myself better.
I have created a hotspot that onclik, and in theory, switch the autorotator on
interactive = "true"
pan="20"
tilt="-80"
segments="2"
oneSide="false"
smooth="true"
onClick="toggleAutorotator"
>
<file>graphics/hotspot.png</file>
</plane>
but once you click the hotspot, it moves one frame and then stops.
Regards
Ilie