Categories
Articles

Local SWF Launch and Actionscript 9 UrlRequest and Flex Sdk 2 mxmlc

I was recently trying the URLRequest class in Actionscript 9 and hit this runtime error:

SecurityError: Error #2148: SWF file file:///C|/Documents%20and%20Settings/Lon/My%20Documents/Flash/Flash9/mxmlc/Loader/LoaderEx01.swf cannot access local resource file:///C|/Documents%20and%20Settings/Lon/My%20Documents/Flash/Flash9/mxmlc/Loader/PablumPicasso.jpg. Only local-with-filesystem and trusted local SWF files may access local resources.
at flash.display::Loader/get content()
at LoaderEx01/::imgLoaded()

The code example is was trying is:

package {
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
import flash.system.Security;
import flash.text.TextField;
public class LoaderEx01 extends Sprite {

//private var context:LoaderContext = new LoaderContext();
private var container:Sprite = new Sprite();
private var pictLdr:Loader = new Loader();
public function LoaderEx01()
{

var sandBoxType:String = String(Security.sandboxType);
var display_txt:TextField = new TextField();
display_txt.text = sandBoxType;
addChild(display_txt);
addChild(container);
var pictURL:String = "PablumPicasso.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
// To load swf locally and use Flex SDK 2binmxmlc add -use-network=false
// argument. The Flash 9 Alpha will allow swf to load locally and load image.
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
}
private function imgLoaded(e:Event):void {
addChild(pictLdr.content);

}
}
}

I was using the Flex SDK 2 mxmlc compiler to create the swf file. Now it compiled perfectly. When I went to launch the swf from the local file server I got the security error message. However if I tried this in the Alpha version of the Flash 9 IDE it worked fine.

After a bit of research I found the option you need to set for mxmlc. It is -use-network=false. Once I added this switch to the command line the resulting swf could be loaded locally. I am using a Windows (DOS) batch file and so the resulting file appears as follows with the new switch:

"C:Program FilesAdobeFlex Builder 2Flex SDK 2binmxmlc" "-use-network=false" "C:Documents and SettingsLonMy DocumentsFlashFlash9mxmlcLoaderLoaderEx01.as"
Categories
Articles

It Is the Apple of My IEye

Is it a sign of technology changing? Apple Computer Inc. has dropped the word computer from its name. The company known for making the personal computer popular and claiming the better GUI interface with the Mac in now known as Apple Inc.

Cannot imagine being called Apple, Inc in the 1970’s when computing was perculating into social consciousness. What would we have thought? Was it a grower of apples, a distributer of apples, a canner of apples, what?

We would not even have winked a thought that it would have been a TV, music or a phone enterprise.

Of course we have the IPod and now the IPhone from Apple. These products embed computer technology. Embedding computer technology are predictions of the 1980’s and 1990’s – computers in everything from doorknobs to fingernails. As well science fiction writers play with stories of embedded intelligence evolving to where we do not control it or understand it (Spiderman 2 if you are looking for a more recent example).

I am not yet an IPod owner. I do see more folks running around with IPod patches (IPods strapped to the upper arm or other body parts). I suspect will not be waiting to be an IPhone owner unless there is a compelling business (money to be made) reason. I am likely to be a holdout for IShades – sun glasses that contain my phone, computer and internet access. Real cool idea for a modern Dick Tracy television series.

But why stop there, how about IEyes. Just pluck them out and place the biotech versions in your sockets. Bink once you see the world. Blink again you see I Love Lucy. Blink again you are Googling. Blink again you see spam. Blink again …

Well Ithink Ibetter Igo Inow. May many happy bits flow your Iway.

Lon Hosford

Categories
Articles

Installing IE 7

A long long long install to get IE 7 in. At least 5 minutes on my Intel 4, 2.66GHz, 1024 RAM machine. Even longer on other machines.

Microsoft has given us productivity software that was counter balanced with incessant updates that consume mental continuity and time.

SIMPLIFY MS!

Categories
Articles

Flash Player 9 Supports Full Screen Mode

This version of the Flash player supports Vista. It also supports full screen mode inside of web players. A short tutorial on full screen mode can be found at

Exploring full-screen mode in Flash Player 9

In addition to the above there are a number of bug fixes. More information at the following link:

Adobe Flash Player 9 Release Notes