that's a good solution!
Zitat
Just create a plugin with 100% width and height something like a 1x1 pixel image. Set alpha to 0, and onhover the showtext function. Then onclick, remove the plugin.
that would be also possible (with 1.0.8 beta 9):
Zitat
Alternatively, could I get a textfield to follow the mouse?
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<plugin name="text" url="textfield.swf" ...
align="lefttop"
onloaded="follow_the_mouse(get(name));"
/>
<action name="follow_the_mouse">
add(plugin[%1].x, mouse.x, 10);
add(plugin[%1].y, mouse.y, 10);
delayedcall(0.01, follow_the_mouse(%1));
</action>
|
</plugin>Hi,
that's a good solution!
Zitat
Just create a plugin with 100% width and height something like a 1x1 pixel image. Set alpha to 0, and onhover the showtext function. Then onclick, remove the plugin.
that would be also possible (with 1.0.8 beta 9):
Zitat
Alternatively, could I get a textfield to follow the mouse?
e.g.
![]()
Quellcode
1 2 3 4 5 6 7 8align="lefttop" onloaded="follow_the_mouse(get(name));" /> add(plugin[%1].x, mouse.x, 10); add(plugin[%1].y, mouse.y, 10); delayedcall(0.01, follow_the_mouse(%1));
best regards,
Klaus
Hi,
Hi Klaus
With the codes you posted, I get this folloing error -
""XML parser error: element is malformed (#1090)"
any idea?
Make sure you didn't include the ellipses from Klaus' example (the "..." were to indicate more attributes go here).
Here's a working example of a moving textfield (although I think using polygonal hotspots with onhover=showtext(hello world) is the more straightforward way to implement this).
![]()
Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18<krpano version="1.0.8" > <plugin name="text" url="%SWFPATH%../plugins/textfield.swf" html="hello world" height="20" width="100" align="lefttop" onloaded="follow_the_mouse(get(name));" /> <action name="follow_the_mouse"> add(plugin[%1].x, mouse.x, 10); add(plugin[%1].y, mouse.y, 10); delayedcall(0.01, follow_the_mouse(%1)); </action> <preview type="grid(cube,16,16,512,0xCCCCCC,0x444444,0x999999);" details="16" /> </krpano>