Enabling async rendering in flash - actionscript-3

Regarding bug in firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1307108
Flash is not working properly, strange stuff happend(Mouse events are dispatching with time lag, they are dispatching by themselves, etc.). Solution is by link from firefox: enable async rendering.
There is also a separate functional regression caused by Adobe in bug
1301486 which would be fixed by enabling async rendering.
Is something like that possible to do in Flash, in AS3 code ? When we set this in option in firefox(dom.ipc.plugins.asyncdrawing.enabled) it solve the problem.
Thank you in advance for any answer
Egid

Some flash applications work slow in Firefox 49.0.2 on Windows.
Setting the wmode to "gpu" improves performance.

Related

Suddenly "this.audiocontext.createScriptProcessor is not a function" error in p5js-sound

I have a website, that should play mp3 files after clicking on a logo. When a sound is played, the p5.js library (p5js-sound) draws some graphic on the background. Suddenly it has stopped working. In the Chrome console log, the problem is with this line. Without any reason after two years of working properly, it started to give this error
Uncaught TypeError: this.audiocontext.createScriptProcessor is not a
function.
I found out that it works in Firefox and on some computers with older versions of Chrome. How to solve this problem?
Newest versions of Chrome will not "autoplay" audio. Some kind of user interaction is required, ie. click on something to "start" the audio context. When I get it to work I will post code.
It is unlikely that this is a problem with your code or anything you have done to the p5.sound library.
On the contrary, it may be an out-of-date version of the library and the processing foundation may not have updated it yet. They are a non-profit organisation so cut them some slack but I suggest using an alternative library for now
You could use native functions like an onclick="" that controls whether a hidden <audio></audio> tag is playing - Good luck coding!

Weird flash player glitch (12.0.0.41) in Chrome only

Very recently, after the latest Chrome update which includes Adobe Flash Player Version: 12.0.0.41, a flash app that's been running smoothly for years has begun to "hiccup" during one particular function.
Normal behavior - User logs in to app. App grabs some xml files then draws a calendar onscreen.
Hiccup behavior - User logs in to app. App grabs the xml files but feezes before executing the loadComplete function (according to trace). By freezes, I mean the little load spinner remains onscreen but stops spinning and the calendar doesn't appear onscreen.
Interesting/maddening notes - The mouse cursor responds as if the calendar has been drawn (arrow changes to pointer when mouse passes over an invisible calendar day) but according to my trace log the loadComplete and showCal functions haven't fired.
ALSO, any call to a function unfreezes the glitch (e.g. clicking an invisible calendar day, mousingOver a control button, etc. Anything that triggers a function.) and bam! everything's there and the trace log completes as it should.
As stated, this glitch only occurs in Chrome with the latest Flash Player update (12,0,0,41).
Installing the mozilla version of the flash player debugger (12,0,0,43) and instructing chrome to use it instead fixes the glitch, but using it in chrome opens up a whole new can of worms when it comes to flash player glitches (as is to be expected).
Maybe there's nothing I can do and it's just a fault with the latest Chrome flash player build, OR...
There's something fundamentally wrong with my code and Chrome's latest flash player is the only plugin that glitches on my "wrong" code?
I'll happily include some code snippets if someone is convinced my code is the problem but am leaving them off for now since this question is enormous. (you're a trooper for sticking with it)
I'm hoping someone else has experienced this or can at least explain it/fix it. Thanks in advance.
I'm seeing very similar symptoms on an application I work on Frankenscarf. All workarounds have been ineffective thus far. I can confirm it is specific to 12.0.0.41 Pepper Flash. I think you might need to wait for google to fix the lasted release...
I am also having problems with Flash 12.0.0.41 on YouTube, videos very laggy and dropping frames all the time even making the video stutter on 320p. I have disabled Chromes built in Flash player though Chrome://plugins, installed Chrome 11.7.700.260 and now have the videos running smoothly even at 1440p. Hopefully they will sort out the bugs soon.
I wasn't able to edit my original post...
UPDATE: I managed to get a workaround going. I set up a periodic timer (triggering every 500ms), that calls invalidateDisplayList() in my largest container. It is horrible, but it works....

Flash Player behaviour when lost focus

I've got a real problem with FlashPlayer. What I need is to have it working on full speed when it is in the THROTTLE mode - that means when FlashPlayer loose its focus and decrease framerate to about 4fps. This is commonly know as a feature for mobile phones or when you change a tab in your browser and your .swf movie doesn't run with full speed anymore.
I need this full speed because we run tests with flash swfs on virtual servers, and unfortunatelly tests run very long.
I found that in FP11.2 was ThrottleEvent introduced that inform you what Flash Player is doing. It can go to PAUSE, THROTTLE, or RESUME state. Unfortunatelly it seems that I can't force other stage.frameRate when it really goes into any of these states. I tried also with Event.DEACTIVATE, and Event.ACTIVATE without any results.
Can I go around this any way? Or if not, what version of FlashPlayer was the latest before Adobe incorporated this feature into FP?
Thanks for any response!
Kindest Pawel
you should try
stage.addEventListener(ThrottleEvent.THROTTLE, doStuff)

Embed a browser window within a Flash movie

My question of the day is: in the same way a UIWebView on XCode behaves, is it possible to embed a website or browser window in an Adobe Flash movie? Like an iframe, but within Flash itself.
Is this even technically possible? Do I even want to attempt this?
Thanks in advance.
The true answer is no.
But there are workarounds, one of them is the Flex Iframe mentioned above.
The workaround is based on a real iFrame rendered by JavaScript above the Flash and smart communication between Flash and that JavaScript.
The big drawback though is the wmode=opaque you have to use in order to enable anything to render above the Flash. There are accessibility issues, performance issues and even stability issues associated with the opaque mode, however sometimes you got to do what you got to do.
Check my question on this topic, especially note the Adobe Flash Player Bug and Issue link, do some investigation first to make sure it won't kill your project.
It would seem that it is possible. I have come across a few examples in the past, but never done it myself.
This link might help you with your research...
http://code.google.com/p/flex-iframe/
as might this, which has an explanation and further links...
http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
I don't know how up to date this content is though.

AS3: How to get fullscreen and keyboard input?

Since flash doesn't allow keyboard input while in fullscreen mode I'm wondering if there is a workaround to that?
I have a flash that is going to run fullscreen in a browser and needs different kinds of keyboard input. I have read something about AIR, but I don't fully understand it and would like another way if thats even possible.
Anybody knows?
public function setFullScreen():void
{
this.width = Capabilities.screenResolutionX;
this.height = Capabilities.screenResolutionY;
this.stage.align = StageAlign.TOP_LEFT;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}
Use the FULL_SCREEN_INTERACTIVE
This is now possible in Flash Player 11.3+
Simply compile your application to support a minimum version of 11.3.0 and it will work if you use:
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
in your html you must put:
<param name="allowFullScreenInteractive" value="true" />
you will see a prompt when you enter full screen:
you can see an example on this official adobe blog:
http://www.leebrimelow.com/wp-content/uploads/2012/04/overlay.gif
It is not possible to get input key with fullscreen mode within the browser.
Air is only for desktop application so if your application have to work into the browser no Air for you.
If you have to get input into fullscreen mode you can try to make a virtual keyboard (an example) and user will use the mouse to press the keyboard key.
It actually is possible in Flash 10, but only for a few keys. See this page:
Understanding the security changes in Flash Player 10
Flash Player 9 does not allow keyboard
input when displaying content in
full-screen mode. Flash Player 10
changes this, allowing for a limited
number of keys to be usable in
full-screen mode. These include Tab,
the Spacebar, and the (up, down, left,
right) arrow keys.
Another option is to just use the browser's built-in fullscreen capability. All major browsers offer it as far as I know (IE, Firefox, Chrome, etc). Usually it's under View->Fullscreen, hotkey F11. Depending on the browser it will either give you the entire screen, or maybe leave a small bar across the top/bottom. Then you simply need to make your flash application expand to fill the entire HTML page.
Patrick is right. Due to security risks, your going to have a tough time getting your goal met. Adobe AIR is your best solution and will be easy to achieve in your state.
Here is a great video to get your started from Lee Brimelow. http://theflashblog.com/?p=403 (Building AIR Applications in Flash CS3)
Since AIR applications are built right in Flash or Flex, all you will need to do is configure how your application compiles, and you have yourself a Adobe AIR application capable of utilizing the keyboard while running as a cross platform desktop application.
Ahh, AIR is not for browsers? Too bad. Seems like I won't be able to get everything I wish for :p I have functions for the most important things without the keyboard functions, but I would really like them all of course.
I'll look into Silverlight then and see if thats an option.
Thanks guys! :)