【发布时间】:2012-06-26 14:26:58
【问题描述】:
我有一个文本文件,它通过 flashvars 加载到 swf 中:
- 数据存储在Mysql中,
- 使用 Coldfusion 和 cfquery 存储数据
- coldfusion 将数据读入文本文件
- 通过将文件名传递给 flashvars,数据被加载到 swf,然后被读入 actionscript。
问题是,所有的文本都被初始化到第一个
"e;
我不知道如何逃避这一点,我应该在什么时候逃避。
我正在使用coldfusion存储原始文本,并将数据设置为html编辑格式
#HTMLEditFormat(form.content)# />
The boy grinned as he led back to the trail.
"A big un, Granser," he chuckled
以下是完整的动作脚本
// This will be the starting position of the textbox
var starting_ypos:Number;
// Load the Flashvars into the script
text1.text = myVariable;
text2.int = mySecondVariable;
// Make a load vars object
my_data = new LoadVars();
// This will be how fast the text box will scroll
var scroll_speed:Number = text2.int;
// Make my on load function
my_data.onLoad = function() {
// Fix the double space issue
var my_text = unescape(this.content).split("\r\n");
my_text = my_text.join("\n");
my_text = my_text.split("\r");
my_text = my_text.join("\n");
// Set the text in the text box
scroll_text.Text = my_text;
// Set the autosize
scroll_text.autoSize = true;
// Set the starting_ypos
starting_ypos = scroll_text._y;
};
// Load the external text file
my_data.load(text1.text);
// Start the scrolling
this.onEnterFrame = function() {
// Check for hit test with the mask and the mouse
if(!mask_mc.hitTest(_root._xmouse, _root._ymouse)) {
// Check to see if we are in the mask
if(mask_mc.hitTest(scroll_text)) {
// Move the textbox
scroll_text._y -= scroll_speed;
} else {
// Reset the text box
stop();
}
}
}
// Simple stop command
stop();
【问题讨论】:
标签: mysql coldfusion actionscript-2 flashvars