Tuesday, October 2, 2012

Design muti choice quetions in Flash

Below is the multi choice questions in Flash, mainly based on actionScript:

Some of the code:
1) To add a title in AS3:
var myText:TextField = new TextField();
myText.text = "                                                         Multi Choice Questions\n";
myText.width = 350;
myText.height = 40;
myText.textColor = 0xFF0000;

2) To add a link in AS3:
 var style:StyleSheet = new StyleSheet();
var link:TextField = new TextField();
style.setStyle("A",{textDecoration:"underline", color:"#0000FF", fontSize:"24", fontFamily:"Arial", fontWeight:"bold" });
link.styleSheet = style;
link.width = 380;
link.htmlText = "<a href='http://jiansenlu.blogspot.ca/'>http://jiansenlu.blogspot.com/</a>";

No comments:

Post a Comment