Moderators: Disciple, zlovatt

Topic Author
Posts: 3
Joined: Thu Jan 28, 2010 9:34 am

cash multipler

Wed Mar 09, 2011 2:09 pm

i need to create an expression that will take a cash value of (y) Y= $1.28 and have it multiplied by (x). X needs to be connected to a slider or something i can key... this way i can key a single slider to just multiple the value of (y) * (x).
User avatar
Enhancement master
Posts: 460
Joined: Thu Jun 17, 2004 9:27 am
Location: New York City, NY

Re: cash multipler

Mon Mar 21, 2011 12:16 pm

So why don't you just do exactly that? y * x
Posts: 3
Joined: Sat Oct 04, 2014 7:36 pm

Re: cash multipler

Thu Oct 09, 2014 4:13 am

I have same problem with you lowtech19. Have you figure it out?
Posts: 80
Joined: Tue Nov 27, 2012 6:41 am

Re: cash multipler

Fri Oct 10, 2014 12:32 am

Avoid multiplying a number with a string.
If you have the possibility, put x and y on separate sliders, and in your text put an expression that formats x*y into what you want, for instance

"$" + (x*y).toFixed(2);

If you can't (ie the textLayer already has a text of the form $1.28), then
// y is the numeric value carried by the text
y = parseFloat(thisLayer.text.value.slice(1));
"$" + (x*y).toFixed(2);


Who is online

Users browsing this forum: No registered users and 1 guest