Here’s our goal: in a website, show a nice menu “à la” iPhone in Flash and when we click on a menu, show a part of the site “under” the Flash menu.
Two options:
- create a page with the
Flash menu that has an iFrame and
with Flash, open the menu in that
iFrame; - create one page with a div
on its bottom, with Flash, launch a
JavaScript (if you have any better idea please tell me !) function that downloads via AJAX the desired menu.
My #1 objective is to have only one page. Ideally it would embed the Flash object and launch a JavaScript function.
PS: I hate iFrames. iFrames are evil to me.
Don’t hesitate to correct my question to make it proper English !
Thanks,
Olivier
Yes, this is very possible using
ExternalInterfacein the Flash document. That link explains the whole process.A bigger question is that it sounds like you are using Flash to duplicate an iPhone animation and I imagine (unless you are doing the “Flip” animation) that it could easily be reproduced with normal JavaScript animation, possibly with a library like jQuery or MooTools to help normalize browser differences. You can even do the 3D animations in Safari 4.