Groups | Blog | Home
all groups > macromedia flash sitedesign > july 2006 >

macromedia flash sitedesign : Embedding images, swf in dynamic txt field



veverica
7/21/2006 9:44:50 PM
The text is being called in just fine, styled as I wanted with html tags and an
external css but the images and swfs that I want inline are a no-show. Here's
the code. See anything wrong?

info=<p><span class="big"><span class="center">GET DESERVED<br>10
PERCENT<br>ON
REFERRALS</span></span>[/B]<br>Bulletproof Webmaster referral credit! We even
record tour
page WM invites![B] Unheard of ![/B]<br><br><span class="big"><span
class="center">DEMO SAMPLE</span></span><br><br><img scr="swfs/demo.swf"
width="194"height="142"[B]<p align='center'>We will NEVER, NEVER,
EVER</p>1.[/B] use excessive or deceptive popups [B]2.[/B] Distribute or even
offer download codecs, spyware, adware toolbars or other items that jeapordize
the earning potential of EVERYONE !!!</p>
derobinson
7/24/2006 4:29:58 PM
Two points here:

1) You can't call a SWF into a normal HTML page using the IMG tag (you use the
Object and Embed tags)

2) I don't think you can call a SWF file into a Flash text box using HTML text
even with the Object/Embed tags. Flash's HTML renderer really only renders a
handful of HTML tags. Also, invoking the Object/Embed in this method would be
redundant since the Flash player is already initialized by your main SWF.

You should look into the loadMovie() method for bringing secondary SWFs into
your main movie at runtime.

Good luck!

veverica
7/26/2006 12:00:00 AM
David,
Thanks for the reply. Going to give the loadMovie method a try today. Still
curious though because the following is in the Flash 8 help documention (in the
ActionScript 2.0 section linked here -
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.ht
m?context=LiveDocs_Parts&file=00001472.html):

[i]In Flash Player 7 and later, you can use the <img> tag to embed image files
(JPEG, GIF, PNG), SWF files, and movie clips inside dynamic and input text
fields, and TextArea component instances. (For a full list of attributes for
the <img> tag, see Image tag.)

Flash displays media embedded in a text field at full size. To specify the
dimensions of the media you are embedding, use the <img> tag's height and width
attributes. (See About specifying height and width values.)

In general, an image embedded in a text field appears on the line following
the <img> tag. However, when the <img> tag is the first character in the text
field, the image appears on the first line of the text field.
[/i]

Begin stubborn because if the doc says I can do it, hell and damn, I want to
figure it out.

Thanks again.

jeff g.
derobinson
7/26/2006 2:27:14 PM
hey Jeff--

I think the word "media" in the second paragraph is ill choosen. By "media"
they mean JPG, GIF, or PNG files (as specified in the paragraph above). You
wouldn't use an IMG tag to embed a SWF into a normal HTML page displayed in a
browser window, why would you expect Flash to use the IMG tag to render media
in a non-standards compliant way? It would be essentially redefining the spec
of the IMG tag.

Cheers!


AddThis Social Bookmark Button