LocalConection between a AIR application and Flash Player application - actionscript-3

I'm trying to connect a AS2(swf on Flash player using Flash CS4) and AS3(swf on AIR using Flash Builder 4), but I get an error when I send a command from the AIR app:
[StatusEvent type="status" bubbles=false cancelable=false eventPhase=2 code=null level="error"]
How can I debug this?

Recently I tried LocalConnection between as3 and as2 too with little luck. Then I found SWFBridge classes by Grant Skinner, and they worked for me.

Related

AS3 AIR loading online mp3 - Error #2044: Unhandled IOErrorEvent:

UPDATE: Any version of AIR is blocking any external content. This simple pic script won't work either.
var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("http://edvizenor.com/images/Ed-Vizenor.png"));
addChild(my_loader);
BUT HOW DO I FIX THIS?
UPDATE: More error info:
Attempting to launch and connect to Player using URL C:\Flash Apps 2014\Real Projects\Fr Letherby\Homily.swf
[SWF] C:\Flash Apps 2014\Real Projects\Fr Letherby\Homily.swf - 981 bytes after decompression
*** Security Sandbox Violation ***
Connection to http://traffic.libsyn.com/frleatherby/2015Jul18.mp3 halted - not permitted from file:///C|/Flash%20Apps%202014/Real%20Projects/Fr%20Letherby/Homily.swf
-- Untrusted local SWFs may not contact the Internet.
SecurityError: Error #2028: Local-with-filesystem SWF file file:///C|/Flash%20Apps%202014/Real%20Projects/Fr%20Letherby/Homily.swf cannot access Internet URL http://traffic.libsyn.com/frleatherby/2015Jul18.mp3.
at flash.media::Sound/_load()
at flash.media::Sound/load()
at Homily_fla::MainTimeline/frame1()[Homily_fla.MainTimeline::frame1:2]
Cannot display source code at this location.
BELOW IS THE ORIGINAL POST.
I just got a new comp using windows 8 and installed creative cloud. I am using the Flash IDE and I am trying to load a sound from online. It's a simple script but I am getting this error below.
NOTE: I am using Air 17.0 for Android. It's not working. However, when I load this same script in the flash player it works.
As you can see it's a valid live link: http://traffic.libsyn.com/frleatherby/2015Jul18.mp3
But it won't play. Did abode block this streaming feature? What simple line am I missing. This was so easy before. Is it a setting on my new computer? Thanks for any tips.
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.media.Sound;
import flash.net.URLRequest;
public class Main extends MovieClip {
public function Main() {
// constructor code
var mySound:Sound = new Sound();
mySound.load(new URLRequest("http://traffic.libsyn.com/frleatherby/2015Jul18.mp3"));
mySound.play();
}
}
}
THE ERROR
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at Main()[C:\Flash Apps 2014\Real Projects\Fr Letherby\Main.as:13]
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at ADLAppEntry/run()
at global/runtime::ADLEntry()
[UnloadSWF] Homily.swf
Test Movie terminated.
From your updates, this seems to be a security violation, and you will need to provide AIR the necessary permissions to be able to do this. Try this at the start of your application:
Security.allowDomain("Your Domain URL here");
And, In Flash IDE by going to File->Publish Settings->Flash->Local playback security and choosing either ‘Access local files only’ or ‘Access network only’.
If your application is web-based and is accessing a web-service of some kind on a different domain to the one the .swf file is hosted on you can get a sandbox violation if the domain you are accessing does not have a valid cross domain policy in place. You would also need to place a crossdomain.xml file at the root of your server which you are trying to access. It looks like this:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
<site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>
Hope this helps.

ActionScript 3 Error when dynamically playing audio

I am writing a game for Air iOS. I have an audio file, saved in the same directory as my .fla file. Here is the code I am using to play it:
import flash.net.URLRequest;
var snd:Sound = new Sound(new URLRequest("507560_-BlastProcess-.mp3"));
snd.play(0, 40);
This is the error I get when testing in thew Air Debug Launcher:
[SWF] Spike%20Jungle.swf - 72668 bytes after decompression
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at SpikeJungle_fla::MainTimeline/frame1()[SpikeJungle_fla.MainTimeline::frame1:128]
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at ADLAppEntry/run()
at global/runtime::ADLEntry()
[UnloadSWF] Spike%20Jungle.swf
Test Movie terminated.
How do I fix this?
Either need a cross-domain or the path to the file is incorrect.
Your AIR app is probably not running in the same folder as your mp3. See where your compiled air app is being stored and move the mp3 to that folder.
http://www.judahfrangipane.com/blog/2007/02/15/error-2032-stream-error/
You may also want to use a SoundChannel so you can stop the sound

Insert a video on Action Script 3.0

Hi I'm trying to put a FLV video into a flash adobe CC actionscript project and it gives me an error like this one when I try to get to the corresponding photogram:
Error #2044: Unhandled skinError:. text=[SecurityErrorEvent
type="securityError" bubbles=false cancelable=false eventPhase=2
text="Error #2140: Security sandbox violation:
file:///C|/Users/Gael/Desktop/pfc/proxecto.swf cannot load
file:///C|/Users/Gael/Desktop/pfc/SkinOverAllNoVolNoCaptionNoFull.swf.
Local-with-filesystem and local-with-networking SWF files cannot load
each other."]
Can someone tell me how to fix this?
This problem is not caused by flv video. It is caused by the player skin SkinOverAllNoVolNoCaptionNoFull.swf compiled with security sandbox type other than security sandbox type of your application.
You need to change Security sandbox type of your proxecto.swf application.
You can configure a SWF file for the local-with-networking sandbox by setting the document’s publish settings in the authoring tool.

Flash Builder Error Compiling Ipad Actionscript Mobile Project

I just bought a brand new ipad for testing. I am using flash buider 4.7 to make an actionscript mobile project. I created an app ID, provisioning profile, and certificate. I have done this before in flash professional so it wasn't too bad. However, when I run or debug even a blank application I get this error in flash builder:
Error occurred while packaging the application:
'Launching AppName' has encountered a problem.
Error occurred while packaging the application.
Exception in thread "main" java.lang.Error: Unable to find llvm JNI lib in:
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar/Darwin
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/aot/lib/x64
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib
at adobe.abc.LLVMEmitter.loadJNI(LLVMEmitter.java:582)
at adobe.abc.LLVMEmitter.<clinit>(LLVMEmitter.java:596)
at com.adobe.air.ipa.AOTCompiler.generateExtensionsGlue(AOTCompiler.java:419)
at com.adobe.air.ipa.AOTCompiler.generateMachineBinaries(AOTCompiler.java:1790)
at com.adobe.air.ipa.IPAOutputStream.createIosBinary(IPAOutputStream.java:378)
at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:762)
at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:91)
at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:245)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:571)
at com.adobe.air.ADT.run(ADT.java:419)
at com.adobe.air.ADT.main(ADT.java:469)
I have no idea where to even start in trying to figure out what could be the problem. I am pretty sure the itunes developer information is correct. Are there any kinds of drivers or developer modes that I need to set for a new iPad?
Thanks!

AIR debug compile error ANE

I am trying to debug my air app but get the error:
Process terminated without establishing connection to debugger.
invalid profile specified 'Application does not support current profile'
Launch command details: "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 AIR 3.5/bin/adl" -runtime "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0 AIR 3.5/runtimes/air/mac" -profile extendedMobileDevice -screensize 768x1004:768x1024 -XscreenDPI 132 -XversionPlatform IOS -extdir "/Users/kerepuki/Documents/Adobe Flash Builder 4.6/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/AppName/macosx/" "/Volumes/Mobile Apps/AppName/Application/Final/bin-debug/AppName-app.xml" "/Volumes/Mobile Apps/AppName/Application/Final/bin-debug"
I don't think it is related to an ANE I am trying to add as I have tested the ANE in a blank project and it works fine.
If I package the app and install on iPad it works fine. I am using AIR 3.5 in Flash Builder and not sure how to debug this error message.
My application file starts with:
<application xmlns="http://ns.adobe.com/air/application/3.5">
Had to remove the supported profile node from the application description file.