Using Actionscript 2, at runtime, how do I create a new bitmap symbol in the Library, complete with Linkage ID?
My aim is to change an icon on the tree component, but have the icon image dynamically created at runtime. Changing the icon is done using:
Tree.setStyle("defaultLeaf
Icon","lin
kageID")
So you see, I need to reference the new bitmap using the linkageID string.
Due to me using the pre-compiled Flash tree component within macromedia Director MX2004, I have no authoring-time ability to add graphics to the library, but I can pass in a bitmap datatype into the Flash object to modify a graphic. Alternatively, if I could specify an external bitmap when I create the Flash Library image, that would be even better.
Or, in the seemingly unlikely event that a Director developer knows a better way of adding a custom graphic to tree nodes, I'd love to be in on your secret. I've trawled the web for this, and haven't found an answer yet.
At the very least, I need to turn the leaf node icons off. If I use Tree.setStyle("defaultLeaf
Icon","") then no icon appears, but the indenting for that line item gets reset to 0. Using guesswork, I've tried "null", "nullicon", null, etc, but all have the same negative effect on indentation.
So far, all I know of for options for the LinkageID are: "TreeNodeIcon","TreeFolder
Closed" & "TreeFolderOpen". Do you know of any other possible values?
Thanks. Your expert advise is appreciated, as always. :)
Pete.
addtional keywords: customize customise adobe lingo
Start Free Trial