This is necessarily going to be different.

The way to discuss this is to say that the <text> tag may use a runtime-specific renderer (for example, *currently* in the Flash 7-8 runtime we use the Flash Text class, and *currently* in the DHTML runtime we use the HTML renderer itself), so we cannot provide pixel- identical output.

By the way, it would be useful to put a notation in to the discussion of <text> to mention the (DHTML-specific) <html> tag -- the <text> tag only supports a very limited subset of HTML, but I don't know whether we filter out non-cross-platform markup on the DHTML runtime, so folks working initially in DHTML may have the impression that <text> can contain arbitrary HTML. We want to position <html> as an embedding solution, and <text> as a formatted text solution.

Also note the really egregious bugs with <img> placement in Flash text blocks. You may not want to use <img> as an example in <text> at all.

jim

On Feb 12, 2007, at 4:31 PM, Philip Romanik wrote:

Hi John,

I got a closer match by inserting a <br/> between the text and image. It still isn't identical though.

Phil


When the program below is compiled for SWF and then for DHTML, the
placement of the image differs.

I rather expect that this has been covered before, so apologies in
advance if I should know what's up.  Is there something I should be
doing differently to ensure identical rendering in swf and dhtml?

Thanks,

jrs

<canvas height="320" >
   <text multiline="true" width="300" height="300">
     Hello dear friends on the Red Planet! How is the Garden today?
     <img src="./images/horse-3.jpg"/>
   </text>
</canvas>



Reply via email to