all groups > flash actionscript > may 2006 >
You're in the

flash actionscript

group:

How to Load a SWF in Dynamically Loaded HTML


How to Load a SWF in Dynamically Loaded HTML JuliaO
5/16/2006 10:57:43 PM
flash actionscript:
Hello,

I have a Flash movie with a multi-line text field that loads HTML text. As per
the below Macromedia documentation I have swfs as images inside my HTML text.

I'm trying to find a way to pre-load these swfs - if I do loadmovie to load
the swf, when the html file is loaded will it need to reload the swf from
scratch or will it take my loaded version? I'd love to show a "loading" message
in the text as the swf was loading but am unsure how to do this now that I have
the swf reference embedded in the html text.

Any ideas?

Thanks!


Julia

From the Macromedia documentation:

Image tag (<img>)
The <img> tag lets you embed external JPEG files, SWF files, and movie clips
inside text fields. The <img> tag has one required attribute, src, which
specifies the path to a JPEG file, a SWF file, or the linkage identifier of a
movie clip symbol.


Re: How to Load a SWF in Dynamically Loaded HTML shyaway
5/16/2006 11:02:08 PM
it will be in your cache after loaded.
so, you might have to clear the cache if you made a change serverside for the
content to refresh it.

the loading message is always good for first time loading :)

did i cover all your questions?
Re: How to Load a SWF in Dynamically Loaded HTML JuliaO
5/18/2006 5:47:03 PM
Thanks - your answer is exactly what I was looking for.

I'm noticing that every swf I load via dynamic HTML is distorted - is there a
way to prevent this? I can set the width and height of each swf in the HTML,
which works ok, but then I run into a problem when I try and have a component
item (like an accordion) included in the dynamic text field. It works properly,
and the framing is sized correctly, but the guts are still skewed. I haven't
been able to figure out why the swfs are being distorted in the first place.

Any ideas?

Thanks,


Julia
AddThis Social Bookmark Button