actionscript
I was working on a project the other day using the XMLConnector component to see how much time it would save me. It took about 60 seconds to pull the data from the schema, set up the bindings and get it pushing data to a custom list box…that was all fine. I then proceeded to get the application pushing and pulling data from a SQL 2000 database with no problems.
前几天,我正在使用XMLConnector组件进行一个项目,以了解它将为我节省多少时间。 花了大约60秒的时间从架构中提取数据,设置绑定并使其将数据推送到自定义列表框中……一切都很好。 然后,我继续使应用程序毫无问题地从SQL 2000数据库推入和拉出数据。
The problems arose when using the onLoad event handler after the LoadVars.sendAndLoad()operation to trigger a function to update the XMLConnector and get the refreshed content into a standard list box which had an XML data feed.
在LoadVars.sendAndLoad()操作之后使用onLoad事件处理程序触发函数来更新XMLConnector并将刷新后的内容获取到具有XML数据提要的标准列表框中时,会出现问题。
You’d think that XMLConnectorInstance.trigger(); would work first time round. In actual fact, it would never work as expected, and only seemed to reset the list box position strangely enough rather than the content. Weird behavior I thought, so I copied and pasted the line again to call the trigger and it all worked fine and the list box updated with new content.
您会认为XMLConnectorInstance.trigger(); 将在第一轮工作。 实际上,它永远无法按预期工作,只能重置列表框位置,而不是重置内容。 我认为这是奇怪的行为,所以我再次复制并粘贴了该行以调用触发器,并且一切正常,并且列表框已更新为新内容。
Why does it take two method calls to instantiate the XML refresh? Not sure, but something I
为什么需要两个方法调用来实例化XML刷新? 不确定,但我有
翻译自: https://www.sitepoint.com/unexpected-actionscript-behavior/
actionscript
相关资源:Flash ActionScript 3.0从入门到精通