Flash app freezes in production Flash Player 11, but works as expected in debug version - actionscript-3

I've just stumbled upon a case when Flash app freezes in production Flash Player and works smoothly in a debug version. It doesn't throw any errors or exceptions. Has anyone ever encountered anything like this? Why is it happening or how one is supposed to debug in such case?
And a side question - what exactly is different in debug version from internal point of view? Any good writeup on the topic?
UPDATE:
I didn't mention, but the trouble is with Flash Player 11, it probably matters, cause Flash Player 10 doesn't have any problems with the same code.

In case anyone wonders here how this problem got solved.
First of all the class that was causing the hang turned out to be nifty BitmapDataUnlimited, which makes possible to overcome bitmap resolution constrain in Flash. Basically what we've changed was that we made a class directly extending EventDispatcher, rather then implementing IEventDispatcher interface and having indirect deal with private internal _eventDispatcher object.
Can anyone tell me what's the benefit of implementing IEventDispatcher interface directly?

Related

Context3D.supportsVideoTexture is undefined

I'm trying to get VideoTexture working in an Adobe Air app and I'm having real trouble with the basics and getting it working on my machine.
I'm also using Stage3Dproxy and I wonder if this causes the problem, but Context3D.supportsVideoTexture is always undefined.
I've got a fairly hefty NVIDIA GeForce GTX 850M which I think is fairly new and should be upto the job!?
The Adobe Stage3D support swf never loads for me, so I'm wondering if this relates to the problem
https://helpx.adobe.com/x-productkb/multi/stage3d-unsupported-chipsets-drivers-flash.html
Anyone else had this issue?
#BotMaster was right - I'd not set the right swf-version in this particular project file.

action script 2 versus action script 3

I am learning ActionScript and am brand new to making Flash movie clips. Overall it seems pretty easy but I have discovered that there is a huge difference between AS2 and AS3, and that components built in one will not run with code written in the other.
This makes for some big obstacles for me, I have a reason to develop in AS2 but everything on the net is geared around AS3, even the latest versions of Flash Professional are full of components and examples in AS3. (I am using CS5 right now). I tried to use the components from the library and they do not work when building an AS2 project, the compiler errors all complain about "The class or interface 'xxx' could not be loaded" where xxx is referring to some part of the component object from the library.
Any advice here would be much appreciated. I am sure experienced developers have had issues when trying to 'bridge the gap' between old code and new code, if there is a web resource or some sort of advice then that would help.
Well, AS3 was introduced 9 Years ago! AS2 is deprecated and you really should write any code in AS3 for serveral reasons. The mysterious AS2 class that you need, may exist in AS3 or can be somehow adapted to AS3, if you tell us more about it maybe you get a proper solution.

Direct all errors to a textfield

I am developing a Flash game. It has a complex loading scheme which could go wrong at many different places.
When I am testing from Authoring Tool, either with "Test Movie" or "Debug Movie", it always succeeds and starts fine.
However, every time I test it by loading it in a browser, it always fails! I am not sure where to look.
The question is this : is there an easy way to direct all internal errors to a TextField on Stage where I can really check what went wrong? Alternatively, is there any other way to catch and show errors when testing on a browser?
Debug player is a must. It allows you use breakpoints and view your application state (like values of variables and so on) at runtime (if you are using an IDE with a debugger, like Flash Builder ofc). Viewing traces in console window is quite annoying, though, so you can use some external debug utility, for example Monster Debugger. It has some nice features, like highlighting MovieClips (and other DisplayObjects) at runtime.
You can use UncaughtErrorEvent to intercept all internal uncaught errors of a swf through a method.
The best way is to install the debug flash player. There is no way that I know of to direct internal errors anywhere. Apparently there is, see other answer. It's still probably easier to install the debug player however.
You can get the debug player from http://www.adobe.com/support/flashplayer/downloads.html (scroll down a bit).
As for the error itself, there are two common reasons:
If the files are hosted elsewhere, you need a crossdomain file set up
The base url of the flash file is not where you think it is, and thus any relative paths fail to resolve correctly.

MouseEvent.RIGHT_CLICK is undefined at runtime?

ANSWER To use this and any new features in 11.2, the swf-version needs to be turned all the way up to 15.
My setup:
FlashBuilder 4.6 Build instructions include "-swf-version=13"
Flex SDK version 4.6.0 (build 23201) playerglobal.swc (current one from
Adobe's page,
http://www.adobe.com/support/flashplayer/downloads.html, said to be
11.2 as well)
Standalone debugger projector (11.2.202.228)
Browser flash player plugin (11.2.202.228)
So by my reckoning, I'm up to date in everywhere I should be, to be able to use MouseEvent.RIGHT_CLICK (Adobe Documentation:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent.html#RIGHT_CLICK) but, if I do
I understand that right-click was initially supposed to be AIR only, but that's supposedly changed, which is supported by the fact that it's in the website documentation and in the class definition for MouseEvent,
I want to play around with a few right-click stuff in Flash, but it seems like something's definitely not working correctly. Anyone got an insight as to what's wrong?
I'm a bit confused by some of the comments, so in case it's me poorly explaining what's going on, so here's an example of my code running and compiled, with source attached,
http://www.tymonrovers.com/seaders/asdf.html
SWF Version in build instructions need to be up at 15... as detailed http://helpx.adobe.com/flash-player/release-note/release-notes-developer-flash-player.html#main_authoring_flash_player
Damnit! I know it looks obvious now, but I do think they should probably detail that in the docs as well, they've got the specific versions of the SDKS for AIR and Flash, but not the swf version info, which while it might sound overkill, would certainly solve irritations like this when you forget that one little bit of a tweak you need to do for new features. Ah well, all working now. :/
-swf-version=15

Soundtouch class not working now

There is great library for realtime pith shifting https://github.com/also/soundtouch-as3
If was work fine until Jule 2015 (at this time was discovered another Adobe Flash Player zero-day (assigned with CVE number, CVE-2015-5123))
Is there anybody successfully use this library? I can't debug this ... because of I know AS3 not so well, maybe anybody know the reason of this
it's not an solution to this but after a similar issue I ended up using the Sonoport libraries instead. They're worth checking out as have some cutting edge algorithms and do realtime manipulation of pitch / rate etc.
www.sonoport.com
I've made the swc available here as it looks like their downloads aren't currently available