I have this flash program which is supposed to calculate the tip of a bill depending on the rating that you give it. In my Tip Percentage box I tried to have it concatenated to show the corresponding value + a percent symbol but the percent symbol is not getting displayed; only the value is there. Below is the code
import flash.events.MouseEvent;
var tipTotal:Number = 0;
var split:Number = 0;
var tipPercent:Number = 0;
var bill:Number = 0;
var eachShare: Number = 0;
oneStar.addEventListener(MouseEvent.CLICK, percentPopUp);
twoStar.addEventListener(MouseEvent.CLICK, percentPopUp);
threeStar.addEventListener(MouseEvent.CLICK, percentPopUp);
tipAmount_btn.addEventListener(MouseEvent.CLICK, calculateTip);
share_btn.addEventListener(MouseEvent.CLICK, calculateShare);
function percentPopUp(event:MouseEvent):void /*Tip percentage textbox will be filled with a percentage when a star is clicked on*/
{
tipPercent = 0;
if(event.target.name == "oneStar")
{
tipPercent = 5;
}
if (event.target.name == "twoStar")
{
tipPercent = 10;
}
if (event.target.name == "threeStar")
{
tipPercent = 20;
}
tipPercentage.text = tipPercent + "%";
}
Check your embedding. It could be that you forgot to embed “%” for that font in your FLA.