Groups | Blog | Home
all groups > flash actionscript > june 2005 >

flash actionscript : replacing image with action script


David Stiller
6/17/2005 4:41:47 PM
Ledrim,

[quoted text, click to view]

ActionScript does not have an equivalent to Imaging Lingo, but the Color
class does go back to Flash 5, so you can experiment with that. Flash 5
help didn't have the word "class" anywhere, if I remember correctly, but
search the documentation for setTransform() for the Color object.


David
stiller (at) quip (dot) net
"Luck is the residue of good design."

Ledrim
6/17/2005 8:22:50 PM
I'm trying to create an interactive application, in which the user can choose a
color swatch to see various colors of wall panels and chairs. I need to do this
via script, not timeline.

I did something similar in Director years ago using "replace", but I'm not
aware of a similar script in Flash 5
FlashTastic
6/17/2005 9:02:20 PM
I have a colour picker component I created that's exactly the same as the one within flash.

I can e-mail you the .SWC file to install.

Contact me off list:

flashtastic [at] gmail [dot] com

Ledrim
6/17/2005 9:28:24 PM
Thanks for your reply,
This is image based, so I can't change the color of a cast member via code, I
just need to replace one image with another image.
ex - red swatch when clicked will change the existing image of a chair to that
of the red image of the chair.

Sounds like it should be easy enough.....
Laiverd.COM
6/17/2005 11:44:36 PM
In that case use attachMovie() to replace a movieclip on the same depth (and on the same timeline). This will work if you images are
inside the flash file (as movieclips with linkageID). If the images are outside and you load them using loadMovie() (JPG or SWF)
then simply load them into the same movieclip container and at each successive new load the old contents will be replaced.

John

--
---------------------------------------------------------------------------------------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
---------------------------------------------------------------------------------------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
---------------------------------------------------------------------------------------

mandingo
6/18/2005 12:00:00 AM
or why not have all the colour range variations inside the one clip for the
object...

so on say 5 different frames (with a stop on each) have a different coloured
armchair... give each one a frameLabel then on colour selection, pass in the
colour and gotoAndStop on that frame within the respective movieClip.

takes all the swapping and changing out of the equation.

cheers,
AddThis Social Bookmark Button