0
votes

I have created an application using Adobe Flex. I took all the files from the 'bin-release' folder and put it on the server. Then when someone connected to the server through http it is forwarded to the "index.htm". The "index.htm" page is the HTML page created automagically by Adobe Flex during compile time, I just renamed it to that name (from visco.html if it matters). The SWF file remained the same.

The problem is that most of the time when I go to the server, I get forwarded to the "index.htm" file and it loads the SWF perfectly. The other 30% of the time, it doesnt load! The background of the page turns blue (same as my SWF) and if I right-click it, it shows an Adobe Flash dropdown, so it looks like its sort of loading, but the application doesnt fully start even though it has been 100% reliable during debugging and when loading the SWF file manually.

What do I need to do to get the SWF file to load and start reliably?

here is where I embed the SWF file:

<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        id="visco" width="100%" height="100%"
        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
        <param name="movie" value="visco.swf" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#869ca7" />
        <param name="allowScriptAccess" value="sameDomain" />
        <embed src="visco.swf" quality="high" bgcolor="#869ca7"
            width="100%" height="100%" name="visco" align="middle"
            play="true"
            loop="false"
            quality="high"
            allowScriptAccess="sameDomain"
            type="application/x-shockwave-flash"
            pluginspage="http://www.adobe.com/go/getflashplayer">
        </embed>
</object>

4

4 Answers

1
votes

It turns out the problem was with the embedded board used to serve the SWF file, not the file itself.

0
votes

It sounds like it is throwing an exception somewhere and failing silently (roll on FP10.1!!).

Upload a debug version to the server and try and re-create. It will give you more information than a blank screen.

Remember that if you upload a debug version, you can debug remotely from Flex Builder (which is always a plus).

If it fails in production but not in testing, that usually suggests bad data, hardcoded URLs (localhost being the biggest culprit), or timing issues.

Your first job is to find what the exact conditions it's failing under, and for that you'll need a debug build.

0
votes

try installing the debug player in your browser and it should popup the stack trace dialog that should give you a clue what's wrong if the app throws an exception like gregor suggested. other debugging methods on a release build is to use firebug network monitor tool which can show if the app is making a call to a url that returns 404 and maybe the app is not handling the error. but that's limited to this. some other ideas i can think of is that in your oncomplete/initialize/preinitialize event you are trying to access a null object or property so the app stops there and prevents it from loading.

0
votes

The problem was actually with the hardware used to serve up the SWF file. The code used to access the SD card (where the SWF was stored) wasn't working quite right.