[Xerte] Object Text vs HTML
Marc Torruella Altadill
mtorruella at viguera.com
Wed May 27 09:12:09 BST 2009
Thank you all for the feedback,
The thing is that we have a template with a unique textfield, that we can
fill with either text or text and images. So we are limited to "html"
formatting.
The best thing is to create some kind of dynamic template where you can add
graphic icons and text icons at your will depending on the page you are
creating. When adding a graphic icon I would do the things you purpouse.
But we don't have time to implement that now, I fear.
So we will do some ugly "white space adding technique" for the 3 pages where
we have this problem. And forget about it for a while.
Your feedback is amazing, I'm gladly surprised and really grateful.
De: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] En nombre de Julian Tenney
Enviado el: martes, 26 de mayo de 2009 19:23
Para: Xerte discussion list
Asunto: RE: [Xerte] Object Text vs HTML
It isn't pretty. But there is no way of knowing how big an image is when you
load it up using the <img> tag - there is no onLoad or anything to use to
find things out. Am I missing something? Flash only supports a very small
set of styles.
_____
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Patrick Lockley
Sent: Tue 26/05/2009 18:17
To: Xerte discussion list
Subject: RE: [Xerte] Object Text vs HTML
bad coder idea
why not pad the image so at its smallest it is equal to the width of the
smallest text field.
Then note this down (like a html min width) and then increase the x of the
image according to the size of the text field?
_____
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Paul Swanson
Sent: Tue 26/05/2009 18:13
To: Xerte discussion list
Subject: RE: [Xerte] Object Text vs HTML
You could use two text icons, one for the above graphic text and one for
below. Load the image into a graphic icon as Julian suggests, then use an
onLoad event to get the image width and height once it has loaded. Now you
can center the image with code:
newX = (Stage.width / 2) - (img._width / 2); // calculate starting x when
centered
newY = img._y; // don't change starting y
img.move(newX,newY); // move to centered position
img.fadeIn(10); // make it fade in
At this point you could use img._height to position the below image text
icon. If you set the h property of the above image text icon, you could use
that, along with the height of the image to position the y coordinate of the
image, add the image height to determine the position of the bottom of the
image, and that will tell you where the y coordinate of the below image text
icon should be.
Paul
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: Tuesday, May 26, 2009 9:59 AM
To: Xerte discussion list
Subject: RE: [Xerte] Object Text vs HTML
so far my hunting has only found that align="left" and align="right" work.
"center" doesn't appear to be supported by the lfash player. Taking Xerte
out of the picture, can you get this to work in Flash directly? Let's prove
your colleague right or wrong first...
I cannot get it to work in Xerte either. I've tried stylesheets, attributes
on the <p> and <img> tags, and setting the text using code to prevent any
internals overriding anything - and no dice.
Can you fake it by using a text field the same size as the image, and
positioning the text field so that it is in the middle of the screen?
The next problem is that there is no onLoad event fired by textFields when
images load, so you have no way of dynamically finding out how wide the
image loading into the textfield is. You can work around that by loading
the image first into a graphic icon, handling its load event with an
interaction icon, deleteing the graphic from the stage and usig the info you
can find out in the event handler to set up the rest of the page? Ugly
workaround, I know... but if it isn't supported it isn't supported.
_____
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Julian Tenney
Sent: Tue 26/05/2009 17:31
To: Xerte discussion list
Subject: RE: [Xerte] Object Text vs HTML
what path are you using for the image?
If relative it needs to be relative to XMLEngine.swf. FileLocation is not
evaluated in an html <img> tag. Does it work when published in the browser?
_____
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Marc Torruella
Altadill
Sent: Tue 26/05/2009 17:00
To: 'Xerte discussion list'
Subject: RE: [Xerte] Object Text vs HTML
Thank you, but already tried that and doesn't work.
But knowing it's a flash textfield thing, we will check google the almighty.
Many thanks once again,
Marc
De: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] En nombre de Julian Tenney
Enviado el: martes, 26 de mayo de 2009 17:52
Para: Xerte discussion list
Asunto: RE: [Xerte] Object Text vs HTML
Not a Xerte thing. You are accessing a Flash textfield. IconID.txt is the
reference if you want to access it directly. Not all the HTML is supported,
but Xerte text icons can do everything that Flash textfields can do.
<p align="center"><img src="blah"></p>?
_____
From: xerte-bounces at lists.nottingham.ac.uk on behalf of Marc Torruella
Altadill
Sent: Tue 26/05/2009 15:17
To: 'Xerte discussion list'
Subject: [Xerte] Object Text vs HTML
Hello all,
We are using the xerte's object text with html and seems to recognize some
tags, but not all and not "good enough".
We want a paragraph, then a centered image, and under it another text
paragraph. But we get the text at the right side of the image, not below.
We have a simple content like this:
<p> Some large text </p>
<img src="some_url"/>
<p> More large text </p>
Any workarounds?
It may be a silly question but my college insists its not a simple flash
issue but a xerte's object text thing. What you think?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090527/1aec1722/attachment.html
More information about the Xerte
mailing list