Jukebox Walk-Through


With the jukebox almost ready to go, the final step is to meet with Angie and Margaret and walk them through the features.

graphics/01fig22a.gif

graphics/01fig22b.gif

Thankfully, the changes we reviewed should be fairly quick to implement. The first one is to make an error message. This will be created as a MovieClip, which will display as hint text that will be visible based on the user action with one method, setLabel(), and one event, onMouseDown() (Figure I-4.5).

Figure I-4.5. Error-message hint text.

graphics/01fig26.gif

The lone method for the error message will be used to set the label. It will also be used to make the error message visible and to set the coordinates.

 functionsetLabel(lbl){   _visible=true;  lbl_txt.text=lbl;  _x=_root._xmouse;  _y=_root._ymouse; } 

The only event for the error message will be used to hide the error message when a user clicks the mouse down.

 this.onMouseDown=function(){   if(_visible){   _visible=false;  } } 

To make use of the error message, a conditional will be added to the change handler of each button that requires an error message. The change handler will check to make sure that a selection has been made from the respective ListBox.

 varitems=playList_lb.getSelectedIndices();  if(items==null){  error_mc.setLabel("Selectasong(s)fromtheplaylisttoremove."); }else{  ... 

If nothing is selected, then the getSelectedIndices() method will return null, and the setLabel() method of the error message will be called with the error message passed in as a parameter.

For the final change, a TextField that welcomes the user and tells how to use the jukebox will be added over the playlist. The field will be cleared if a play list is found in the SharedObject.

 if((settings_so.getPlayListLabels()!=null)&& (settings_so.getPlayListLabels().length!=0)){   status_txt.text="";  ... 

With the walk-through complete and final features added, the next step is to move the jukebox to our production servers so customers can begin using it. After that, we'll go through a postmortem review to help with the planning of Phase 2 for the jukebox.



Reality Macromedia ColdFusion MX. Macromedia Flash MX Integration
Reality Macromedia ColdFusion MX: Macromedia Flash MX Integration
ISBN: 0321125150
EAN: 2147483647
Year: 2002
Pages: 114

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net