Is there any possibility to control the iphone's/android's flashlight through as3? - actionscript-3

Just that: is there any possibility to control the iPhone's flashlight using any class in ActionScript 3?
Thanks in advance,
DGM.-

I do not believe you will be able to do this via any ActionScript API.
You will probably have to write an AIR Native Extension for this.

Related

How to add Library 'android-android-25' to LibGdx?

I'm trying to use the android's AudioRecord in LibGdx, but when I press on "Add library 'android-android-25' to classpath" nothing happens.
I cannot use LibGdx's AudioRecorder, because I want to get the amplitude of the microphone (like .getMaxAmplitude).
Thanks
You can't use AudioRecord class of Android platform because LibGDX is cross platform development library.
but you can use it only for Android platform using interface and core module of LibGDX

How to use MXML mx.controls.Label in ActionScript

I have one AS3 application which was developed entirely in AS3 without using single line of code in MXML. Of late I am realizing that MXML has some rich controls which are not provided in open source Apache Flex SDK. One library which is of most interest to me in mx.controls, it includes Label, DataGrid etc.
Now, I want to extend my AS3 application to call mxml compiled into swf file. I tried to import mx.controls inside my AS3 programs but it does not sense that. Please tell me if I am doing anything wrong. If I am able to import mx.controls inside as3 class it would save me a lot of time. Can I do this?
Alternatively, I am trying to write a few applications in mxml and then call (.swf) in AS3. Is it possible?
I tried Googling but all examples are pointing to using ActionScript inside MXML with [CDATA[]]. But I want the inverse. Calling MXML from ActionScript.
Please explain me at nuts and bolts level as I am struggling with this a lot.
thanks in advace
You can't do that because Flex, that uses MXML, is framework built on top of the Actionscript. But you can do reverse. In Flex MXML you can use Actioscript code, and you can also use Flash components like Sprite, MovieClip... by using UIComponent or SpriteVisualElement as their parent container.

FLVPlayback without Flash CS

I'm implementing Google video Ads in flash game, using FlashDevelop. Google has a sample where they're using FLVPlayback component to display video... problem is, I don't have this class anywhere.
I've searched how to add it, but all solutions say "link to C:\Adobe\Flash CS\Components\etc" path, which obiouvsly without Flash CS I don't have... and don't want to install it just for this :)
I wonder if there is a way to get the FLVPlayback without installing Flash CS?
You can try import external adobe components swc through Flashdevelop interface.
Maybe this can help you: link
I quit and just installed the Flash Professional CC, and there linked to the component path, but it didn't work for some reason. Then I included the FLVPlayback.swf component inside my AS3 app, which compiled etc. but as I learned FLVPlayback wasn't really what I needed.
After some fumbling I made it work with Flex Spark component - VideoPlayer, used inside AS3. You can find some code on the devlist: https://developers.google.com/interactive-media-ads/community?place=msg%2Fima-sdk%2Fc3KH11vxSd0%2FeLuYneYpch4J

StageDisplayState.FULLSCREEN vs StageDisplayState.FULLSCREEN_INTERACTIVE

What's the difference between the the two display states?
StageDisplayState.FULL_SCREEN doesn't support keyboard interactivity. StageDisplayState.FULL_SCREEN_INTERACTIVE does, but it works only with Adobe AIR.
Source: Adobe ActionScript3 Reference
StageDisplayState.FULLSCREEN is available in both AIR and normal Flex web apps, Keyboard is not traced
StageDisplayState.FULLSCREEN_INTERACTIVE available ONLY IN AIR and it allows you to used the keyboard. for ex you can type inside a TextInput in FS only with FullScreenInteractive.
StageDisplayState.FULL_SCREEN_INTERACTIVE can work in flex webapp.when you compile web app,you just need to replace the playerglobal.swc by high version,like 11.7。。。
hope it helps you

Can a Flash application alter the HTML of the page it's on?

Suppose I have a flash application; let's say a chess game. The user is playing against a computer opponent. After every move, I want the flash application to add the move's "description" into the HTML of the page.
Does flash have this ability?
Are there any common round-about ways of doing this? Maybe the flash app updates a database, and some AJAX on the page frequently checks the database and adds content when appropriate.
Are there any examples on the web of this type of functionality?
From ActionScript, you can use ExternalInterface to call Javascript functions in the client browser, so yes, this is possible.
I see in my ActionScript 3.0 Bible, chapter 36 "Interfacing with JavaScript" that you can use flash.external.ExternalInterface to "both call JavaScript functions from Flash and to call ActionScript functions from JavaScript".
Therefore, you can change any DOM element from a JavaScript that you activate from Flash.
Your ActionScript code can access javascript methods that update the page's DOM.
You can access Javascript methods using the ExternalInterface class. more details at:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html