Click to See Complete Forum and Search --> : interactive flash multiplication


kathleen1357
09-10-2007, 05:10 PM
This is probably way over my head but I want to know if there is a way to make an interactive (e-card) using flash that has a picture of a dog asking someone in a thought bubble to enter their age into a form/text box and when they hit the submit button it changes the image on the flash file and says "you are x# years old in dog years:" (the file multiplies the inputted age by 7 and displays the answer within the text.

I am not actionscript savvy but just want to know if it can be done and if so, where can I go to learn how to do this?

Thanks,

dtm32236
09-10-2007, 05:25 PM
the actionscript for this is simple. are you flash savvy?

kathleen1357
09-10-2007, 05:39 PM
I am not flash savvy but I am very willing to learn. I can create flash files/movies easily - it is the actionscript that stumps me most of the time.

dtm32236
09-11-2007, 12:43 PM
you want to pass variables between certain fields.

check out this tutorial, hopefully it should give you a good idea of where to start.
http://www.actionscript.org/resources/articles/12/1/Variables-101/Page1.html

discorax
09-11-2007, 12:47 PM
// For Flash 8, AS2.0 - Copy and paste the following code in the actions panel of the frame with your dog on it.

// You'll need to give the submitButton an instance Name of submitButton
// the entry textfield an instance Name of entryTextField
// and the display textfield an instance name of myTextField

var dogAge:Number = 0;
var yourAge:Number;

function getAge(yourAge):Void{
dogAge = yourAge*7;
// If you wanted to write that into a dynamic text field you could do it this way
myTextField.text = dogAge;
trace(dogAge); // this will trace out the age in dog years.
}

// when the submitButton is released this function runs which put the value they entered into the variable yourAge
submitButton.onRelease = function():Void{
yourAge = entryTextField.text;
getAge(yourAge);
}
// you could put this function on your submit button...and set the yourAge
// variable from the textfield.

kathleen1357
09-11-2007, 01:54 PM
wow thanks! Thank you for all of this, I really appreciate all of the time you put in on this project. I will get working on this right away I can't wait to see how it comes out! If I get stumped along the way may I write to you?

Thanks again! :)

discorax
09-17-2007, 03:09 PM
of course :D