I sort of found the cause, but the
solution is not satisfactory. I tried swapping a PNG for the SWF, and
the code worked. So I decided to see if I could make the SWF work. The original
file consisted of a button with nice rollover and down effects (i.e. a typical
Flash button). I removed the mouse effects and changed the instance symbol
behavior to MovieClip, and compiled it. The new SWF works with the Flex code
listed below. However, I’ve lost my nice mouse effects. L Adobe Flex Development Team: Is this a
bug? I hope so, and that you’ll get a chance to fix it. It would be a
shame if we can’t use interactive Flash assets in our Flex applications!
(In fact, one of the reasons that my company shied away from OpenLaszlo is that
imported / embedded SWFs are not interactive.) From: Jim Robson
[mailto: Hello all, The following code worked in Beta 2: <mx:Image id="laptop1"
source="{laptopImage}" mouseMove="dragMe(event, laptop1, 'img',
laptopImage);myoffset(laptop1);" x="400" y="80"/> The function “dragMe()” was taken from a
drag-and-drop example in the documentation. It worked perfectly in Beta 2, and
life was good. Now that I’ve upgraded to Beta 3, however, I can’t
get any mouse event to work with these mx:Image tags. I have tried using
different mouse events (mouseDown, click) to invoke different functions,
including a simple function that does nothing but change the text in a text
box. Nothing seems to work. The functions never get called. No exception is
thrown. The Flash player (9 Beta 3) just seems to ignore the whole thing.
It’s enough to make me feel unloved. Did anything change with either the Image tag or mouse
events between Beta 2 and Beta 3? Could it be the fact that the images are
embedded SWFs? Has anyone experienced anything similar? Or am I just missing
something obvious? I’ve searched the Adobe labs wiki but can’t find
a reference to a change that appears to be relevant to this issue. Jim -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS
|