Sie sind nicht angemeldet.

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.

viewinz

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

Beruf: Trying to build an entire walkthrough of NZ for tourists

  • Nachricht senden

1

Samstag, 19. September 2009, 05:38

align textfield with cursor

How do I align the textfield with the cursor?

I've tried align="cursor" and original="cursor" with no luck.. any ideas?

I want the html text effect in the textstyles document, in a graphic (speech bubble) that moves with the cursor.

2

Sonntag, 20. September 2009, 12:44

Hi viewinz,

Why to not use the showtext action in combination with a <textstyle> ?
<textstyle> have the attribute origin to set textposition to mouse cursor :
origin
"cursor" - set textposition to mouse cursor (=default)
for a fixed positon on screen use one of these values:
"lefttop", "left", "leftbottom", "top", "center", "bottom", "righttop", "right", "rightbottom"

A possible code would be something like this:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<textstyle name="SpeechBubble"
	   font="Arial"
	   fontsize="20"
	   border="false"
	   effect="glow(0xFFFFFF,1,16,4);"
	   bold="true"
	   background="true"
	   origin="cursor"
	   edge="leftbottom"
	   xoffset="-10"
	   yoffset="-20"
	   />

<some plugin or hotspot>
	......
	onhover="showtext(Quoi de neuf[br]docteur ?,SpeechBubble);"
	......
	/>


Perhaps this can do the job. *smile*

A new tag for the showtext action as something like [img src=""] would be great to do something like what you are looking for... *rolleyes*
Or a new attribute for the <plugin> node like origin="cursor"...
Klaus, perhaps this can be implemented on future version. *smile*

Salut.

3

Montag, 21. September 2009, 23:55

A new tag for the showtext action as something like [img src=""] would be great to do something like what you are looking for... *rolleyes*
that will work
the '[' and ']' are will be just replaced by '<' and '>'
but the HTML Renderer of the Flashplayer is really buggy, especially the <img> tag,
I found the following solution - a [br] is needed before and after the [img] to make it visible,
but then the image is still a bit cutted, to fix this too - use a [textformat] tag with a leftmargin,
e.g.

Quellcode

1
... onhover="showtext([textformat leftmargin='20'][br][img src='krpano_logo.png' width='180' height='50' /][br][/textformat], imagetextstyle);"


and this would be a textstyle for such: (disabled background, border, ...)

Quellcode

1
<textstyle name="imagetextstyle" background="false" border="false" origin="cursor" edge="leftbottom" xoffset="-40" yoffset="10" />



[quote='michel',index.php?page=Thread&postID=7901#post7901]Or a new attribute for the <plugin> node like origin="cursor"...
Klaus, perhaps this can be implemented on future version. *smile* [/quote]maybe, but making all plugins listen to mouse moves will not be good for performance [img]wcf/images/smilies/wink.png[/img]

best regards,
Klaus

viewinz

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

Beruf: Trying to build an entire walkthrough of NZ for tourists

  • Nachricht senden

4

Dienstag, 22. September 2009, 07:04

Brilliant. Got that working great!

Next question - how do I lay text over the image? i.e. speech bubble background, with text in the bubble?

I've had a look at the livedocs regarding this and it seems it might be difficult.

Would a better way to be maybe make the graphic (speech bubble) into an swf and get the text into there? Not sure how I would do that as it needs to be generated from the xml datasource. Would I do something like create a dynamic textfield over the image with the variable 'hstext' in the new swf and in the xml on the onover set the variable 'hstext' as the relevant data content? My flash knowledge isn't great so before I embark on this and spend days over it I would like to know it's possible! *confused*

The other thought I had was in the onover make the cursor the graphic, would that work?

Thanks lots for your help! *cool*

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »viewinz« (22. September 2009, 08:49)


5

Dienstag, 22. September 2009, 09:25

Hi viewinz,

I have tried to call 2 showtext action (one with the bubble background, the other with the text foreground) in different way but it seems that showtext action can be called only 1 time... the last call is the one it is displayed... *sad*
Do not see a way to do... *confused*

Salut.

viewinz

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

Beruf: Trying to build an entire walkthrough of NZ for tourists

  • Nachricht senden

6

Mittwoch, 23. September 2009, 08:12

Michel,

Thanks for that. I tried that also. I also tried multiple hotspots and changing the zorder etc, all with the same result - only one showtext works.

I'm hoping their might be a solution from the other method I thought might work

Next thing I'll going to try is setting the cursor to a graphic and seeing if the showtext will overlay that!? *unsure*

viewinz

Fortgeschrittener

  • »viewinz« ist der Autor dieses Themas

Beiträge: 145

Wohnort: Wellington, New Zealand

Beruf: Trying to build an entire walkthrough of NZ for tourists

  • Nachricht senden

7

Donnerstag, 24. September 2009, 01:47

getting there.. Just need to keep the graphic showing on cursor when hotspot is accessed

I've had limited success by changing the cursor. I can get the cursor to change to the graphic, and hopefully show text should overlay it.

BUT.. when you roll over a hotspot, the cursor disappears.

And before you ask, handcursor="false"!

Quellcode

1
<hotspot name="pier2ferry" ath="-150" atv="0"         keep="false"         visible="true" enabled="true" handcursor="false" capture="false" children="false" zorder="10"         fillcolor     ="0xffffff" fillalpha     ="0.00" borderwidth     ="0.0" bordercolor     ="0xffffff" borderalpha     ="0.00"         fillcolorhover="0xffffff" fillalphahover="0.30" borderwidthhover="0.0" bordercolorhover="0xffffff" borderalphahover="0.00"         onover="set(cursors.url, %SWFPATH%/hs.png)"         onhover=""         onout=""         ondown="hs(ferry,ferry2pier)"         onup=""         onclick="" onloaded=""         flying="0"><point ath="178.2174" atv=" -1.4540" /><point ath="-125.5751" atv="  0.1901" /><point ath="-126.1102" atv=" 11.4175" /><point ath="-151.2046" atv=" 21.4357" /><point ath="177.8108" atv="  2.4959" /><point ath="173.8779" atv="  1.6940" /><point ath="174.0857" atv=" -0.0742" /><point ath="177.6207" atv="  0.1228" /></hotspot>



Anyone know how to change the cursor and keep the cursor changed while over a hotspot and with showtext appearing over the new cursor?

8

Donnerstag, 24. September 2009, 08:33

Hi,
Next question - how do I lay text over the image? i.e. speech bubble background, with text in the bubble?
I think that will not be possible with only xml at the moment...
(showtext() can only show one text at one time at the moment)

Would a better way to be maybe make the graphic (speech bubble) into an swf and get the text into there? Not sure how I would do that as it needs to be generated from the xml datasource. Would I do something like create a dynamic textfield over the image with the variable 'hstext' in the new swf and in the xml on the onover set the variable 'hstext' as the relevant data content? My flash knowledge isn't great so before I embark on this and spend days over it I would like to know it's possible! *confused*
doing it via AS3 would be possible of course,
but it will require some as3 knowledge...

I will try to post an example here:
http://www.krpano.com/forum/wbb/index.ph…D=7971#post7971


The other thought I had was in the onover make the cursor the graphic, would that work?
no, on hover the cursor will change again...
but in the case it would work, you had also only a graphic, without text...

best regards,
Klaus

Ähnliche Themen