Groups | Blog | Home
all groups > flash (macromedia) > may 2004 >

flash (macromedia) : loadMovie alternative?


laneV5
5/7/2004 11:41:42 PM
I'm just trying to create a simple flash action that loads an image behind my
button when I roll over it. I have successfully used the loadMovie("file.jpg",
background_mc) command in my actionscript, but I would rather have a solution
that doesn't depend on an external jpg file. Is there a way I can accomplish
the same task but with a graphic that is included in my flash so I don't have
to remember to distribute the external file.jpg file? I'd like to import it
into the stage, but I haven't figured out a corresponding actionscript function
that will load from my library.

I'm hoping this is something simple. I'm fairly new to flash, so thanks in
advance.
Cleo-MMTS
5/8/2004 12:34:23 AM
If you wish to load an image that is included within the flash movie, you might
want to try converting your image to graphic symbol and then use the "export
for actionscript" feature of the symbols in the library. You can then use the
symbol Identifier with the attachMovie action to attach an instance of the
symbol to a movieclip. See sample actionscript below.

on(rollOver){
mymovieclip.attachMovie ("idName","newIDname",0);
}

For additional information on how to use the "attachMovie" actionscript,
please refer to the actionscript help documentation of Flash MX.

Hope this information helps.

Cleober Sinues
Macromedia Technical Support
For more support options see http://www.macromedia.com/support/
urami_
5/8/2004 8:30:30 AM

[quoted text, click to view]

You can just place the image in button over state .


--

Regards


urami_*



<no>
http://flashfugitive.com/
</no>

AddThis Social Bookmark Button