This content has been marked as final. Show 3 replies
You can embed flex applications in HTML as you would embed any flash swfs in HTML using <object>and <embed> tags.
Go to this URL for more information http://livedocs.macromedia.com/flex/2/docs/00001590.html#166446
This is the code I used to do that... <EMBED src="/ISIF/Flex/bin/ISIF_Sec.swf" width="800" height="300">
Two things to keep in mind, first is the path to the swf is relative to the web server. Second is that if you want full control over the sizing of your swf in your html code then you need to set the canvas size in the <mx:application ...> tag to the same size as you use in your <EMBED> tag. I found it works a little cleaner that way. O.K. at least it did for me!!! :)
Have an Ordinary Day...
You can get sample source code for embedding Flex files in HTML pages...
If you're using Flex 2 SDK or FDS, you can look at the files in the resources/html-templates directory.
If you're using Flex Builder 2, then look at the generated page when you do a compile.
In addition, you should check out the Creating A Wrapper chapter, which explains how to use the templates: