Sie sind nicht angemeldet.

1

Sonntag, 3. Januar 2010, 09:24

Combo & image in textfield

I'm trying to build a textfield that contains:

1) a combo box which is used to select a new panorama scene
2) when you select this new scene, the main content of the textbox changes to some new info & an image

So the idea is the combo box might have "garden" "rooftop" and "hall". You select "garden" and the textbox shows some info about the garden and a picture, while the main panorama changes to show the garden.

But I can't seem to get the combo box inside the textfield and am not sure how to simultaneously change the textfield, image and pano.

Any clues or maybe an example ?

thanks *smile*

2

Sonntag, 3. Januar 2010, 17:16

i dont think you can out a combobox inside a textfield. you would have to just hover on top of so it looked like it was inside. using the parent attribute should do that. here is an example of a project i did that has the content of a textfield change based on what was clicked.

www.virtualnorthland.com/panos/world/

3

Sonntag, 3. Januar 2010, 17:52

Your Zoo tour ! I remember it well, very detailed. And I just had to click on the kangaroo to remind myself what they sound like. Poor form for an Australian ;-)

No combos in the textfield makes sense. And I'm sort of relieved because I thought I'd tried all the combinations.

So what's the best way to display a different image for each click of the combobox AND change the panorama ? If I make each image a plugin and use keep=false then I suppose I won't have to remove the image when the next panorama (and image) loads ?

So should I create an action to load the image and attach that to each combobox menu item action ?

Or is there an easier way ?

4

Montag, 4. Januar 2010, 05:34

I'm now thinking that textfields are far too messy and complex. Instead I'm going to try using straight image plugins and lay the combobox on top. When the combobox loads a new pano it'll also load a new image. The visible on/off toggle may be a bit more tricky since instead of targeting a single textfield (with whatever's been loaded inside), it'll need to target each plugin image by name. But I think this is still easier than futzing about with textfields.

5

Montag, 4. Januar 2010, 23:34

Hi Richard,

Zitat

The visible on/off toggle may be a bit more tricky since instead of targeting a single textfield (with whatever's been loaded inside), it'll need to target each plugin image by name.
Instead of creating a plugin for each image, perhaps you can create only one image plugin and set dynamically his url through each combobox actions...
Something like this:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
....
	<plugin name="image"
    		url="" 
    		align="top" 
    		y="30" 
    		keep="true"
    		/>
	
	<plugin name="combobox"
    		url="%SWFPATH%/plugins/combobox.swf" 
    		align="top" 
    		y="10" 
    		keep="true"
    		onloaded="action(setupitems);"
    		/>
	
	<action name="setupitems">
		removeall();
		additem(Item 1, set(plugin[image].url,images/01.png); );
		additem(Item 2, set(plugin[image].url,images/02.png); );
		additem(Item 3, set(plugin[image].url,images/03.png); );
	</action>
....


SAlut.

6

Samstag, 9. Januar 2010, 13:50

This is great ! I will be trying to put this into a new tour I'm doing this week :-)

You always have the good solutions Michel *g*

(ps: It will also have your double-click "move to" solution which works beautifully)

Ähnliche Themen