I made a workaround by using static images on my server, so the link 
does not make the error anymore. It works fine in this situation, but 
I'd still sure like to know what the answer to this is because I've run 
into it before.

[EMAIL PROTECTED] wrote:
> I have run into a problem with accessing youtube images. I can access 
> them once but not twice. .
> Here is the example: http://journeyblueheaven.com/index.php
>
> You can click on "Watch" once, and it loads an XML file from a youtube 
> rss, and diplays the results, including images from youtube. So far so 
> good. But then,  but if you click on anything else, it attempts to make 
> the images not visible and triggers the sandbox violation below, which 
> requires me to set a policy flag.
>
> This line triggers the error: Main.mxml:173 "mainImgBox.visible = false;"
> This is not the sandbox violation where my swf cannot access  another 
> domain. This issue is similar to the one described on this page:
> http://www.cynergysystems.com/blogs/page/karljohnson?entry=working_around_security_sandbox_errors
>  
>
>
> Only that page loads images with mxml.
> The way I am loading the images is with actionscript
> newImage.source = xml.src;
>
> How do I set the policy file flag in this situation, or do I need to 
> load the images some other way ?
> If I try
> [Bindable]
>    var loaderContext : LoaderContext;
>    private function imageInit() : void
>    {
>       loaderContext = new LoaderContext();
>       loaderContext.checkPolicyFile = true;
>    }
> newImage.loaderContext = "{loaderContext}";
>    newImage.initialize = "imageInit()" ;
>
> I get this error:
> K:\flex3\jbh\fdjbh\Main.mxml(225):  Error: Implicit coercion of a value 
> of type String to an unrelated type flash.system:LoaderContext.
> Do I have the wrong syntax, perhaps ?
>
>
>
> The code is here: http://journeyblueheaven.com/Main.mxml
>
>
> SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: 
> http://journeyblueheaven.com/fdjbh.swf cannot access 
> http://2.gvt0.com/ThumbnailServer2?app=vss&contentid=0f9a9bc1bda569e6&offsetms=600000&itag=w160&hl=en&sigh=EMg47-bM9077Aklrd1oumF_zqec.
>  
> A policy file is required, but the checkPolicyFile flag was not set when 
> this media was loaded.
>    at flash.display::BitmapData/draw()
>    at 
> mx.effects.effectClasses::MaskEffectInstance/getVisibleBounds()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\effectClasses\MaskEffectInstance.as:771]
>    at 
> mx.effects.effectClasses::MaskEffectInstance/initMask()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\effectClasses\MaskEffectInstance.as:650]
>    at 
> mx.effects.effectClasses::MaskEffectInstance/startEffect()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\effectClasses\MaskEffectInstance.as:463]
>    at 
> mx.effects::Effect/play()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\Effect.as:930]
>    at 
> mx.effects::EffectManager$/createAndPlayEffect()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\EffectManager.as:716]
>    at 
> mx.effects::EffectManager$/http://www.adobe.com/2006/flex/mx/internal::eventHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\effects\EffectManager.as:575]
>    at flash.events::EventDispatcher/dispatchEventFunction()
>    at flash.events::EventDispatcher/dispatchEvent()
>    at 
> mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
>    at 
> mx.core::UIComponent/setVisible()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1903]
>    at mx.core::UIComponent/set 
> visible()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1870]
>    at Main/changeState()[K:\flex3\jbh\fdjbh\Main.mxml:173]
>    at Main/__button1_mouseUp()[K:\flex3\jbh\fdjbh\Main.mxml:302]
>
>
>
> Tim Hoff wrote:
>  > * *
>  >
>  > *private* *function* effectEndHandler():*void* {
>  >     callLater(showBox);
>  > }
>  >
>  > *private* *function* showBox():*void*{
>  >     mainImgBox.visible = *true*;
>  > }
>  >
>  > -TH
>  >
>  > --- In flexcoders@yahoogroups.com, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 
> wrote:
>  > >
>  > > I have this box which I want to wipe left to hide and then wipe right
>  > > to show.
>  > > It hides all right and then it called the effectEndHandler, but
>  > > mainImgBox.visible = true; does not do anything. There is no wipe right
>  > > and the box does not appear. what am I doing wrong ?
>  > >
>  > >
>  > >
>  > > <mx:VBox id="mainImgBox" hideEffect="{wipeLeft}" 
> showEffect="{wipeRight}">
>  > > <mx:Image id="mainImg"
>  > > source="@Embed(source='../media/jbh.jpg')"
>  > > />
>  > > </mx:VBox>
>  > >
>  > > <mx:WipeLeft id="wipeLeft" duration="1000"
>  > > effectEnd="effectEndHandler()" />
>  > > <mx:WipeRight id="wipeRight" duration="1000"/>
>  > >
>  > > private function effectEndHandler():void {
>  > >
>  > > mainImgBox.visible = true;
>  > > }
>  > >
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location: 
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
>
>
>
> ------------------------------------------------------------------------
>
>
>
> Checked by AVG - http://www.avg.com 
> Version: 8.0.169 / Virus Database: 270.7.0/1680 - Release Date: 9/19/2008 
> 8:25 AM
>
>   

Reply via email to