You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 969

Location: Netherlands

Occupation: Web developer

  • Send private message

1

Wednesday, June 3rd 2009, 11:07am

include plugin in a swf?

Hi, me again =p

I'm making a textfield plugin for a menu for in krpano. With your help I managed to include the nessecary xml for the menu in the krpano xml. Only now I got a question. 1 part of the menu is a textfield that loads information concerning the panorama. I want this to be as flexible as possible, so my initial setup was with a txt file that gets loaded based on a id. However I want to include css styles too.

html data + css data in a textfield. Well that sounds as the plugin you made. So I looked at the code, trying to figure it out. Is there a way, to trigger the textfield class to create a textfield in my internal swf?

this is what I have:

Source code

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
<textstyle name="menutextstyle"
		font="Verdana"
		fontsize="10"
		textcolor="0xFFFFFF"
		textalign="center"
		xoffset="0"
		yoffset="0"
/>
<!--Menu plugin-->
<plugin name="menu" url="../menu/aMenu.swf" align="topright" edge="topright" x="30" y="4" keep="true" visible="true"  handcursor="false" zorder="105" 
		barwidth="226" 
		barheight="16"	
		padding="1" 
		expanded="3" 
		colorbegin="0x33a1c6" 
		colorend="0x207dba" 
		baralpha="0.8"
		overcolorbegin="0xff9900" 
		overcolorend="0xcc9933" 
		overalpha="1" 
		contentcolor="0xFFFFFF" 
		contentalpha="0"
		textstylename="menutextstyle"
>
	<menuitem name="n1" title="Description" sourcepath="menu/info.swf" height="400" />
</plugin>
<!--CSS data info.swf should read-->
	<data name="info_cssdata">
	    a { color:#0000FF; }
	    a:hover { color:#FF0000; }
	</data>
<!--html data info.swf should read-->
	<data name="info_htmldata">
	    <b>Hello from Flash HTML</b><br/>
	    <a href="event:set(plugin[txt].visible,false);">
	    	close this window
	    </a>
	</data>


So within the info.swf I want a textfield to be generated based on <data> The name of the data will be hardcoded. How would I accomplish this? In theory it wouldn't matter if I used the textfield to generate something in krpano or use the krpano api to generate it in the swf. As long as it has its data objects.
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Zephyr

Professional

  • "Zephyr" started this thread

Posts: 969

Location: Netherlands

Occupation: Web developer

  • Send private message

2

Wednesday, June 3rd 2009, 3:25pm

Never mind I got it =) Just removed some code that checks if there is a stage (normally there isn't when in krpano, but now there is).
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).