Admob & ActionScript 3 - actionscript-3

I saw that Admob just released an SDK for Flash Lite (Action Script 2). I'm working on an AS3
project, and could not find anywhere on the internet an AS3 version of the SDK.
Does anyone have any knowledge of such an SDK for AS3 or using the AS2 SDK in AS3.
Thanks
Can

There is no as3 sdk. Also the as2 sdk does not work in as3. It needs to be rewritten in as3. I am not very talented with as3. Can someone rewrite the AdMobAd.as class to as3?

You could try to use the AS2 SDK in an AS2 file that has some methods exposed or reads some URL variables and then try to load that AS2 SWF file into an AS3 container. More info on loading AS2 files in AS3 containers can be found here:
Load AS2 SWF Into AS3 SWF and pass vars in URL
and here:
http://www.kirupa.com/forum/showpost.php?p=1964550&postcount=249
It's a total pain, but it beats having to write the SDK all over again in AS3.

You can check my test flash application for android. I use the StageWebView with html to load the admob. What u need to do is hosting your html page which embeds the admob ads on your web host, then load the html page in your application by StageWebView.

Related

Flash CC on OS X: Where is the ActionScript 3.0 library?

For the life of me, I can't find the AS3 lib. I know in Flash CS6, I can find it at:
/Applications/Adobe Flash CS6/Common/Configuration/ActionScript 3.0/libs
I need to point my IDE at it, and the company I'm at can ONLY use Flash CC going forward (Corporate reasoning), and I'm the first one on the team to have to use Flash CC. My workaround is to use a trial version of CS6, but I'd like to figure this out.
Flash CC supports AS3, so the library has to be somewhere, right? If not, how does it function without it?
Thanks!
It's inside the app package:
/Applications/Adobe Flash CC 2015/Adobe Flash CC 2015.app/Contents/Common/Configuration/ActionScript 3.0/libs
To navigate to this folder, right click on the Adobe Flash CC 2015.app and choose "Show Package Contents".

is it possible to open external swf in new flash player with AS3 or AS2?

is it possible to open external swf in new flash player with AS3 or AS2? I've been searching everywhere for this, but most of what i found is that it's loading into new browser tab not other flash player.
There is no function to execute a new Flash Player.
If you think in this way: Flash Player is an executable in visitor's computer. If you can launch Flash Player, you can launch any executable you want. This causes security problem.
Therefore, you can't launch a new Flash Player.
fscommand(exec) only works with Windows Projector(exe) File, not SWF.

Initialize function not fired in actionscript 3?

I'm trying to figure out the basics of an flash action script project. I downloaded a plugin (from Brightcove). As far as I can tell, it only has 2 relevant files.
BrightcovePlayerAPI.swc - the brightcove player api which you can import into your project
CaptionPlugin.as - just a small script that's supposed to load a dfxp.xml file.
I can't seem to get the function initialize() to fire in CaptionPlugin.as. I don't know what I'm doing wrong. Here's how I set up my project in Adobe Flash CS4:
start a flash actionscript 3 project
Save project as CaptionPlugin.fla
Go to properties panel and fill the class field with the word CaptionPlugin
Go to Publish Settings>Flash (tab)>settings>Library Path and included the BrightcoverPlayerAPI.swc as a line item
Saved all my changes
Went to Debug>Debug movie
I don't see my trace() statement inside the initialize() function fire at all? Can anyone suggest how i can debug this problem, or suggest what I might be doing wrong?
Ok, so this is the first time I've ever encountered Brightcove but I've had a quick look at their website and this is how it works. Brightcove is a service that allows you to customise and publish a cloud-based video player whilst the API you've downloaded only allows you to create custom modules or plugins to be integrated into this video player, see Creating Custom Player Components.
These components or custom modules are not intended to work as a stand-alone Flash file so the initialize() function won't be invoked when you run it alone. Once integrated with the video player and published correctly, the player will call initialize() when ready and your custom module will behave as you expect. See Getting Started with the Flash-Only Player for full details on how to publish the player.

Include MX library to Flash CS5 project

I need to use some classes belong to mx library, but when I try to import it Flash throws me an error that it can't find this library.
How can I import it to my project? I'm using Adobe Flash Professional CS5.
You may try downloading the Flex SDK, get mx.swc from Flex\frameworks\lib and add it to your library path (ActionScript Settings > Library Path) in Flash CS5.

Can an actionScript2 app be used inside a AS3 app?

I've inherited an AS2 app that has a lot of functionality. I need to embed this thing somehow in my AS3 app so I can execute function calls etc and basically control it. Has anyone ever tried something like this? I'm assuming I'll have to URLLoader the AS2 SWF into a MovieClip and take it from there.
AS3 SWF (AVM2 movie) can load AS2 movies (AVM1 movie) using the Loader class, but cannot access the methods/properties of it. The loaded AS2 movie will be of type AVM1Movie (and not MovieClip).
Livedocs page about AVM1Movie
The two movies can communicate with each other using the LocalConnection class. See sending data from avm2 to avm1
Grant Skinner has a very useful pair of classes that simplify AS3<->AS2 communications over LocalConnection. We've used it to great success.
http://www.gskinner.com/blog/archives/2007/07/swfbridge_easie.html