posted on April 04, 2006 21:25
When using script in Action script events, working with Actions created using Action Studio is a little different to the built in Actions.
Most Action script events, such as BeforeAction and AfterAction, pass the Action as the first parameter to the event. With FinalBuilder's built in actions, you can reference the properties of the action using Action.[PropertName]. This doesn't work with custom actions created with Action Studio. The reason for this is that the properties of custom actions are not actually implemented by the Action object, they are implemented by the action's PropertyStore object.
In FinalBuilder 3 (when Action Studio was first introduced), you can reference the properties using the following syntax (vbscript) :
where XXXX is either String, Integer, Boolean, Double, Variant or Strings. In VBScript everything is a Variant, the other versions of the PropertyAs property are aimed at the implementation side of the actions which might be written in other languages (such as C# or VB.NET).
In FinalBuilder 4, we implemented the IDispatch COM interface on the PropertyStore object, so that you can reference the properties using the the Action.PropertyStore.[PropertyName] syntax. It's a minor syntax shortcut, the FB3 properties are still there in FB4.