PDA

View Full Version : Security Sandbox Violation on HDividedBox resize


myshkin
04-21-2009, 09:42 PM
My test code is 40 lines total. Now why do I get a sanbox violation when resizing the HDividedBox? I seem to be getting the same violation when trying to drag the icons.

I get that the images are loading data in a seperate security context from the app: context, but how is dragging the HDiv box causing any conflicts?

I am baffeled as to why either one is giving my a sandbox violation.

Any pointers?


<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
initialize="fillList()" >

<mx:HDividedBox x="0" y="0" width="100%" height="100%">
<mx:TileList width="100%" height="100%" dataProvider="{imageFiles}" dragEnabled="true">
<mx:itemRenderer><mx:Component>
<mx:Image source="{data}" />
</mx:Component></mx:itemRenderer>
</mx:TileList>
<mx:TileList width="100%" height="100%" dataProvider="{imageFiles}" dragEnabled="true">
<mx:itemRenderer><mx:Component>
<mx:Image source="{data}" />
</mx:Component></mx:itemRenderer>
</mx:TileList>
</mx:HDividedBox>

<mx:Script>
<![CDATA[

[Bindable]
private var imageFiles:Array = new Array()

public function fillList():void {
var directory:File = new File("C:/Documents and Settings/All Users/Documents/My Pictures/Sample Pictures");
var files:Array = directory.getDirectoryListing();

for each (var f:File in files)
{
if (f.name.match(/.jpg$/i)) {
imageFiles.push(f.url);
}
}
}
]]>
</mx:Script>

</mx:WindowedApplication>