
Welcome Guest
|
|
|
#1
|
|||
|
|||
|
NAN problems
I am developing an online store in flash and
I am trying to change the qnty of an item when the customer presses the add to cart button, But I am just getting NAN no matter what I try. the origanal # being pull from a database. It doesn't recognize the number as a number.... the variable, pot_qnty, is a text field, but I have tried using a set veriable just for subtracting the qnty #, but it still tuns out NAN I have even tried the Number() function NAN the current code I have on the button is: stock = Math.floor(pot_qnty); pot_qnty = stock - 1; if (pot_qnty == 0) { pot_qnty = "sold out"; } the site URL http://www.mainepottersmarket.com/mpm.htm (still in dev.) any thoughts? thanks russ |
|
#2
|
|||
|
|||
|
where to go
oh yea if you go to the site, select potters from the menu and scoll down to jennifer everett pottery
she is the only one with pots russ |
|
#3
|
||||
|
||||
|
So this doesn't work?
Actionscript:
on(release) {
stock = Math.floor(parseInt(pot_qnty));
trace(stock);
pot_qnty = stock - 1;
if (pot_qnty <= 1) {
pot_qnty = "sold out";
}
}
// or
on(release) {
stock = Math.floor(Number(pot_qnty));
trace(stock);
pot_qnty = stock - 1;
if (pot_qnty <= 1) {
pot_qnty = "sold out";
}
} Actionscript:
pot_qnty = "1 "; // with a space trace(Number(pot_qnty)); // Outputs NaN // But trace(parseInt(pot_qnty)); // Outputs 1 |
|
#4
|
|||
|
|||
|
I have not tried the parseInt() yet.
the other thing is I am developing with coldfusion so the I have to view the site through my test server, so I don't have access to any of the output tools of flash, its a pain to not have the ability to check the variables... |
|
#5
|
|||
|
|||
|
it works
the parseInt() worked, thanks
|
|
#6
|
||||
|
||||
|
Hey targetplanet,
Quote:
![]() Follow me to the "T". Goto Macromedia.com and download the latest Flash Player/Product Updates. (More info Click Here Then Follow the directions Macromedia gives you about how to install the files. Once you done this, goto your Flash Program Folder on the hard drive and open the Players>Debug Folder. You will see a list of Install Player files. In Windows, Double click and run the "Install Flash Player 6 AX.exe" file. You will need to reboot. Now when developing your Flash Movie for the web Check the 'Permit Debugging' Option in the Publish Settings window. ...Click Publish Do any of the nessacary uploading... In the Flash Authoring Enviroment goto Windows > Debugger. Then with this window open... set the Debugger to 'Enable Remote Debugging' Then when you open the Flash Movie in the Browser it will prompt you with a Debug Permission... and then you may view the contents of the Movie from your Debugger with comfort of the Test Server ![]() Any question? |
|
#7
|
|||
|
|||
|
thats really cooooollll
that is sweet, thanks a ton for the info
I always wondered what that debugger was for.. |
|
#8
|
||||
|
||||
|
hey dv8, this is great news man!! rated!
i didn't checked this out till now thnx...
__________________
--- if TCPA is the answer, how stupid then was the question? There is a diffrence in knowing the path and walking the path. if u found this thread usefull, then rate it. this way we all save a lot of time, searching for the good ones. |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compatibility May Be Causing the Mac OS X Lion Problems with Flash | FlashMove | All Things Apple |
0 | 08-15-2011 02:31 PM |
| PUBLISHING PROBLEMS (Flash 8), PLEASE HELP!!! | Fragger | Newbies |
0 | 02-13-2008 04:06 PM |
| Movie Clip Problems | ScottRiley | Actionscript 2.0 |
1 | 02-07-2006 02:15 PM |
| external movie loaded problems | dirk | General Flash | 0 | 12-16-2005 05:56 PM |
| more php problems with flash - can you check this??? | jpwrunyan | Client Side | 0 | 07-16-2004 09:38 PM |





