Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mstandio/SaladoPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
mstandio committed Jan 27, 2013
2 parents fcf223d + 8538d3d commit 2608f55
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*~
Expand Up @@ -31,7 +31,8 @@ package com.panozona.modules.imagebutton.controller{
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;

import flash.system.LoaderContext;

public class ButtonController {

private var _buttonView:ButtonView;
Expand All @@ -53,9 +54,11 @@ package com.panozona.modules.imagebutton.controller{

if (_buttonView.windowData.button.path != null){
var buttonLoader:Loader = new Loader();
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.checkPolicyFile = true;
buttonLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, buttonImageLost);
buttonLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, buttonImageLoaded);
buttonLoader.load(new URLRequest(_buttonView.windowData.button.path));
buttonLoader.load(new URLRequest(_buttonView.windowData.button.path), context);
}

subButtonControllers = new Vector.<SubButtonController>();
Expand Down Expand Up @@ -107,4 +110,4 @@ package com.panozona.modules.imagebutton.controller{
}
}
}
}
}
Expand Up @@ -37,7 +37,9 @@ package com.panozona.modules.imagegallery.controller {
import flash.events.TimerEvent;
import flash.net.URLRequest;
import flash.utils.Timer;

import flash.system.ApplicationDomain;
import flash.system.LoaderContext;

public class ImageController {

private var imageLoader:Loader;
Expand Down Expand Up @@ -92,7 +94,9 @@ package com.panozona.modules.imagegallery.controller {
var path:String = _imageView.imagegalleryData.viewerData.getGroupById(
_imageView.imagegalleryData.viewerData.currentGroupId).getChildrenOfGivenClass(Image)
[_imageView.imagegalleryData.viewerData.currentImageIndex].path;
imageLoader.load(new URLRequest(path));
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.checkPolicyFile = true;
imageLoader.load(new URLRequest(path), context);
}

private function imageLost(e:IOErrorEvent):void {
Expand Down Expand Up @@ -226,4 +230,4 @@ package com.panozona.modules.imagegallery.controller {
}
}
}
}
}
9 changes: 6 additions & 3 deletions src/com/panozona/modules/imagemap/controller/MapController.as
Expand Up @@ -48,7 +48,8 @@ package com.panozona.modules.imagemap.controller {
import flash.geom.Rectangle;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;

import flash.system.LoaderContext;

public class MapController {

private var _mapView:MapView;
Expand Down Expand Up @@ -119,7 +120,9 @@ package com.panozona.modules.imagemap.controller {
private function handleCurrentMapIdChange(e:Event):void {
mapContentLoader.unload();
destroyWaypoints();
mapContentLoader.load(new URLRequest(_mapView.imageMapData.mapData.getMapById(_mapView.imageMapData.mapData.currentMapId).path));
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.checkPolicyFile = true;
mapContentLoader.load(new URLRequest(_mapView.imageMapData.mapData.getMapById(_mapView.imageMapData.mapData.currentMapId).path), context);
if (previousMapId != null) {
_module.saladoPlayer.manager.runAction(_mapView.imageMapData.mapData.getMapById(previousMapId).onUnset);
}
Expand Down Expand Up @@ -268,4 +271,4 @@ package com.panozona.modules.imagemap.controller {
}
}
}
}
}
Expand Up @@ -32,7 +32,8 @@ package com.panozona.modules.menuscroller.controller {
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;

import flash.system.LoaderContext;

public class ElementController {

private var initSize:Size;
Expand Down Expand Up @@ -61,9 +62,11 @@ package com.panozona.modules.menuscroller.controller {
}

var imageLoader:Loader = new Loader();
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.checkPolicyFile = true;
imageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, imageLost, false, 0, true);
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded, false, 0, true);
imageLoader.load(new URLRequest(_elementView.elementData.rawElement.path));
imageLoader.load(new URLRequest(_elementView.elementData.rawElement.path), context);
}

private function getMouseEventHandler(actionId:String):Function {
Expand Down Expand Up @@ -191,4 +194,4 @@ package com.panozona.modules.menuscroller.controller {
}
}
}
}
}
Expand Up @@ -34,6 +34,7 @@ package com.panozona.player.manager.utils.loading{
this.loadables = loadables;
loaders = new Vector.<Loader>();
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.checkPolicyFile = true;
for (var i:int = 0; i < loadables.length; i++) {
if (loadables[i].path == null || !loadables[i].path.match(/^.+(.jpg|.jpeg|.png|.gif|.swf)$/i)) {
dispatchEvent(new LoadLoadableEvent(LoadLoadableEvent.LOST, loadables[i]));
Expand Down
7 changes: 5 additions & 2 deletions src/com/panozona/spots/nadirspot/NadirSpot.as
Expand Up @@ -27,7 +27,8 @@ package com.panozona.spots.nadirspot {
import flash.events.IOErrorEvent;
import flash.net.URLRequest;
import flash.system.ApplicationDomain;

import flash.system.LoaderContext;

public class NadirSpot extends Sprite{

private var button:Sprite;
Expand Down Expand Up @@ -63,9 +64,11 @@ package com.panozona.spots.nadirspot {
}

var loader:Loader = new Loader();
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
context.checkPolicyFile = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, imageLost);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
loader.load(new URLRequest(nadirSpotData.settings.path));
loader.load(new URLRequest(nadirSpotData.settings.path), context);
}

private function imageLost(e:IOErrorEvent):void {
Expand Down

0 comments on commit 2608f55

Please sign in to comment.