Sie sind nicht angemeldet.

1

Donnerstag, 4. März 2010, 23:28

Disabling image text wrap

Hi there

I'd like to add a picture and some text to a textfield, but I'm having some problems, as some of the text is placed under the image. I guess I couldfix it by adding br's, but I wonder if there's a better way.

Here's the code and what happens:

Quellcode

1
2
<data name="html"><b>Test</b><p><img src="files/050609-ChinesePharmacy.jpg"/></p>
some text doesn't appear because it's under the image, but then the rest of it does.</data>  




Setting the image alignment to "right" allows to see better what's happening:

Quellcode

1
2
<data name="html"><b>Test</b><p><img align="right" src="files/050609-ChinesePharmacy.jpg"/></p>
some text doesn't appear because it's under the image, but then the rest of it does.</data>  



And even if the image is bigger, the text is still under it (you can see it on the left through the transparency)


Am I doing something wrong? Or are the br's the way to go?

Thanks
Manuel
PanoTag: Facebook tagging for krpano

KRPano development and more: http://www.digisfera.pt/en/development

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »emediquei« (4. März 2010, 23:42)


2

Freitag, 5. März 2010, 21:35

try resizing the width of the textfield plugin. Checking your code to this example might help too.

http://krpano.com/examples/textfield/

3

Freitag, 5. März 2010, 22:20

or make your jpeg smaller.

4

Sonntag, 7. März 2010, 21:43

Hi Manuel,
Am I doing something wrong? Or are the br's the way to go?
After many tries, it seems that <br/> is the way....

As Jarredja already said, have a look to the textfield example from Klaus.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
	<data name="html1">
		<p align="center"><font face="times" size="+4"><b>Hello from Actionscript HTML</b></font></p><a href="event:action(loadpano);"><img src="image.jpg" /></a>
		styles test:<br /><b>bold</b><br /><i>italic</i><br /><u>underlined</u><br /><br />
		links test:<br /><a href="http://www.krpano.com">open krpano site</a><br /><a href="event:lookto(0,0,130);lookto(90,0,150);">do some lookto actions</a><br /><a href="event:action(move,htmltext);">click to move field</a><br /><a href="event:action(show_html_field2);">open second field</a><br /><br />
		color test:<br /><font color="#FF0000">red </font><font color="#00FF00">green </font><font color="#0000FF">blue</font><br /><br /><br /><br />
		list test:<br /><li><ul>list1</ul><br /><ul>list2</ul><br /><ul>list3</ul><br /></li><p align="left">
		left align test left align test left align test left align test left align test<br />
		left align testleft align testleft align test<br /></p><p align="center">
		center align test center align test center align test center align test center align test<br />
		center align test center align test center align test<br /></p><p align="right">
		right align test right align test right align test right align test right align test<br />
		right align test right align test right align test<br /></p><p align="center"><font size="+4"><a href="event:action(hidewindow,htmltext);action(showbutton);">close window</a><br /></font></p>
	</data>

In this example, the text after the image is wrapped on the right of the image because of the textfield plugin width that is greater than the image...
The list text is displayed under the image because of the serie of <br/>...

Here the code, based on your datas, I used in my tries:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<plugin name="htmltext" url="../textfield.swf" 
    	visible="false"
		origin="top" 
    	x="0" y="0" 
		width="261" height=""
    	html="data:htmldata1"
    	css="data:cssdata1"
    	borderwidth="1"
    	background="true"
    	selectable="false"
    	autosize="center"
    	/>
<data name="htmldata1">
<textformat leftmargin="20" rightmargin="20">
<br/><b>Test</b><p><img width="201" height="300" align="right" src="../images/burren/0001b.jpg"/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
some text doesn't appear because it's under the image, but then the rest of it does.</p><br/>
</textformat>
</data>	

Lots of <br/> for make the text displayed under the image...
Note the textformat tag ... good to know to help formatting...

Conclusion, textfield.swf is no really accurate to format an html... But here it is, helping to make some stuff...

SAlut.

5

Montag, 8. März 2010, 11:14

Thanks a lot. I'll do it that way then.

Cheers
PanoTag: Facebook tagging for krpano

KRPano development and more: http://www.digisfera.pt/en/development

Ähnliche Themen