swf file terminates automatically after publishing - actionscript-3

I create app using flash cs 5.5. It works fine. Then I started using flash cs6. The app was running fine until today. It runs fine but the problem is when i tried to publish it, it start playing but after some time(about 30 secs), swf file terminates itself. There is no problem in using cs5.5. It's just when i tried to publish it, it runs and swf file is close itself. Do any one have any idea what might be the problem ?

When you say "the swf file terminates itself", are you talking about the standalone flash player? Normally if this happens, it's because an error was thrown, but if you're not using the debug player, you won't see it, it'll just close.
Download the debugger player here: http://www.adobe.com/support/flashplayer/downloads.html and run your swf in debug mode (so all the debug symbols are present and you get the most complete error message). This should give you an idea of what the error is, and where to go to fix it.
NOTE: to know if you're running in the debug player or not, right-click on the swf in the player, and if you see an option for "Show redraw regions", then it's the debug player

Related

how to debug a swf file

I'm quite new to AS3 and now I need to solve a swf crash problem.
I have the source code and fla file, so I can debug/run it in FL, I can use trace to print out log. The problem is, on my machine, either run in FL or generated swf embed in IE works correctly. But the swf always crashes on tester's machine.
Because the swf is run in IE, trace seems doesn't work, so I'd like to know if there's any tool I can use so that I can see all the trace output on tester's machine.
Thanks
Trace only works while working directly with Adobe Flash.
What you can do is call a javascript alert to display the Trace elements inside a BROWSER. Please note it will not work while directly opening the .swf
ExternalInterface.call("alert",output);
But their should be no different in handling any .swf except for the installed Version of the Flashplayer on each computer.
If it runs fine on your IE, then it should on the other as long as Flash Version and IE Version are the same.
Outdate Version usually lead to this sort of conflict.

Database content not retrieved in the exported SWF and published HTML

I have this problem that when i am running my project in Flash cs6 using ctrl+enter, the project is ok, the flash player is retrieving the files from mysql database. but when i run the independent swf file outside, there is no retrieval happening. the text box that suppose to be showing the retrieved data is empty. how can i fix this?
Make sure you are running the published html from an actual page in the browser and not from the local file system.
Just make sure that the URL doesn't start with file:///
You must be having a security sandbox error, but you probably don't have the Debugger version of the Flash Player, so it's not telling you anything.
Just go to http://www.adobe.com/support/flashplayer/downloads.html and choose the proper one for your operating system and browser.
If you STILL want to run the files from your local file system, you can have a look at Flash Player's Global Configuration, to give access to the files/directories you want. Just right click on your swf file in the browser, and when the Menu opens, select Global Configuration.
The reason it is working when running inside Flash CS6 is that the player has less security restrictions in there.
Let me know if you were able to solve your problem.

Debugging Flash SWF panel

Does anyone think it could be possible to create a custom debugger for swf files using a socket, able to support breaking points and step through code functionality?
I know there are swf debugger's out there but I have not found one that can step through code...
I was thinking of creating one and would like to get some input and ideas.
I know flash has a System.Pause() function that will stop the player and I can get the code line using stackTrace. but I have no idea how to perform the step functionality.
Maybe FlasCC some how?
Or create a server debugger which will call the pause function every step... but how would I know when a new line is being processed?
The reason I would like to create this is to debug Flash extension SWFpanel which wont connect to flash remote debugger
Any thoughts and ideas are welcome .

Flash event errors on IIS7+

Flash app I've built works fine on desktop and on IIS6, but when I upload to IIS7+ it breaks.
Most of the app appears to work as expected but a crucial test fails. I think it's a custom event that is failing, but I've no idea why when it works perfectly everywhere else.
Anybody else has issues with Flash and IIS7+?
My app is built with Flash CS5 and AS3 for Flash player 10.
BTW it's not a MIME type issue.
Any help appreciated.
Thanks
Barry
Don't use the '+' character in filenames on servers running IIS7+. IIS7 treats these as if they were query strings. So a filename 'hello+world+today.jpg' will be translated into 'hello.jpg?key=world+today'. This sometimes fails silently in Flash without throwing an IOError, assuming you set up to receive one of course.

Close Flash Player from FlashDevelop IDE

Whenever I compile my project using FlashDevelop in 'Debug' the Flash Player window remains after I have clicked the 'Stop' button in Flash Develop. I have to then switch over to the flash player, click through any error messages and then close the player, which wastes a lot of time in the long run.
Any way to make it so Flash Player closes when I click 'Stop' in the Flash Develop debug tools?
EDIT:
My setup is a fresh install of Windows 7, a new copy of Flash Develop 4 and Flash Player 10.
You may disable the error popup in your Flash Player by editing your mm.cfg file (which is in your Windows' user folder). Just add the following:
SuppressDebuggerExceptionDialogs=1
Then the Flash Player will nicely be killed when you stop FlashDevelop debugging. BTW, you will still be able to read the errors in the trace.
In FlashDevelop/Settings/ToolBar.xml just put this line
<button label="Kill FlashPlayer" click="RunProcess" tag="taskkill;/f /t /im FlashPlayerDebugger.exe" image="197" />
and restart FD.
I've asked this question in the Flash Develop forums and an admin informed me that this is a feature that they are currently thinking about including but that it FD cannot close the Flash Player atm.
http://www.flashdevelop.org/community/viewtopic.php?f=13&t=8442&sid=be1affc07163323a49000722e6b86ce1&p=39291#p39291