Copy link to clipboard
Copied
OK, so when I trace any numeric stepper, the value is null and doesn't change when I increase or decrease the value.
Here's my code...
import flash.events.Event;
import flash.events.MouseEvent;
stop();
var resort:String;
var pets:String;
var adults:String;
var children:String;
trace(adultStepper.value);
trace(childStepper.value);
resortCombo.addEventListener(Event.CHANGE, resortHandler);
petsCheck.addEventListener(MouseEvent.CLICK, petHandler);
adultStepper.addEventListener(Event.CHANGE, adultHandler);
childStepper.addEventListener(Event.CHANGE, childHandler);
nextButton.addEventListener(MouseEvent.CLICK, nextpage);
function resortHandler(evt:Event):void {
resort = resortCombo.selectedItem.label;
}
function petHandler(evt:Event):void {
pets = String(petsCheck.selected);
}
function adultHandler(evt:Event):void {
adults = String(adultStepper.value);
}
function childHandler(evt:Event):void {
children = String(childStepper.value);
}
function nextpage(evt:MouseEvent):void {
gotoAndStop("lodgePage");
}
Copy link to clipboard
Copied
the only trace functions shown execute before your steppers change. is there a problem after a stepper changes?
Copy link to clipboard
Copied
OK so I moved the trace function inside the adultHandler function and traced the adult variable.
trace(adults);
The results are being stored properly inside the varaible, which is good. However, I can't get it to display inside a text box on frame 4.
adultsSelected.text = adults;
childrenSelected.text = children;
Copy link to clipboard
Copied
Does the frame/layer where the variables are defined extend as far as frame 4? Does that code assigning the text execute when you are in frame 4?
Copy link to clipboard
Copied
You know what happened? Feels quite silly saying this.... Numbers wasn't embedded in fonts.
Copy link to clipboard
Copied
That can do it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now