views:

814

answers:

4

Hi.

Recently, when I tried to show the results of my work (some Flex app) to my boss, i was quite suprised that application which run perfectly well on my pc, on my boss' pc wasn't displayed properly (the only thing visible was a default grey background). After 3h of trying absolutely everything, finally the app showed up when I changed his Flash Player version from standard one to debug (both was v. 10.0.22.87). Does anyone know what can be the reason of this (any compiler flag or sth). Forcing my boss to installing debug FP was quite ok, but forcing final user of the app to do so is unacceptable.

Thanks

PS: By showing I mean deploying to Tomcat on my pc and giving my boss a link to the app. We both use Win XP. Also when I installed debug FP for Netscape browsers and standard FP for IE (on my pc) the result is the same - working in Firefox, Opera, Chrome and grey background in IE. I've compiled both as a Debug and as a Release. I'm using Flash Develop 3.0.2 RTM

After stripping my app to sth like this - it still works only in debug FP

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns:ca="components.*"
    xmlns:ea="components.editAreas.*"
    layout="vertical"
    backgroundColor="black">

    <mx:Canvas id="header"
        verticalScrollPolicy="off"
        horizontalScrollPolicy="off"
        styleName="header"
        width="100%"></mx:Canvas>

    <mx:Canvas id="mainContent"
        width="100%" height="100%"
        verticalScrollPolicy="off">
    </mx:Canvas>

</mx:Application>
A: 

Just some suggestions...

  • Ensure you're deploying the release build.
  • After doing that you may want to delete the browser cache - I oftentimes have our users do that after a release since it will occasionally load the old version after a release is put out there.
  • Are you using Modules? Are you maybe referencing a debug module?
  • Check your paths defined in the compiler arguments of the project, as well as the paths of any Modules you may be using. Can you provide us with your compiler args?
  • Are you and your boss using the same version of I.E.?
  • Did you change the index.html file to reference another swf?
Chris Klepeis
A: 

This smells like a security issue to me; the debugger enforces fewer security policies than the standard player, and your mention of Tomcat and those namespace references suggest there's something security-related going on here.

What are components.* and components.editAreas.* used for? Are you attempting to load and access any binary data in your application? Could you maybe post a little more code? Because what you've posted here is pretty innocuous. Might be easier to help with a bit more detail, but again, you're most likely running up against a security restriction somewhere.

Christian Nunciato
+3  A: 

Hi,

The same kind of issue i faced few days back.

I was using following code

//Call To The Function traceDetails(new Error())

private function traceDetails(err:Error):void { err.getStackTrace() } On My part i was using the method "getStackTrace()" Here the thing to remember is that getStackTrace() method is only available with Flash Debugger and Not With Flash player. So Wherever i do not have Flash Debugger installed my application stops running.

So Things to do 1. Check if Your using any API call that are only available in Flash Debugger and Not in Flash player(If You found Try commenting that line Application will start running). 2. Work around Install Flash Debugger Version wherever you are running your application or Simply before your Flash Debugger API calls Check if(Capabilities.isDebugger) only then use those API or Skip those lines.

I am sure this will solve your problem

Happy Coding :)

You saved my day man, and my job, and my life, like some freaking Superman or sth :) It was just as you wrote. I monkey patched FlexSprite class to show all listeners of component with some dude's code. He was using getStackTrace() to retrieve some data on listener, and after I commented it everything run perfectly.Once again big thanks.
2DH
A: 

I agree with Christian. It has to do with the security policies of the standard flash player. After removing/patching the FlexSprite class, which called the getStackTrace() function, the app is now working fine. Thank you for your help. surfined

surfiend