Embed Flex into Webpage

2945
6
04-09-2010 07:17 AM
JaclynGorman
New Contributor
I am learning flex and have a question that might be simple but right now I am not sure how to do it.  After you write the flex application in flex builder how do you actually embed the map into a website that is live.  More simply how do you move your project into a viewable website.  We have been using the javascript API, but I can't find anywhere how to make the flex maps active on a usable website.  Thanks
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
JMGorman,

   If you are using Flex Builder, you need to build a release build and copy the contents of the bin release folder to your web servers virtual directory (if using IIS) or httpdocs folder if using Apache.
0 Kudos
DasaPaddock
Esri Regular Contributor
If you want to actually embed a Flex Map into an existing web page, I'd recommend taking a look at swfobject:
http://code.google.com/p/swfobject/
This is what Adobe is now using Flex 4.
0 Kudos
AlexJones
New Contributor II
If you are using swfobject generator do you need to set flash vars for the Sample Flex viewer? I was playing around with this the other day, but keep getting http service errors and the swf does not load completely. I was thinking I need to set some params for it or maybe it was my folder structure. Has anybody done integration with a CMS? Drupal or anything else? I am trying to get something like the southern forests site going to see if it is feasible. Any help is appreciated.
0 Kudos
toddsams
New Contributor III
I have a web app created with the Viewer for Flex 2.1

Is there any way for me to embed it into a website without using Flash Builder?
0 Kudos
DasaPaddock
Esri Regular Contributor
Yes. You could either modify the index.html page that comes with the download to add html content around the Viewer or use standard html swf embedding code like you can get from http://code.google.com/p/swfobject/ to embed the index.swf into your existing web page.
0 Kudos
chuckfrank
Occasional Contributor
I've embedded a flex app on an aspx page, but am getting errors ("Load Never Completed") when trying to load it.  Is there a proper way to embed a flex view application with widgets into a .net project?  I've added folders for the widgets and edited the configuration files.  The errors are probably caused by not being able to find files, but I'm not sure what all needs to be done.  Does anybody have experience with this?
0 Kudos