| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Oct 2004
Posts: 3
|
How do I set properties of the selected component instance using jsfl ?
For instance, how to set the Label text of a button, or realy any property of any component ? |
|
|
|
|
|
#2 |
|
lala
Join Date: Feb 2002
Location: on the road
Posts: 2,859
|
it has a properties array. check in the help
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Oct 2004
Posts: 3
|
fl.componentsPanel.addItemToDocument({x:100, y:100}, 'UI Components', 'Button');
var doc = fl.getDocumentDOM(); // Remember that selection is an array... var componentInstance = doc.selection[0]; for(var i in componentInstance.parameters) { var p = componentInstance.parameters[i]; if(p.name == 'label') { p.value = 'My Button'; } } |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|