PDA

View Full Version : PLZ HELP ME!!! Stuck on Flash Action scripting lesson 1 part 3



johnyct9760
01-02-2008, 09:23 PM
PLZ HELP ME!!! Stuck on Flash Action scripting lesson 1 part 3


I'm working through the basic flash action script DVD and I've hit a snag very early. I'm supposed to be building a script that makes flower petals in a circle but when I press my "create flowers" button
I get and "Nan" message instead of the output message that the video says I should get. I have no idea what I've done wrong I’ve follow the directions very carefully up to this point. The code I have so far is:

go.onRelease = function() {
var spacing = (360 / amount);
trace (spacing);
}

when I put in 36 and press the button it’s supported to spit out a variable of 10, but all I get in the NaN message no matter what amount I place in there. I've placed a copy of the file up to this point at this link:

www.johncliffordtaylor.com/lesson_1_03.fla

I'm working with flash 8 and the DVD focus works with flash 7 but I don't think that could be what’s causing this error. Some on plz help me I need this DVD for work and I can't stay stuck very long right here.

Thx for any help you can give,

John

papa
01-02-2008, 09:32 PM
did you name the data field amount?

Papa

johnyct9760
01-03-2008, 01:21 AM
I'm sry but I'm so new at action script I have no idea what a data feild amount is. Take a look at my work file posted above. Maybe I did maybe I didn't I'm not sure. I did name both of the instances on stage. along with the video demos.

Looking forward to more information and thx for the help

John

evengi
02-25-2009, 02:17 PM
Hello.

I'm doing the same kit, and run into the same problem. My code is correct. And the output window returns all my font information as well as the desired number, making it unreadable to the math function.

I solved the problem by opening the digital tutors completed file, and copied the input txt box, and pasted it into my own flash file.
This somehow did something to my scene. When I drew a new text box with input txt, it worked the way it's supposed to work. If anyone else is stuck, try it!
I'm on flash cs 4.

Roger

chrisg
02-26-2009, 10:48 AM
Hi johnyct9760,

If you re-upload your file to your webspace, I'll take a look at it and try to find out what the issue we're running into is and how to get around it.