peter-h
asked on
How to create a bitmap symbol in Library with Linkage ID using AS2?
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
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
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
So far, all I know of for options for the LinkageID are: "TreeNodeIcon","TreeFolder
Thanks. Your expert advise is appreciated, as always. :)
Pete.
addtional keywords: customize customise adobe lingo
ASKER
Therein lies the problem: I can't do anything at design time, so I need a runtime solution.
Knowing the already-existing linkage ID of a Library item, could I manipulate the existing bitmap?
And even if I could do this I still need at least one other known Library item (apart from "TreeNodeIcon","TreeFolder Closed" & "TreeFolderOpen") to implement to requirements. Are there any others known for the tree component?
Knowing the already-existing linkage ID of a Library item, could I manipulate the existing bitmap?
And even if I could do this I still need at least one other known Library item (apart from "TreeNodeIcon","TreeFolder
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
solution is, create a movieClip with linkageID at design time...
and add code inside that movieClip to load dynamically created bitmap inside..