Flash CS5,菜单:窗口-》[属性|动作|输出],输出是输出错误,用trace("Content");,动作是编写某一段在代码在地方。
属性是对某一控件的描述。提示一下组件:也就是一个按钮,一个下拉等的控件。
var str:Array=new Array(4);
str[0] = "";
str[1] = "";
str[2] = "";
str[3] = "";
var pointer = 0;
var str_a:String="wait for me!";
trace(str_a);
var str_b:String="oh, my love, my darling,oh!";
var str_ab:String=str_a.concat("*",str_b);
strplan(str_ab);
function strplan(str_big:String) {
for (var i = 0; i<4; i++) {
for (var n = pointer; n<str_big.length; n++) {
if (str_big.charAt(n) != "*") {
str[i] = str[i]+str_big.charAt(n);
trace(str[i]);
//trace(str_big.charAt(n))
//trace(str_big.length)
} else {
pointer = n+1;
trace("pointer++++++"+pointer)
break;
}
}
}
}
属性是对某一控件的描述。提示一下组件:也就是一个按钮,一个下拉等的控件。
var str:Array=new Array(4);
str[0] = "";
str[1] = "";
str[2] = "";
str[3] = "";
var pointer = 0;
var str_a:String="wait for me!";
trace(str_a);
var str_b:String="oh, my love, my darling,oh!";
var str_ab:String=str_a.concat("*",str_b);
strplan(str_ab);
function strplan(str_big:String) {
for (var i = 0; i<4; i++) {
for (var n = pointer; n<str_big.length; n++) {
if (str_big.charAt(n) != "*") {
str[i] = str[i]+str_big.charAt(n);
trace(str[i]);
//trace(str_big.charAt(n))
//trace(str_big.length)
} else {
pointer = n+1;
trace("pointer++++++"+pointer)
break;
}
}
}
}
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/4181/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表