Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScript

ColorMatrixFilter external loaded image browser problem

 
Jump to:  
 
biggysmith
PostPosted: Tue Jul 22, 2008 12:40 pm    Post subject: ColorMatrixFilter external loaded image browser problem
       
hey there,

I have a flash file where I load up external images and change their color
(hue, brightness etc) using the ColorMatrixFilter.

This works great when i test it in Flash but as soon as I put it in a browser
the Images are no longer changed by the filter!

I cant see why this is happening, as It works fine in Flash, I only change the
color when the image is finished loading, even tried changing it afterwards but
it just doesn't work.

any ideas?

here are the test files i am working on that show the problem, the image
should be increased in brightness but it doesnt in the browser.
LINK
LINK
 

 
Rob Dillon
PostPosted: Tue Jul 22, 2008 4:24 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
I don't know what I'm supposed to be seeing, but if the hat and the shirt
should be completely blown out to white, then I see that from the .fla and from
the .swf when I view the .swf from a browser window.

Try reinstalling your Flash plugin in to see if that's the problem.
 

 
biggysmith
PostPosted: Tue Jul 22, 2008 4:44 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
i've changed it so that your meant to see the pic turned all red. It works in my flash but not my browser...
 

 
Rothrock
PostPosted: Tue Jul 22, 2008 5:31 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
My guess is that you are loading the image from a different domain? (Even
something as simple as biggysmith.com will be considered a different domain.)

I think for security reasons Flash puts some limits on how you can manipulate
content loaded from other domains. I might be wrong.
 

 
biggysmith
PostPosted: Tue Jul 22, 2008 5:38 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
i am loading from a different domain, but i put
System.security.allowDomain("*"); in there, does that not sort it?

The other thing is it works in flash and when I drag it into the browser but
as soon as I put it online the things stops working.
 

 
Rothrock
PostPosted: Tue Jul 22, 2008 6:16 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
Actually you have to also put an xml file on the other server. It wouldn't be
much of a security measure if you could just put some code into your Flash and
have access to everything. You need to have access to the other domain to
indicate that you are a person who is allowed to do this. I've never actually
done this, so you should search on cross domain.

Of course it works in Flash because the domain issues don't apply when you are
testing locally. If you can change the domain you are loading from to the same
one that your source is and I'm sure the problem will go away.
 

 
biggysmith
PostPosted: Tue Jul 22, 2008 7:56 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
Yes that seems to be the problem, when I match domains the filter works.

the weird thing is I can load the image into the flash no problem, resize and
such, but i cant apply a filter to it? Why is that? If I can load the image
into my flash and alter its size and such what difference would it make in
applying a filter?
 

 
Rothrock
PostPosted: Tue Jul 22, 2008 11:30 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
I'm not sure. But I think it is all tied in to the bitmapdata class. If you
could get in and manipulate at the pixel level you could do many bad things
with copyrighted material. So everything that springs from the bitmap class is
"fruit of the poisonous tree" so to speak.

Is the other domain yours? Is the picture yours? If that is the case you can
either put a cross domain policy file on the other domain or you can move where
you store the picture. Otherwise just be happy and change your design.
 

 
biggysmith
PostPosted: Tue Jul 22, 2008 11:37 pm    Post subject: Re: ColorMatrixFilter external loaded image browser problem
       
Thankfully I can use my own domain, I just have to copy some stuff. Lazyiness was compelling me to do it the other way.

Anyway thanks for the help.
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

Kochanowski Jan wiersze Fotka Rapidshare odżywki hotel a lisbona