Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / July 2008



Tip: Looking for answers? Try searching our database.

ColorMatrixFilter external loaded image browser problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
biggysmith - 22 Jul 2008 13:40 GMT
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.
http://www.biggysmith.com/test.fla
http://www.biggysmith.com/test.swf
Rob Dillon - 22 Jul 2008 17:24 GMT
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 - 22 Jul 2008 17:44 GMT
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 - 22 Jul 2008 18:31 GMT
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 - 22 Jul 2008 18:38 GMT
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 - 22 Jul 2008 19:16 GMT
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 - 22 Jul 2008 20:56 GMT
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 - 23 Jul 2008 00:30 GMT
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 - 23 Jul 2008 00:37 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.