1 Reply Latest reply on Jul 21, 2006 4:56 AM by blemmo

    Attached movie events problem

    jamesa1974
      Hi,

      I'm a AS programmer working on a project with a flash graphical desinger.
      He created a moive clip which has an inner button, that shows some animation when the mouse is on it ("Over").
      I use "attachMovie" to use this MovieClip in my application, which has no timeline, just one frame and a lot of actionscript.
      I want to maintain the inner MovieClip "Over" behaviour and add a "onRelease" event handler myself, after attaching the movie to my application.
      I'm trying to do it like this:

      [code]
      attachedMovie_mc=my_mc.attachMovie("butback","butback_1",my_mc.getNextHighestDepth());
      attachedMovie_mc.onRelease=function() {trace "in onRelase";}
      [/code]

      When I use this code, it catches the event. trace output = "in onRelase". The problem is the "Over" behaviour dissapears (without the second code line the "Over" event works fine).

      I want to program the "onRelease" functionality myself, since I want to seperate the (classical) design and animation work from the programing, so I don't want to have the flash designer call any function of mine.

      1. How can I get this to work?
      2. what is the best way for a programmer and a flash graphical designer to colaborate on issues like that?