Page 1 of 1

Minimap current location after "openNext" in as3?

Posted: Wed Jul 06, 2011 2:07 pm
by commodore64
hi,

Just 1 more.. : )

In flash as3, if you load next panorama with:
<panoclip>.pano.openNext(<url:String>,<target:String>); // open a new panorama.swf within the current player, target can be "pan/tilt/fov"

How to set current spot location in minimap? (with as3 or using skin actions)
(since minimap skin is embedded in the first .swf..)

I tried adding action to the selected location marker:
loaded : set element location | offset: $ut target: $self

$ut = user data: title, where i wrote the offset target name in each ..swf.. but it didnt work,
Eventhough it display "$ut" correctly in textbox..

This works if I manually type the offset target, but then I'd have to embed the skin to each swf..
loaded : set element location | offset: spot1 target: $self

*edit:
Basically the problem is, "$ut" doesnt work with actions?
make button, add action:
Source= Mouse click
Action = Hide element
Target = $ut

(you have set $ut in userdata: title)

Re: Minimap current location after "openNext" in as3?

Posted: Mon Jul 25, 2011 1:58 pm
by commodore64
temporary solution:

Instead of using AS3 for loading the next swf with ".openNext",
send a button click to your minimap hotspot, then your skin handles the radar etc.

...dispatchEvent(new MouseEvent(MouseEvent.CLICK));

(just need to manually dig the buttons and get their names using .getChildAt())

Re: Minimap current location after "openNext" in as3?

Posted: Thu Sep 29, 2011 11:02 am
by commodore64
hmm.. dispatchevent mouse.click only seems to work in Flash editor,
not after its published as swf/html..

maybe something to do with panorama being separate .swf or security settings..(?)

*edit: fixed, not sure what was the problem but moved the function somewhere else and used the swf on web server, instead of folder..

Re: Minimap current location after "openNext" in as3?

Posted: Mon Oct 10, 2011 12:49 pm
by commodore64
one limitation: "...dispatchEvent(new MouseEvent(MouseEvent.CLICK));"
cannot be used from javascript-to-actionscript.. (it needs actual flash click from user to work)