Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
|
|
Quellcode |
1 2 3 |
visible="true" fillcolor ="0xffffff" fillalpha ="0" fillalphahover="0.4" |
|
|
Quellcode |
1 |
krpano.call("looktohotspot(myHS, 18, smooth(100,50,20);");
|
|
|
Quellcode |
1 |
krpano.call("looktohotspot(myHS, 18, smooth(100,50,20);set(hotspot[myHS].alpha,0.8);");
|
|
|
Quellcode |
1 2 3 4 5 |
function dosometing (mouseevent:MouseEvent):void
{
krpano.call("looktohotspot(myHS, 18, smooth(100,50,20);");
}
|
|
|
Quellcode |
1 |
krpano.call("set(hotspot[myHS].alpha, 0.8);");
|
|
|
Quellcode |
1 |
krpano.set("hotspot[myHS].alpha", "0.8");
|
|
|
Quellcode |
1 2 3 4 5 |
function showHS (mouseevent:MouseEvent):void
{
krpano.set("hotspot[hs_combine].alpha", "0.8");
}
|
Zitat
get / set / call Interface can be used from ActionScript Plugin.
|
|
Quellcode |
1 2 3 4 5 6 |
monBouton.addEventListener(MouseEvent.CLICK, maFonction);
function maFonction(e:MouseEvent):void
{
krpano.set("hotspot[nomDeMonHotspotDansLeFichierxml].alpha", "0.8");
}
|
|
|
Quellcode |
1 2 3 4 5 6 7 |
monBouton.addEventListener(MouseEvent.CLICK, maFonction);
function maFonction(e:MouseEvent):void
{
krpano.set("hotspot[nomDeMonHotspotDansLeFichierxml].alpha", "0.8");
krpano.call("looktohotspot (nomDeMonHotspotDansLeFichierxml, 18, smooth(100,50,20);");
}
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 |
import krpano_as3_interface;
var krpano:krpano_as3_interface = krpano_as3_interface.getInstance();
test.addEventListener(MouseEvent.MOUSE_OVER, maFonction);
function maFonction(e:MouseEvent):void
{
krpano.set("hotspot[hs_combine].alpha", "0.8");
krpano.call("looktohotspot (hs_combine, 18, smooth(100,50,20);");
}
|
Zitat
TypeError: Error #1006: value n'est pas une fonction.
at navigation_fla::MainTimeline/maFonction()[navigation_fla.MainTimeline::frame1:13]
|
|
Quellcode |
1 |
krpano.set("hotspot[hs_combine].alpha", "0.8");
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<plugin name="navigation-test" url="navigation-hs-test.swf" keep="true" preload="false" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" alpha="1.00" blendmode="screen" smoothing="true" align="bottom" edge="" x="-350" y="10" ox="" oy="" width="" height="" rotate="0" parent="" mask="" onloaded="" onover="" onhover="" onout="" ondown="" onup="" onclick="" /> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<hotspot name="hs_combine" keep="true" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" fillcolor ="0xffffff" fillalpha ="0" borderwidth ="0.0" bordercolor ="0xffffff" borderalpha ="0.00" fillcolorhover="0xB50E22" fillalphahover="0.4" borderwidthhover="1.0" bordercolorhover="0xB50E22" borderalphahover="0.50" fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700" onover="set(plugin[titre-combine].visible,true);" onhover="" onout="set(plugin[titre-combine].visible,false);" ondown="" onup="" onclick="action(move);action(show_test);" flying="0" > <point ath="-22.7204" atv=" 7.5905" /> <point ath="-22.8656" atv=" 7.5838" /> <point ath="-22.9137" atv=" 7.8785" /> <point ath="-22.8170" atv=" 7.7414" /> </hotspot> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
import krpano_as3_interface;
var krpano:krpano_as3_interface = krpano_as3_interface.getInstance();
test.addEventListener(MouseEvent.MOUSE_OVER, maFonction2);
function maFonction2(e:MouseEvent):void
{
krpano.set("hotspot[hs_combine].alpha", "0.8");
krpano.call("looktohotspot (hs_combine, 18, smooth(100,50,20);");
}
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
<!-- test --> <hotspot name="hs_combine" keep="true" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" fillcolor ="0xffffff" fillalpha ="0" borderwidth ="0.0" bordercolor ="0xffffff" borderalpha ="0.00" fillcolorhover="0xB50E22" fillalphahover="0.5" borderwidthhover="1.0" bordercolorhover="0xB50E22" borderalphahover="0.50" fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700" onover="" onhover="" onout="" ondown="" onup="" onclick="" flying="0" > <point ath="-41.3950" atv=" 15.2905" /> <point ath=" -4.9729" atv=" 20.0814" /> <point ath=" -5.8322" atv=" 25.8963" /> <point ath=" -2.0872" atv=" 25.9983" /> <point ath=" -4.8294" atv=" 41.2939" /> <point ath="-56.1649" atv=" 25.9471" /> </hotspot> test --> <plugin name="navigation-test" url="navigation-hs-test.swf" keep="true" preload="false" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" alpha="1.00" blendmode="screen" smoothing="true" origin="lefttop" edge="" x="" y="" width="" height="" rotate="0" parent="" mask="" onloaded="" onover="" onhover="" onout="" ondown="" onup="" onclick="" /> |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Vinyl« (15. Januar 2010, 17:19)
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
import krpano_as3_interface;
var krpano:krpano_as3_interface = krpano_as3_interface.getInstance();
test.addEventListener(MouseEvent.MOUSE_OVER, maFonction2);
function maFonction2(e:MouseEvent):void
{
krpano.set("hotspot[hs_combine].fillalpha", "0.8");
krpano.call("looktohotspot (hs_combine, 18, smooth(100,50,20);");
}
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<hotspot name="hs_combine" keep="true" visible="true" enabled="true" handcursor="true" capture="true" children="true" zorder="0" fillcolor ="0xffffff" fillalpha ="0.00" borderwidth ="0.0" bordercolor ="0xffffff" borderalpha ="0.00" fillcolorhover="0xb50e22" fillalphahover="0.50" borderwidthhover="1.0" bordercolorhover="0xb50e22" borderalphahover="0.50" fadeintime="0.150" fadeouttime="0.300" fadeincurve="1.100" fadeoutcurve="0.700" onover="" onhover="" onout="tween(fillalpha,0)" ondown="" onup="" onclick="" flying="0" > <point ath="-41.3950" atv=" 15.2905" /> <point ath=" -4.9729" atv=" 20.0814" /> <point ath=" -5.8322" atv=" 25.8963" /> <point ath=" -2.0872" atv=" 25.9983" /> <point ath=" -4.8294" atv=" 41.2939" /> <point ath="-56.1649" atv=" 25.9471" /> </hotspot> ..... |
Yes...Then no action appends (onout action does not append )... To make the onout action be executed you must first be onover...
Zitat
it might not work , ..... your mouse is physically outside the "hs-combine" plugin.
... so better to set(filllapha,0) instead of tween.|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
test2.addEventListener(MouseEvent.MOUSE_OVER, maFonction);
function maFonction(e:MouseEvent):void
{
krpano.call("looktohotspot (hs_combine, 50, smooth(100,50,20);");
}
test2.addEventListener(MouseEvent.MOUSE_OUT, maFonction2);
function maFonction2(e:MouseEvent):void
{
krpano.call("looktohotspot (hs_combine, 100, smooth(100,50,20);");
}
|
For me, button 1 works always well !!! only one case does not work.... when the view is already the same as the one from the looktohotspot (hs_combine, 18, smooth(100,50,20);.... in this case, the fillalpha seems to not be changed... in fact it is changed but it is not displayed because there is no refresh of the view...
Zitat
i've tried your code but it doesn't work. But the idea is good... I've tested your code, it is "button 1" in my example. Sometimes, it shows the hotspot, sometimes not.
|
|
Quellcode |
1 2 3 4 5 6 |
function maFonction2(e:MouseEvent):void
{
krpano.set("hotspot[hs_combine].fillalpha", "0.8");
krpano.call("looktohotspot (hs_combine, 18, smooth(100,50,20);");
krpano.call("updatescreen()");
}
|
http://www.republicofcode.com/tutorials/flash/as3events/ (look inside Event Targets and Event Propagation)The target is not always the object in the display list that registered the event listener. Use the currentTarget property to access the object in the display list that is currently processing the event.
Hope this can help...The MovieClip myMenu_mc has three children, these are my1_btn, my2_btn, and my3_btn. The event listener function registered with myMenu_mc refers to e.target instead of e.currentTarget so that it refers to the actual button clicked and not the display object container that hosts them.
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
test2.mouseChildren = false;
test2.addEventListener(MouseEvent.MOUSE_OVER, maFonction);
function maFonction(e:MouseEvent):void
{
krpano.call("looktohotspot (hs_combine, 50, smooth(100,50,20);");
}
test2.addEventListener(MouseEvent.MOUSE_OUT, maFonction2);
function maFonction2(e:MouseEvent):void
{
krpano.call("looktohotspot (hs_combine, 100, smooth(100,50,20);");
}
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
test2.addEventListener(MouseEvent.MOUSE_OVER, maFonction);
function maFonction(e:MouseEvent):void
{
krpano.call("trace(The mouse is OVER);");
}
test2.addEventListener(MouseEvent.MOUSE_OUT, maFonction2);
function maFonction2(e:MouseEvent):void
{
krpano.call("trace(The mouse is OUT);");
}
|
...