I have a couple of questions for folks. I am having some issues and need help sorting them out. First, has anybody done any flash air development for Android. If so, have you found a way to ad support a free application? Question 2 is potentially a little more in-depth. I have been out of flash since Flash MX and have not really used AS3 before but it is requirement to do Android conversions. I am trying to build a simple flash card type of application. I am loading an external XML file with content in it. I have pasted the code below:
import flash.events.MouseEvent;
var my_korean:XMLList;
var my_english:XMLList;
var my_actiontype:XMLList;
var my_sound:XMLList;
var my_total:Number;
var my_itemnum:Number = 0;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.load(new URLRequest("content.xml"));
xmlLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
var my_FlashCards:XML = new XML(e.target.data);
my_korean=my_FlashCards.flashcard.korean;
my_english=my_FlashCards.flashcard.english;
my_actiontype=my_FlashCards.flashcard.actiontype;
my_total=my_korean.length();
trace("Korean: "+my_korean);
trace("English: "+my_english);
trace("ActionType: "+my_actiontype);
trace("Total: "+my_total);
type_mc.gotoAndStop(my_actiontype[my_itemnum]);
term_txt.text=my_korean[my_itemnum];
}
//When the language button is pressed down
function mouseDownHandler(event:MouseEvent):void{
trace(my_english.text[my_itemnum]);
term_txt.text=my_english.text[my_itemnum];
}
//When the language button is let up
function mouseUpHandler(event:MouseEvent):void{
term_txt.text=my_korean.text[my_itemnum];
}
language_btn.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler);
language_btn.addEventListener(MouseEvent.MOUSE_UP,mouseUpHandler);
stop();
The issue that I have is that I cannot get my language button to function any more. It says that my value is undefined. My plan is to add remove value to the variable my_itemnum as needed to switch between words and values. Any help would be appreciated.