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)
Minimap current location after "openNext" in as3?
-
- Posts: 40
- Joined: Mon Feb 16, 2009 11:38 am
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())
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())
-
- Posts: 40
- Joined: Mon Feb 16, 2009 11:38 am
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..
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..
-
- Posts: 40
- Joined: Mon Feb 16, 2009 11:38 am
one limitation: "...dispatchEvent(new MouseEvent(MouseEvent.CLICK));"
cannot be used from javascript-to-actionscript.. (it needs actual flash click from user to work)
cannot be used from javascript-to-actionscript.. (it needs actual flash click from user to work)