views:

32

answers:

1

Hi Guys,

A client wants the company I work for to build an expandable flash banner, I'm a dev, so my solution is: stack 2 flash banners, small one visible, big one on top of it, with display:none, catch the click event, animate the big one into position.

The client wants it done without javascript (their banner rotation network doesn't support additional javascript).

I'm baffled, as I have no clue how a flash file can modify it's own html embed code and the css styles and as far as I'm aware, it's not possible.

Any suggestions/ideas? Is there an api in flash to talk to the html file, is there some actionscript magic that could make this happen?

Thank you for your time

+1  A: 

You can talk to the parent HTML file via the ExternalInterface API.

You can pass the call() method entire javascript functions to do what you need. This way, you don't have to add extra javascript to the parent HTML file.

For example:

ExternalInterface.call("function() { document.getElementById(\'foo\').dosomemagichere; }");
clownbaby