Re: [flexcoders] security issues when capturing flex screens that contain other domain bitmaps

2006-11-03 Thread hank williams
This is generally true, but given that loaderContext wont ever change
the issue is whether it gets initialized before or after the image tag
is instatiated. If it is intialized first then I would think you dont
need the bindable tag. But again, I am not sure, which is why I
caveated it.

Regards,
Hank

On 11/3/06, Agent RR-007 <[EMAIL PROTECTED]> wrote:
> I think that everytime you include the "{" and "}" it requires a
> [Bindable] keyword in the scripts to be linkable. Hope that I am right on
> this one.
>
> Always trust your Agent,
>
> RR-007
>
> On Fri, November 3, 2006 12:07 pm, hank williams said:
> > Yes,  I did find the solution.
> >
> > You need to define a loadercontext. Create a loader context variable in
> > you
> > script section.
> >
> > [Bindable]
> > private var loaderContext:LoaderContext;
> >
> > NOTE: I'm not sure that it needs to be bindable but thats what my code
> > has,
> > so to be safe I am showing it.
> >
> > Then, in some initialization code, initialize the variable
> >
> >loaderContext = new LoaderContext(true);
> >
> > Finally, when loading the graphic into an  object, you must
> > define
> > a loaderContext and use the loader context that you just created, as
> > below.
> >
> >
> > >   loaderContext="{loaderContext}"
> >   verticalAlign="middle"
> >   horizontalAlign="middle"
> >   source="{picture_http}" width ="200" height="200">
> >
> >
> > Hope this helps.
> >
> > Regards,
> > Hank
> >
> > On 11/3/06, Andrew D. Goodfellow <[EMAIL PROTECTED]> wrote:
> >>
> >> I literally just hit this problem now too. Did you ever receive a
> >> solution
> >> Hank? Anyone else?
> >>
> >> -Andy
> >>
> >> On 9/26/06, hank williams < [EMAIL PROTECTED]> wrote:
> >>
> >> >   I have a flex screen that I want to capture into a bitmap using the
> >> > technique that Andrew Trice described earlier this week.
> >> >
> >> > it works as so:
> >> >
> >> > 
> >> >
> >> > private function
> >> > getUIComponentBitmapData(target:UIComponent):BitmapData{
> >> > var bd : BitmapData = new BitmapData( target.width, target.height );
> >> > var m : Matrix = new Matrix();
> >> > bd.draw(target,m);
> >> > return bd;
> >> > }
> >> > 
> >> >
> >> > I am feeding that function a UIComponent that contains an image that
> >> > looks like this:
> >> >
> >> > 
> >> >
> >> >  >> > verticalAlign="middle"
> >> > horizontalAlign="middle"
> >> > source="{model.picture_http}" width ="200" height="200"/>
> >> >
> >> > 
> >> >
> >> > The problem is that the model.picture_http is on another domain.
> >> > The error I get is as follows:
> >> >
> >> > 
> >> > SecurityError: Error #2122: Security sandbox violation:
> >> > BitmapData.draw:
> >> > http://localhost:8080/elroyServer/songmail/songmail-debug.swf cannot
> >> > access
> >> http://storage.elroynetworks.com/0922337203685477580744.
> >> > A policy file is required, but the checkPolicyFile flag was not set
> >> > when this media was loaded.
> >> > 
> >> >
> >> > This seems to suggest that I need a crossdomain.xml file, which is
> >> > fine. I have that, and I believe it is in the right place. The problem
> >> > is I am supposed to set a checkPolicyFile flag. The doc's explain how
> >> > to do this, but not in the context of Flex. The docs say:
> >> >
> >> > 
> >> > When you load the image using the load() method of the Loader class,
> >> > you can specify a context parameter, which is a LoaderContext object.
> >> > If you set the checkPolicyFile property of the LoaderContext object to
> >> > true, Flash Player checks for a cross-domain policy file on the server
> >> > from which the image is loaded. If there is a cross-domain policy
> >> > file, and the file permits the domain of the loading SWF file, the
> >> > file is allowed to access data in the Bitmap object; otherwise, access
> >> > is denied.
> >> >
> >> > You can also specify a checkPolicyFile property in an image loaded via
> >> > an  tag in a text field. For details, see Loading SWF files and
> >> > images using the  tag in a text field.
> >> > 
> >> >
> >> > I dont know how one would use the "load() " command from MXML.
> >> > Moreover, I would really like an MXMLish way to deal with cross domain
> >> > issues.
> >> >
> >> > Has anybody dealt with this?
> >> >
> >> > Hank
> >> >
> >>
> >>
> >>
> >
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

Re: [flexcoders] security issues when capturing flex screens that contain other domain bitmaps

2006-11-03 Thread Agent RR-007
I think that everytime you include the "{" and "}" it requires a
[Bindable] keyword in the scripts to be linkable. Hope that I am right on
this one.

Always trust your Agent,

RR-007

On Fri, November 3, 2006 12:07 pm, hank williams said:
> Yes,  I did find the solution.
>
> You need to define a loadercontext. Create a loader context variable in
> you
> script section.
>
> [Bindable]
> private var loaderContext:LoaderContext;
>
> NOTE: I'm not sure that it needs to be bindable but thats what my code
> has,
> so to be safe I am showing it.
>
> Then, in some initialization code, initialize the variable
>
>loaderContext = new LoaderContext(true);
>
> Finally, when loading the graphic into an  object, you must
> define
> a loaderContext and use the loader context that you just created, as
> below.
>
>
>   loaderContext="{loaderContext}"
>   verticalAlign="middle"
>   horizontalAlign="middle"
>   source="{picture_http}" width ="200" height="200">
>
>
> Hope this helps.
>
> Regards,
> Hank
>
> On 11/3/06, Andrew D. Goodfellow <[EMAIL PROTECTED]> wrote:
>>
>> I literally just hit this problem now too. Did you ever receive a
>> solution
>> Hank? Anyone else?
>>
>> -Andy
>>
>> On 9/26/06, hank williams < [EMAIL PROTECTED]> wrote:
>>
>> >   I have a flex screen that I want to capture into a bitmap using the
>> > technique that Andrew Trice described earlier this week.
>> >
>> > it works as so:
>> >
>> > 
>> >
>> > private function
>> > getUIComponentBitmapData(target:UIComponent):BitmapData{
>> > var bd : BitmapData = new BitmapData( target.width, target.height );
>> > var m : Matrix = new Matrix();
>> > bd.draw(target,m);
>> > return bd;
>> > }
>> > 
>> >
>> > I am feeding that function a UIComponent that contains an image that
>> > looks like this:
>> >
>> > 
>> >
>> > > > verticalAlign="middle"
>> > horizontalAlign="middle"
>> > source="{model.picture_http}" width ="200" height="200"/>
>> >
>> > 
>> >
>> > The problem is that the model.picture_http is on another domain.
>> > The error I get is as follows:
>> >
>> > 
>> > SecurityError: Error #2122: Security sandbox violation:
>> > BitmapData.draw:
>> > http://localhost:8080/elroyServer/songmail/songmail-debug.swf cannot
>> > access
>> http://storage.elroynetworks.com/0922337203685477580744.
>> > A policy file is required, but the checkPolicyFile flag was not set
>> > when this media was loaded.
>> > 
>> >
>> > This seems to suggest that I need a crossdomain.xml file, which is
>> > fine. I have that, and I believe it is in the right place. The problem
>> > is I am supposed to set a checkPolicyFile flag. The doc's explain how
>> > to do this, but not in the context of Flex. The docs say:
>> >
>> > 
>> > When you load the image using the load() method of the Loader class,
>> > you can specify a context parameter, which is a LoaderContext object.
>> > If you set the checkPolicyFile property of the LoaderContext object to
>> > true, Flash Player checks for a cross-domain policy file on the server
>> > from which the image is loaded. If there is a cross-domain policy
>> > file, and the file permits the domain of the loading SWF file, the
>> > file is allowed to access data in the Bitmap object; otherwise, access
>> > is denied.
>> >
>> > You can also specify a checkPolicyFile property in an image loaded via
>> > an  tag in a text field. For details, see Loading SWF files and
>> > images using the  tag in a text field.
>> > 
>> >
>> > I dont know how one would use the "load() " command from MXML.
>> > Moreover, I would really like an MXMLish way to deal with cross domain
>> > issues.
>> >
>> > Has anybody dealt with this?
>> >
>> > Hank
>> >
>>
>>
>>
>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



Re: [flexcoders] security issues when capturing flex screens that contain other domain bitmaps

2006-11-03 Thread hank williams



Yes,  I did find the solution.You need to define a loadercontext. Create a loader context variable in you script section.            [Bindable]            private var loaderContext:LoaderContext;
NOTE: I'm not sure that it needs to be bindable but thats what my code has, so to be safe I am showing it.Then, in some initialization code, initialize the variable           loaderContext = new LoaderContext(true);
Finally, when loading the graphic into an  object, you must define a loaderContext and use the loader context that you just created, as below.                             loaderContext="{loaderContext}"                  verticalAlign="middle"                  horizontalAlign="middle"                  source="{picture_http}" width ="200" height="200">
                   Hope this helps.Regards,HankOn 11/3/06, Andrew D. Goodfellow <
[EMAIL PROTECTED]> wrote:


I literally just hit this problem now too. Did you ever receive a solution Hank? Anyone else?-AndyOn 9/26/06, 
hank williams <

[EMAIL PROTECTED]> wrote:












  



I have a flex screen that I want to capture into a bitmap using the
technique that Andrew Trice described earlier this week.

it works as so:



private function getUIComponentBitmapData(target:UIComponent):BitmapData{
var bd : BitmapData = new BitmapData( target.width, target.height );
var m : Matrix = new Matrix();
bd.draw(target,m);
return bd;
}


I am feeding that function a UIComponent that contains an image that
looks like this:




	verticalAlign="middle"
	horizontalAlign="middle"
	source="{model.picture_http}" width ="200" height="200"/>



The problem is that the model.picture_http is on another domain.

The error I get is as follows:


SecurityError: Error #2122: Security sandbox violation:
BitmapData.draw:
http://localhost:8080/elroyServer/songmail/songmail-debug.swf cannot
access http://storage.elroynetworks.com/0922337203685477580744.



A policy file is 
required, but the checkPolicyFile flag 
was not set
when this media was 
loaded.


This seems to suggest that I need a crossdomain.xml file, which 
is
fine. I have that, and I believe it is in the right place. The problem
is I am supposed to set a checkPolicyFile 
flag. The doc's explain how
to do this, but not in the context of Flex. 
The docs say:


When you load the image using the load() method of the
 Loader class,
you can specify a context parameter, which is a LoaderContext object.
If you set the checkPolicyFile property of the LoaderContext object to

true, Flash Player checks for a cross-domain policy file on 
the server
from which the image is loaded. If there is 
a cross-domain policy
file, and the file permits the domain of 
the loading SWF file, the
file is allowed to access data in the Bitmap object; otherwise, access
is denied.

You can also specify a checkPolicyFile property in an image loaded via
an  tag in a text field. For details, see Loading SWF files and
images using the  tag in a text field.


I dont know how one would use the "load() " command from MXML.
Moreover, I would really like an MXMLish way to deal with cross domain
issues.

Has anybody dealt with this?

Hank

  





















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



Re: [flexcoders] security issues when capturing flex screens that contain other domain bitmaps

2006-11-03 Thread Andrew D. Goodfellow



I literally just hit this problem now too. Did you ever receive a solution Hank? Anyone else?-AndyOn 9/26/06, hank williams <

[EMAIL PROTECTED]> wrote:












  



I have a flex screen that I want to capture into a bitmap using the
technique that Andrew Trice described earlier this week.

it works as so:



private function getUIComponentBitmapData(target:UIComponent):BitmapData{
var bd : BitmapData = new BitmapData( target.width, target.height );
var m : Matrix = new Matrix();
bd.draw(target,m);
return bd;
}


I am feeding that function a UIComponent that contains an image that
looks like this:




	verticalAlign="middle"
	horizontalAlign="middle"
	source="{model.picture_http}" width ="200" height="200"/>



The problem is that the model.picture_http is on another domain.

The error I get is as follows:


SecurityError: Error #2122: Security sandbox violation:
BitmapData.draw:
http://localhost:8080/elroyServer/songmail/songmail-debug.swf cannot
access http://storage.elroynetworks.com/0922337203685477580744.


A policy file is 
required, but the checkPolicyFile flag 
was not set
when this media was 
loaded.


This seems to suggest that I need a crossdomain.xml file, which 
is
fine. I have that, and I believe it is in the right place. The problem
is I am supposed to set a checkPolicyFile 
flag. The doc's explain how
to do this, but not in the context of Flex. 
The docs say:


When you load the image using the load() method of the
 Loader class,
you can specify a context parameter, which is a LoaderContext object.
If you set the checkPolicyFile property of the LoaderContext object to

true, Flash Player checks for a cross-domain policy file on 
the server
from which the image is loaded. If there is 
a cross-domain policy
file, and the file permits the domain of 
the loading SWF file, the
file is allowed to access data in the Bitmap object; otherwise, access
is denied.

You can also specify a checkPolicyFile property in an image loaded via
an  tag in a text field. For details, see Loading SWF files and
images using the  tag in a text field.


I dont know how one would use the "load() " command from MXML.
Moreover, I would really like an MXMLish way to deal with cross domain
issues.

Has anybody dealt with this?

Hank

  
















__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



[flexcoders] security issues when capturing flex screens that contain other domain bitmaps

2006-09-26 Thread hank williams
I have a flex screen that I want to capture into a bitmap using the
technique that Andrew Trice described earlier this week.

it works as so:



private function getUIComponentBitmapData(target:UIComponent):BitmapData{
var bd : BitmapData = new BitmapData( target.width, target.height );
var m : Matrix = new Matrix();
bd.draw(target,m);
return bd;
}


I am feeding that function a UIComponent that contains an image that
looks like this:







The problem is that the model.picture_http is on another domain.
The error I get is as follows:


SecurityError: Error #2122: Security sandbox violation:
BitmapData.draw:
http://localhost:8080/elroyServer/songmail/songmail-debug.swf cannot
access http://storage.elroynetworks.com/0922337203685477580744.
A policy file is required, but the checkPolicyFile flag was not set
when this media was loaded.


This seems to suggest that I need a crossdomain.xml file, which is
fine. I have that, and I believe it is in the right place. The problem
is I am supposed to set a checkPolicyFile flag. The doc's explain how
to do this, but not in the context of Flex. The docs say:


When you load the image using the load() method of the Loader class,
you can specify a context parameter, which is a LoaderContext object.
If you set the checkPolicyFile property of the LoaderContext object to
true, Flash Player checks for a cross-domain policy file on the server
from which the image is loaded. If there is a cross-domain policy
file, and the file permits the domain of the loading SWF file, the
file is allowed to access data in the Bitmap object; otherwise, access
is denied.

You can also specify a checkPolicyFile property in an image loaded via
an  tag in a text field. For details, see Loading SWF files and
images using the  tag in a text field.


I dont know how one would use the "load() " command from MXML.
Moreover, I would really like an MXMLish way to deal with cross domain
issues.

Has anybody dealt with this?

Hank


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/