Sie sind nicht angemeldet.

Gerard

Anfänger

  • »Gerard« ist der Autor dieses Themas

Beiträge: 13

Wohnort: Netherlands

Beruf: Professional Photographer

  • Nachricht senden

1

Montag, 17. Januar 2011, 10:18

animated button in Textfield possible ?

Hi,
I'm trying to get an animated button (= image Scale and Alpha ) working in a Textfield. Is this possible ?
In the default.xml file it works perfectly.

Hope someone can help *question*

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
<plugin name="thumb-alfama-01" 
url="../../thumbs/thumb-Alfama.jpg" 
align="leftbottom" 
x="30" 
y="180" 
alpha="0.8" 
scale="0.8" 
zorder="2" 
onhover="showtext(Go to panorama Alfama,buttonstyle);" 
onover="tween(alpha,1.0); tween(scale,1.0));" 
onout="tween(alpha,0.8); tween(scale,0.8));" 
onclick="loadpano('../alfama/pano_01-USM.xml', null, MERGE, BLEND(2));" 
/>

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Montag, 17. Januar 2011, 10:27

Text in the textfield plugin is html code so it doesn't go by krpano xml api.

You could create a krpano xml plugin, that is a animated button, and place it above the textfield plugin using a higher zorder. This is handy for instance when you want to create a close button below or above the textfield. But text doesn't wrap around this button (since its another zorder)

Another way would be maybe, using CSS styles. but I doubt that would work since not everything is supported by Flash. You could create an a link with font-size 12 and a:hover link with font-size 13. or change the color.

Quellcode

1
2
3
4
5
<plugin url="textfield.swf" css="data:textCSS" html="..." />
<data name="textCSS">
a{size: 12px}
a:hover{size:13px}
</data>

Gerard

Anfänger

  • »Gerard« ist der Autor dieses Themas

Beiträge: 13

Wohnort: Netherlands

Beruf: Professional Photographer

  • Nachricht senden

3

Dienstag, 18. Januar 2011, 10:46

Zephyr,

Thanks for the help, most appreciated *thumbup*

Gerard

4

Dienstag, 18. Januar 2011, 15:29

<plugin url="textfield.swf" css="data:textCSS" html="..." />
<data name="textCSS">
a{size: 12px}
a:hover{size:13px}
</data>


i tested this and it does not work. you cannot change the color or size via CSS. i wish we could.

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Dienstag, 18. Januar 2011, 15:37

it's possisble to play swf in a textfield..

maybe that helps?

Tuur *thumbsup*

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

6

Dienstag, 18. Januar 2011, 15:54

you can use the img tag to add a swf in the textfield, but that would be my last option.

You can define hover states of a links
http://www.adobe.com/livedocs/flash/9.0/…d.html#htmlText

Zitat

You can also define a:link, a:hover, and a:active styles for anchor tags by using style sheets.

from Livedocs

but I made a mistake. size: 12px won't work. font-size is the correct tag.

<plugin url="textfield.swf" css="data:textCSS" html="..." />
<data name="textCSS">
a{font-size: 12px}
a:hover{font-size:13px}
</data>

Ähnliche Themen