Advertisement

07.08.2008 at 05:51PM PDT, ID: 23548808
[x]
Attachment Details

How to create a bitmap symbol in Library with Linkage ID using AS2?

Asked by peter-h in ActionScript, Macromedia Director Video Editing Software, Macromedia Flash

Tags: adobe / macromedia, Flash Professional mx2004, actionscript 2

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("defaultLeafIcon","linkageID")

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("defaultLeafIcon","")  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","TreeFolderClosed" & "TreeFolderOpen". Do you know of any other possible values?

Thanks. Your expert advise is appreciated, as always. :)
Pete.

addtional keywords: customize customise adobe lingoStart Free Trial
[+][-]07.11.2008 at 08:50PM PDT, ID: 21987574

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 06:06AM PDT, ID: 22045676

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.31.2008 at 04:55AM PDT, ID: 22128800

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ActionScript, Macromedia Director Video Editing Software, Macromedia Flash
Tags: adobe / macromedia, Flash Professional mx2004, actionscript 2
Sign Up Now!
Solution Provided By: peter-h
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628