hi folks,
I download a multiple quiz (included xml and ascript file)
The condensed code within the actions layer is:
import fl.controls.Label;
var urlRequest:URLRequest = new URLRequest(“Questions.xml”);
var urlLoader:URLLoader = new URLLoader();
var xml:XML;
var xmlList:XMLList;
var i:int = 0;
var qf:QuizFormat;
var qscore:int;
function displayscore(quizscore:int):void{
var scoreFormat:TextFormat = new TextFormat();
scoreFormat.font = “Calibri”;
scoreFormat.bold = true;
scoreFormat.size = 40;
scoreFormat.color = 0x000000;
var scoreLabel:Label = new Label();
scoreLabel.text = "Your Score : "+ quizscore.toString();
scoreLabel.autoSize = TextFieldAutoSize.LEFT;
scoreLabel.setStyle(“textFormat”,scoreFormat);
scoreLabel.move(200,250);
addChild(scoreLabel);
I have a button on the screen when the score is shown. What I want to do is load to another swf file (Drawing Four.swf) When I do this the score appears on this screen.I would like the score not to be visible.
The button code is below:
function page1content(myevent:MouseEvent):void {
//scoreLabel.text =""+ quizscore.toString();
**var myURL:URLRequest=new URLRequest(“Drawing Four.swf”);**myLoader.load(myURL);
addChild(myLoader);
I tried to make the scoreLabel.text="" but this is did not work. Has this got something to do with the status of the variable (private/public)? Or could it be the variable within the function the issue.
The as script file contains all of the code for the main assets of the quiz (the buttons etc)
Any help would be greatly appreciated.
Thanks in advance