标题: Set Property from Text (Text Behavior) [打印本页] 作者: Asen 时间: 2011-10-15 10:59 标题: Set Property from Text (Text Behavior)
Set Property from Text (Text Behavior)
Summary
Set a property on the parent object to be the text contained in another text object.
Category
Latest Behaviors
Author
Gavin Kistner
Difficulty
(Reference)
Time to Complete
5 Minutes
Downloads
Click Here
to download the associated files.
(This document covers version 0.8 of the 'Set Property from Text' behavior, current as of 2005-Feb-11)
Description
This behavior changes a property on the parent object (specified with the
Property Name
property) to be the same as the text string of a Text object (chosen with the
Text Object
property).
If
As Number?
is checked, the value of the text object will be turned into a number before setting the property to that value. If the string isn’t a number (such as “z”, “1a”, or even “1,000”), then the value will not be changed.
If
While Editing?
is checked, this behavior will continuously update the property if the user is editing the text, using the Editable Text behavior. Otherwise, the property will only be updated when the user finishes editing the text.
A simple demonstration of this behavior in action can be seen on the example for the Progress Bar behavior, where this behavior is used to allow the user to change the
URL
that will be loaded by the Preload Module behavior.
Basic Properties
Text Object
The Text object to use the text of.
Property Name
The script name of the property on the parent to set.
Advanced Properties
As Number?
Treat the text string as a number?
While Editing?
Update the value continuously while the text is being edited?