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

flash actionscript

group:

Embedding SWF in a text field


Re: Embedding SWF in a text field David Stiller
7/30/2006 12:31:42 PM
flash actionscript:
Tom,

[quoted text, click to view]

That's a really interesting approach. At first, I didn't understand
what you were aiming for, but it sounds to me like you're tying to use HTML
inside a Flash text field -- which is doable, to some extent -- and embed an
external SWF in that HTML ... all within Flash.

[quoted text, click to view]

That does work, but it's about the closest you'll get, I'm afraid. It's
only happenstance that Flash's very narrow (and somewhat unique) version of
HTML accepts SWFs in an <img> tag.

[quoted text, click to view]

Flash only supports a very limited subset of the HTML language. You can
see the full list of supported tags by searching the phrase "supported tags"
in the documentation (specifically, the Learning ActionScript 2.0 in Flash
book). For better or worse, <object>, <param>, and <embed> are simply not
in that list.

[quoted text, click to view]

Your only choice is to use one of the more traditional methods of
loading external SWFs, such as loadMovie(), MovieClip.loadMovie(), or the
MovieClipLoader class. Once your external SWF is loaded, you may "feed" it
variables that should be detectable by the ActionScript inside the loaded
SWF.


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."

Embedding SWF in a text field charmcityMD
7/30/2006 2:30:45 PM
Hi, New user to Flash here with a problem embedding .SWF files. I have already
existing SWF files that I have called historically from HTML using <object> to
embed the object and <param name= value=> also to pass it information. The SWF
movie I need to embed basically builds a graph and takes its data from the
location you supply it in <param name= value=> field. This code is not mine
and I can't alter it.

What I want to do is construct a flash version of my site and embed these
graphs within a flash textfield. I have been able to successfully embed a test
SWF file using <img> tags on a text field ---> but here is my question. How do
I support the <param name= value=> functionality I got when I called these
graphs from HTML using <object>?

I hope that's clear? Any help at all is greatly appreciated.
Tom
Re: Embedding SWF in a text field charmcityMD
7/30/2006 9:02:48 PM
David,

I want to thank you for your well reasoned response to my question. You do
understand what I am trying to do correctly. I was hoping there was a standard
alternate approach to this problem and it sounds like I need to go off and do
some reading on the movieloader class.

Thanks very much
Tom
AddThis Social Bookmark Button