Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-03-2011, 10:48 AM   #1
00zhang
Registered User
 
Join Date: Nov 2007
Location: Hong Kong
Posts: 26
Send a message via MSN to 00zhang
Question My SWF got problems in AIR

I created an SWF, named e-Notice.swf, when I test Movie, publish setting is Flash Player 10.

And I copied e-Notice.swf to a directory under Apache, so it can be accessed by URL:

localhost/shadow-enotice-cms/e-Notice.swf

Note:under C:\Program Files\Apache Software Foundation\Apache2.2\htdocs, I also put a crossdomain.xml file.
00zhang is offline   Reply With Quote
Old 05-03-2011, 10:50 AM   #2
00zhang
Registered User
 
Join Date: Nov 2007
Location: Hong Kong
Posts: 26
Send a message via MSN to 00zhang
Default

sorry I always got errors saying I can't post link so I have to cut my post into pieces to change them~~~
00zhang is offline   Reply With Quote
Old 05-03-2011, 10:51 AM   #3
00zhang
Registered User
 
Join Date: Nov 2007
Location: Hong Kong
Posts: 26
Send a message via MSN to 00zhang
Default

continue the problem:

After that, I created an AIR2.0 program, called player.swf, and use it to load e-Notice.swf:

Code:
function startLoad()
{
	var  conText:LoaderContext = new LoaderContext();
	conText.allowLoadBytesCodeExecution = true;
	var mLoader:Loader = new Loader();
	var mRequest:URLRequest = new URLRequest("h t t p : / /l ocalhost/shadow-enotice-cms/e-Notice.swf");
	mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
	mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
	mLoader.load(mRequest);
}

function onCompleteHandler(loadEvent:Event)
{
	removeChild(perTxt);
	addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent)
{
	var percent:Number = (mProgress.bytesLoaded/mProgress.bytesTotal)*100;
	perTxt.text = percent + "%";
}
startLoad();
00zhang is offline   Reply With Quote
Old 05-03-2011, 10:52 AM   #4
00zhang
Registered User
 
Join Date: Nov 2007
Location: Hong Kong
Posts: 26
Send a message via MSN to 00zhang
Default

then publish the AIR program, and install it.

The problem: when I played e-Notice.swf in AIR, something didn't work.


If I test the Air Movie in Flash CS5, I got some prompt:

Warning: Ignoring 'secure' attribute in policy file from fpdownload.adobe.com/pub/swz/crossdomain.xml. The 'secure' attribute is only permitted in HTTPS and socket policy files. See ... for details.
00zhang is offline   Reply With Quote
Old 05-03-2011, 10:53 AM   #5
00zhang
Registered User
 
Join Date: Nov 2007
Location: Hong Kong
Posts: 26
Send a message via MSN to 00zhang
Default

[SWF] /shadow-enotice-cms/e-Notice.swf/[[DYNAMIC]]/3 - 5445151 bytes after decompression
*** Security Sandbox Violation ***
SecurityDomain 'localhost/shadow-enotice-cms/e-Notice.swf' tried to access incompatible context 'app:/player.swf'
*** Security Sandbox Violation ***
SecurityDomain '/localhost/shadow-enotice-cms/e-Notice.swf' tried to access incompatible context 'app:/player.swf'
SecurityError: Error #2070: Security sandbox violation: caller localhost/shadow-enotice-cms/e-Notice.swf/[[DYNAMIC]]/3 cannot access Stage owned by app:/player.swf.
at flash.display::Stage/requireOwnerPermissions()
at flash.display::Stage/addEventListener()
at fl.text::TLFTextField/invalidate()[F:\stage\Flash11_Main_485_Stage\main\authortool\St age\tlfRuntime\fl\text\TLFTextField.as:789]
at fl.text::TLFTextField/setSelection()[F:\stage\Flash11_Main_485_Stage\main\authortool\St age\tlfRuntime\fl\text\TLFTextField.as:5768]
at fl.text::TLFTextField/switchToEditingMode()[F:\stage\Flash11_Main_485_Stage\main\authortool\St age\tlfRuntime\fl\text\TLFTextField.as:6185]
at fl.text::TLFTextField/replaceText()[F:\stage\Flash11_Main_485_Stage\main\authortool\St age\tlfRuntime\fl\text\TLFTextField.as:5650]
at fl.text::TLFTextField/set text()[F:\stage\Flash11_Main_485_Stage\main\authortool\St age\tlfRuntime\fl\text\TLFTextField.as:3961]
at e_fla::eNoticeContent_1/onConXMLLoaded()[e_fla.eNoticeContent_1::frame1:69]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
00zhang is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:12 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.