[Xerte] Object Text vs HTML

Paul Swanson Paul.Swanson at harlandfs.com
Tue May 26 18:13:51 BST 2009


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/20090526/cb836254/attachment.html


More information about the Xerte mailing list