Sie sind nicht angemeldet.

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

Mittwoch, 23. September 2009, 05:22

hotspot/plugin AS3 help!

This relates to another post .

What effectively I'm trying to do is have a speech bubble appear over a hotspot and align with the cursor, that is a graphic overlayed with text generated from a data node in the XML.. Sounds easy!?

In order to get the speech bubble to align with the cursor it needs to be called in showtext() and rendered in the flash html renderer. Ideally it would just be a case of calling an image and using showtext to get the text. However, using this method I don't seem to be able to align the text over the graphic.

Apparently you can call another swf instead of an image via showtext, so my idea was to create the graphic in the swf and have a dynamic textfield which would then be populated from the datanode via a new variable. This would be set each time a hotspot is accessed on the onover with a new showtext in the onhover.

Something like this -

Quellcode

1
2
3
4
5
6
7
		trace(name);
		hs_text_set(get(name),get(lang));
				
	
		
    	set(hstext,get(data[%2_%1].content));
		set(hotspot[%1].onhover,showtext([textformat leftmargin='50'][br][img src='hs.swf' width='180' height='180'/][br][/textformat],hsimage));


My problem is that I don't know AS3 and what I'm trying to do is get this dynamic textfield in the swf to be populated with the variable hstext.

I've tried to write it by a combination of copying stuff I've found and complete guesswork and it's not really getting me anywhere.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import krpano_as3_interface;

var krpano:krpano_as3_interface;

krpano = krpano_as3_interface.getInstance();

public var hstext.String;

function sethstext(val:String):void
	{			   
getInstance():krpano_as3_interface;

get(hstext:String):*

	}


Anyone out there who knows AS3 could maybe point me in the right direction? *blink*

The other question I really need answering is 'am I wasting my time and is this method going to work?' *confused*

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »viewinz« (23. September 2009, 06:19)


2

Donnerstag, 24. September 2009, 11:25

Hi,

just one note - it is possible, but not with a few of lines
I will prepare an example but this will take some time...

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

3

Dienstag, 13. Oktober 2009, 10:34

Klaus, have you had a chance to look at this?

4

Dienstag, 13. Oktober 2009, 10:36

I've started with it, but it's not ready yet...

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

5

Montag, 25. Januar 2010, 04:14

Klaus did you ever get a chance to finish this?

6

Montag, 25. Januar 2010, 10:33

Hi,

sorry, I still had no time for that,

but maybe have a look at this code:
Possible to open textfield on cursor ?

best regards,
Klaus