Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.


B6005 - What are the three ways to reference icons with DisplayIcon?

by - Joseph Ganci

(This is a synopsis of a long question.) There are three ways to refer to Display icons using the DisplayIcon function, but I'm confused as to what the three ways are. 

DisplayIcon is a function, meaning it is always followed by parens which contains an argument.  The argument is the 
icon identifier (the icon id) of an icon to show. There are three ways: 

1. DispayIcon(@"icon title")  

    shows the contents of the Display icon whose title is "icon title". The @ operator converts an icon title to the icon's ide number, so DisplayIcon is happy.
2. DisplayIcon(@icon title)  
    shows the contents of the Display icon whose title is whatever value the user variable "icon title" happens to be at 
    the moment. So, if the user variable "icon title" contains the value "fred", it will jump to the icon title whose name is "fred".
3. DisplayIcon(icon title)  
    with no @ symbol means it  will show the contents of the Display icon whose id number is contained in the variable 
    "icon title". For instance, if you set "icon title" as follows: 

    icon title := @"wilma" 

    This sets "icon title" to the id number of the icon whose name is "wilma" (remember the @ converts it to an id number). Next you can use: 

    DisplayIcon(icon title) 

    which is fine because icon title is an id number.

There are 0 reviews
Add your review