开发者

Getting the HTML layer pixel color in flash

I'm quite new to ActionScript and I was wondering is there a way to get the (pixel) color of the HTML layer under a flash movie?

I have an idea of making a transparent flash movie covering a part of a website and then getting the color of underlying HTML layer, to make some realtime transformations or other stuff.

Any suggestions or explanations would be great, thanks in advance.

-- I've searched for an answer in Google and Stackoverflow, but 404 nothing found ;(开发者_StackOverflow中文版


That would be highly unlikely, as the availability of such a method would mean that anyone could be able to get a whole screen grab of an unsuspecting user via a rogue flash ad. Given the paranoia of Macromedia / Adobe over the matter and endless sandboxing of the Flash Player runtime, it should quite simply be impossible.

Don't know about a JavaScript / ExternalInterface hack though. Even then, that would also have serious security issues.


If I wanted to do something like what you describe, I would use the ExternalInterface class to send/receive info about the html page. You could create a Javascript function that sends the colors you need to the flash file and, inside the flash file have a callback function that will process the received info.

ExternalInterface.addCallback("functionCalledFromJavascript", functionToCallInFlash);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜