2 Replies Latest reply on Mar 16, 2008 2:52 PM by sojourner146

    how to use Flash animation as overlay?

    sojourner146 Level 1
      I am trying to make a kaleidoscope appear in an overlay when the user clicks on a model in my 3D world. The kaleidoscope is an animation I created in Flash. Everything works except that the Flash movie, "egg_1" in the code below, is static rather than rotating as it should. This is the code I've tried:

      on mouseUp me

      clickLocation = the mouseLoc - point(sprite(me.spriteNum).left, sprite(me.spriteNum).top)
      clickedModel = sprite(me.spriteNum).camera.modelUnderLoc(clickLocation)

      case clickedModel of
      wallModel:

      kaleidoscope1 = gWorld.newTexture("kaleidoscope1", #fromCastMember, member("egg_1"))
      gWorld.camera[2].addOverlay(kaleidoscope1, point(100,15),0)


      Can anyone suggest a way to get the Flash movie to play? Thanks in advance for your help.
        • 1. Re: how to use Flash animation as overlay?
          _lw Level 1
          You have to put the Flash-Member on the Stage, set it's directtostage property to false, and copypixels the image from the stage. When you make the Flash Sprite 128x128 it can work quite fast.

          Generate a new texture with #fromimageobject and then assign to this texture the new image that you get via copypixels from the stage. You can put the flash-sprite behind the 3D-Sprite to make it invisible.
          • 2. Re: how to use Flash animation as overlay?
            sojourner146 Level 1
            This sounds good to me but I'm still a little shaky about using imaging Lingo so It'll take me a bit more time to check it out properly. Thank you for providing me with a direction to go in.

            I did check out MIAWs in the meantime as an alternative way to do what I wanted and got that to work. Is there any major advantage to overlays versus MIAWs in this kind of use? Offhand it seems as if MIAWs can 'talk' to the main movie more readily.