# change color of tshirt on click



## tamidesign (Nov 19, 2010)

ok im not sure how exactly to word this question ..but here it goes...im trying to find a way to be able to have a photo on my website of for example ....a model in a blue shirt and then under that photo will be a bunch of color swatches representing the tshirt colors available) and for the user to be able to click on any color and the color in the same photo will just change not the whole photo ..model background etc... get it ?? any techies have some ideas?? thanx!!


----------



## MarshallA (Oct 7, 2008)

This would be done with javascript. It sounds like you need an image of the model with a background of your choice. This model would be wearing a transparent T-shirt allowing a background color to show through. The background could be changed with javascript. Google search "onclick background swap". You could also use "onmouseover background swap" which eliminates the need to click. Most folks just do an image swap though. I hope that helps.


----------



## tamidesign (Nov 19, 2010)

MarshallA said:


> This would be done with javascript. It sounds like you need an image of the model with a background of your choice. This model would be wearing a transparent T-shirt allowing a background color to show through. The background could be changed with javascript. Google search "onclick background swap". You could also use "onmouseover background swap" which eliminates the need to click. Most folks just do an image swap though. I hope that helps.


thanks for replying! ... im googling it now and there are alot of results for this .. it all seems like another language for me though ..but im sure ill figure it out! atleast now i know what this process is called.. thanks again!


----------



## selanac (Jan 8, 2007)

A company keeps calling me that does this. PM me and ask me to look for Chris' info.


----------



## phazenix (Apr 8, 2010)

what do you think about this (Booking Form – Made[by]Request [English Version] | Babyblink!) 

ps. look at t-shirt simulation.. after design collection


----------



## tamidesign (Nov 19, 2010)

phazenix said:


> what do you think about this (Booking Form – Made[by]Request [English Version] | Babyblink!)
> 
> ps. look at t-shirt simulation.. after design collection


this looks great!!... can u explain how to do it??


----------



## phazenix (Apr 8, 2010)

it using flash program.. 
you need to make t-shirt pic with variation color and printed pic variation color
also you need the pic for button

and combine it with action script like this
(this only example of one t-shirt color with one button)
stop();
this.white_button.addEventListener(MouseEvent.MOUSE_DOWN,Teecol2);
function Teecol2(event:MouseEvent):void
{
this.TCOL.gotoAndStop(2);
}

ps. i hv difficulties to explain in english.. will get time to breakdown more detail.. sorry
but the basic concept is like this

http://www.kirupa.com/developer/actionscript/color.htm

hope it help


----------

