I just tried that. One wonders why I didn't try that before. I did a saveAs on the page, cleaned up the html to reflect the swf and js in the same directory and voila. Nothing!
Makes one wonder if it's a browser issue. The browser, with this code, would toss an exception if it didn't have version 9 available. Version 9 is installed. It's Firefox 1.5.09 IE, after first tossing a fit over a script, then showed, again, nothing. That leaves me to wonder what it is about the swf itself that might be faulty. The swf code I presented below is precisely what I hand compiled with the sdk. It should at least say something. Yes? My earlier trials used an swf I compiled with the Eclipse application builder. In that builder, running as a Flex application showed it to work fine. But, it never showed in a browser through a servlet engine. Thanks to the suggestion, I'm now left with two candidates: flex is installed but not working -- I've gone out on the web and have reason to believe I have exercised it on swf objects elsewhere enough to have reason to believe it is working, or, there is something about the swfs I am creating that is faulty. I am eager to hear other ideas or be pointed to something dumb or obvious that I overlooked. Many thanks Jack On 2/8/07, Tracy Spratt <[EMAIL PROTECTED]> wrote:
Have you simplified things by removing "jetty" (of which I am ignorant) from the equation? Put the swf in the same folder as the wrapper. From a browser on the server hosting the wrapper, can you hit the jetty / swf url? Tracy ------------------------------ *From:* [email protected] [mailto:[EMAIL PROTECTED] *On Behalf Of *Jack Park *Sent:* Thursday, February 08, 2007 11:09 AM *To:* [email protected] *Subject:* [flexcoders] Fwd: Problems painting an swf from a wrapper <actually, a second try; I never saw the first post make it to the list> I really hope someone can tell me what I am missing here. Many thanks Jack In an earlier thread, I got engaged in the issue of history.js and a history.html iframe. There is a template that doesn't use history. That's as barebones as it gets. I am running the simplest possible test to validate that my servlet can paint swf content. I went so far as to craft a simple helloworld as follows: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" pageTitle="HelloWorld Sample" > <mx:Label text="Hello World!"/> <mx:Label text="Hello World!" color="#003366" fontSize="40"/> </mx:Application> I then adapted a template as follows (note the classpath to the swf file -- this is an embedded Jetty server) -- the servlet prints a trace that clearly shows it sending the swf file. What I get is a colored box set to the background color (which, to me, indicates flex is interpreting something from the html) but nothing from the content itself. What am I missing? Thanks Jack <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>FlexDev</title> <script language="JavaScript" type="text/javascript"> <!-- // ---------------------------------------------------------- // Globals // Major version of Flash required var requiredMajorVersion = 9; // Minor version of Flash required var requiredMinorVersion = 0; // Minor version of Flash required var requiredRevision = 0; // ---------------------------------------------------------- // --> </script> <script src="/js/flex/AC_OETags.js" language="javascript"></script> </head> <body scroll="no" > <script language="JavaScript" type="text/javascript"> <!-- // Version check based upon the values entered above in "Globals" var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); // Check to see if the version meets the requirements for playback if (hasRequestedVersion) { // if we've detected an acceptable version // if we've detected an acceptable version // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( "src", "/swf/HelloWorld", "width", "100%", "height", "100%", "align", "middle", "id", "HelloWorld", "quality", "high", "bgcolor", "#869ca7", "name", "HelloWorld", "allowScriptAccess","sameDomain", "type", "application/x-shockwave-flash", "pluginspage", " http://www.adobe.com/go/getflashplayer" ); } else { // flash is too old or we can't detect the plugin var alternateContent = 'Alternate HTML content should be placed here. ' + 'This content requires the Adobe Flash Player. ' + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; document.write(alternateContent); // insert non-flash content } // --> </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="${application}" width="100%" height="100%" codebase=" http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="/swf/HelloWorld.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess" value="sameDomain" /> <embed src="/swf/HelloWorld.swf" quality="high" bgcolor="#869ca7" width="100%" height="100%" name="HelloWorld" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"> </embed> </object> </noscript> </body> </html>

