What are the things need to taken care while working with flash playeres? - actionscript-3

I have been working since a long time on a particular flash(Action Script 3.0) project and did all the test and development under the Flash itself(tested by Ctrl+Enter) . But It should be compatible with the browser, so i exported all these to my localhost, and its working fine.
But unexpectedly I got many more errors from swf player. I don't know why flash player on the browser behaves like this. All functions are working fine in Flash but when I export to swf its not working correctly...

The browser in the authoring environment is much more lenient with it's sandbox, you're likely running into security issues.

Related

Flash Differences Between Adobe AIR And Internet Explorer

We have developed an application front end in Flash. Now we are allowing access either from a browser or an Adobe AIR application. We point to the URL of our web server and download swf components and data via a NetConnection. We are seeing differences in the communication behavior of our web application with the Adobe AIR container verses Internet Explorer. There are some communication drops between the Adobe AIR container in our requests back to the web server for requests that take a longer time. Internet Explorer seems to be much more tolerant and handles much better.
It is not an issue simply with the connection reliability because the same behaviors can be observed by setting and holding a breakpoint on the requests for data from the web server.
So, same code but different behaviors when flash runs in Adobe Air. We have made sure both are using the same version of the flash dll.
As I missing some configuration of the Adobe AIR container that changes default behaviors?
You can take it as a given that AIR runtime and Flash Plugin are independent, do not run anything shared, and so on. Moreover, Flash ActiveX component and Flash Plugin for Mozilla FireFox and Flash Plugin for Chrome are different builds. Furthermore, you cannot be sure about configuration on a random client PC.
I advise you to stop using NetConnection (which is intended for message interchange and streaming video/audio) and load everything via standard Loader and URLLoader classes. Even if your server breaks connections now and then, it's easy to wrap those classes with failsafe retry functionality.

Flash - Air app tests fine but publishes broken

I have an issue with an air desktop app I'm working on currently. When I test the movie within flash, it all works the way it's supposed to, but when I publish it for Air desktop as an exe executable, install and run it, it acts as if there is absolutely no AS3 at all... I have no idea what is going on here.
Anybody have any idea what could be happening?
Files- https://www.mediafire.com/?ai45gcam69ganxa

Adobe AIR vs Flash Player - sendtoURL Reliability - Alternatives

I'm controlling an Arduino Relay using simple sendtoURL commands. Quite by accident I was testing in the Flash debugger and it worked flawlessly.
Once I realized I was in the wrong environment and I did the same test, I noticed a huge difference in performance.
It's hard to explain so I made a video: http://www.youtube.com/watch?v=on1tluBtA6s
Is there any way to get the Flash Runtime performance within AIR?
What might be causing this and what could I use as an alternative?
Originally using a proxy server, must Flash to communicate with Arduino. Maybe you are also using it the same way right? However, Recently in Adobe AIR using a ArduinoConnector.ane direct you to the Arduino can communicate with. I have tested it using(RFID communicate). The existing proxy server is much faster than going via.
ArduinoConnector link

ADT works with ipa-test-interpreter but not ipa-test

I could use some help getting my #AS3 / #AIR application running on #iOS !
Right now I have a .SWF (v11) that I'm converting to an .IPA using Adobe AIR (v3.7) on Windows (7).
If I do the conversion with the -target of ipa-test-interpreter it works great.
If I do the conversion with ipa-test, ipa-debug, ipa-ad-hoc, or ipa-appstore, the application seems to compile fine but upon execution of the app on my iPad it just shows a black screen.
Connecting my iPad to a desktop and monitoring console output, I see not crash or error messages generated; the app appears to behave fine internally, it's just lost all external output.
This means I can test and develop but I won't ever actually be able to deploy to the app-store. Anyone else run into this?
Googling around I've run into other people encountering this problem, but no solutions yet. One thing I tried was removing all native extensions, and I also tried removing the -C compiler directive. No luck on either.
To be clear, the app runs totally fine on Mac, PC, Android, Browser, and on iOS in interpreter mode; it's just native-compilation on iOS that's broken. I've heard rumours that ipa-test and ipa-interpreter have different memory allocation routines, but I don't know enough about the low-end here to figure this out.
The remote debugger (in FlashDevelop) doesn't seem to connect either. I think it's failing before the runtime fires fully, somehow? I'm also watching the console output using the iphone-configuration-utility and there isn't anything abnormal showing up.
Temporary file link with sample project and instructions: https://dl.dropboxusercontent.com/u/1348446/test.zip
Figured it out. Rundown:
The ADT command line has a -C flag to change the current working directory on the command line, which allows you to keep your project better organized and keep the command line a bit more sane. -C can be called as many times as you want when importing assets, and I used it several times. IDEs like FlashDevelop also use -C in the AIR template files so this is sorta standard behaviour. As a quick example of asset inclusion:
ADT.exe [blah blah] assets/icons/icon1.png assets/icons/icon2.png
is the same as
ADT.exe [blah blah] -C assets/icons icon1.png icon2.png
(and, with wildcard use) is the same as
ADT.exe [blah blah] -C assets/icons .
As I have different compiling instruction sets for iOS, android, steam, etc., I had adt switch directories with a variable to the current config and execute from there.
This all works fine and as-documented in ipa-test-interpreter mode. When in native-code mode (ipa-test), however, including the main executable .SWF after a -C command [somehow for some reason] messes up the internal pathing; the file ends up being included but ends up being all "file not found" internally when executed, hence the blank screen and no code executing.
So the fix is simply to include the .swf from the current directory, before any calls to -C. As a quick example of my workaround that just tested a-okay:
copy /bin/flash/game.swf ./
adt [stuff] game.swf -c assets/icons .
del game.swf
I've gotten in touch with Adobe about this and hopefully they'll fix -C so it's functionality is the same for both compile targets in the future.
I have seen this happen in the past due to utilization of components "restricted" from use within iOS builds of Air apps. Specifically back in the day before being able to sandbox the loading of app resources with the loader class.
Start shutting down and turning off whole modules of your app and see when the app will build and run on iOS. I'm willing to bet there is some code somewhere that is ipa-test-interpreter safe but has odd behavior under ipa-test
I see you're still stuck with this issue. If you can find a Mac to test on, I bet xcode instruments will show you're exceeding you're memory limits. It is the iPad one right? Are you using flash's embed meta tags?
Is Black your swf background color? If it is, maybe it's a cross domain loading issue because you're loading your swf and app.xml from 2 different places. I don't know if this is causing it, but I usually keep them in the same place.
Have you ever seen your provision & p.12 work on a device? If not, it might be a problem with them.
What IDE are you using to make this, Flash IDE or Flash Builder, Flash Develop/ANT? And if you post src code it would help. Sometimes putting your metadata in the wrong place can screw things up on iOS but look fine in the browser...so it could be many things.
Good luck.

Debugging with the projector AS3 Flash projector

I'm working on a Flash game that runs fine when testing through Flash professional, but once it's exported to a projector, it won't run on either PC or Mac.
I've got a PC (Windows 7) and it basically closes the window with a white screen as soon as the projector opens. FWIW, it used to work on a projector until recently when I implemented some new functionality including stage web view, DesktopFacebook API integration etc.
How do I debug this problem with the projector? Has anyone run into issues like this before?
you can use Monster Debugger
it should be able to solve your problem
You can use Vizzy. It will give you access to all traces and error messages (no code changes required). Or, as AyoubKaanich suggests, you may use a proper debugger.
You must install the projector in debug version first.
Thanks for the responses. It actually turned out that Flash was looking for the StageWebView class which isn't available to the standalone projector-- it compiled and ran fine in Flash Pro because I had it set up to test as an Air Desktop app. When I built the projector it didn't throw a compile error at publish time but just refused to load after.
I ended up diagnosing this problem by running the SWF in the debugger projector, which I probably should have just done from the beginning...