Highlighted

Code to open local ".air app A" from a button click on ".air app B."

Explorer ,
Jan 06, 2018

Copy link to clipboard

Copied

I have a large Table of Contents swf that opens swf files perfectly in the browser. In converting to AIR, I am stymied at trying to find the proper code to open local ".air app A" from a button click on ".air app B." I do not want it to function in the same window, but to simply open another app.

I was overjoyed when the following worked in the TEST version of the swf, but I later learned that it does not serve in the published AIR app.

import flash.events.MouseEvent;

import flash.net.URLRequest;

var openswf:String=("A-Unit 1 - Strings - 2018 - Finger Tap Posture.air", "_self");

var request:URLRequest = new URLRequest(openswf);

open1_btn.addEventListener(MouseEvent.CLICK,openClick);

function openClick(event:MouseEvent):void

{

try

{

navigateToURL(request);

}

catch(e:Error)

{

trace("Error");

}

}

Any help is appreciated.

TOPICS
AIR for desktop, AIR help and resources, FAQ, Packaging and deploying AIR applications, Performance issues

Views

525

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Code to open local ".air app A" from a button click on ".air app B."

Explorer ,
Jan 06, 2018

Copy link to clipboard

Copied

I have a large Table of Contents swf that opens swf files perfectly in the browser. In converting to AIR, I am stymied at trying to find the proper code to open local ".air app A" from a button click on ".air app B." I do not want it to function in the same window, but to simply open another app.

I was overjoyed when the following worked in the TEST version of the swf, but I later learned that it does not serve in the published AIR app.

import flash.events.MouseEvent;

import flash.net.URLRequest;

var openswf:String=("A-Unit 1 - Strings - 2018 - Finger Tap Posture.air", "_self");

var request:URLRequest = new URLRequest(openswf);

open1_btn.addEventListener(MouseEvent.CLICK,openClick);

function openClick(event:MouseEvent):void

{

try

{

navigateToURL(request);

}

catch(e:Error)

{

trace("Error");

}

}

Any help is appreciated.

TOPICS
AIR for desktop, AIR help and resources, FAQ, Packaging and deploying AIR applications, Performance issues

Views

526

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 06, 2018 0

Have something to add?

Join the conversation