Editing Mac Dock for Rollover effects

Hi everyone! Just registered here…been using kirupa tutorials for ages now though.:smiley:

Anyway, I am editing a mockup of a Mac OS dock from http://jrgraphix.net/research/flash-dock-mx-2004.php , Which is coded for MX-2004, I am editing in Studo 8, at the moment.

Pretty much what I am wanting to do is have the icons act as buttons with animated rollovers. Unfortunately, I am more of a visually based designer as opposed to a scripting guru. :thumb2:

I have looked through the external code that resides with it and know approximately where to add code, but I am having some serious issues with syntax/methods. Here are the two example pieces of code edited for my usage:


Stage.scaleMode = ‘noScale’;

// Handles clicks on icons
this.dockActions = function(label) {
switch(label) {
case ‘About’:
trace(‘Play the About Movie Clip’);

        break;
    case 'Blog':
        trace('This is how you load a JPEG or SWF into a new level.');
        loadMovie('sample.jpg', '_level10');
        break;
    case 'Forum':
        trace('This is how you load a JPEG or SWF into a movieclip.');
        this._parent.sample_mc.loadMovie('sample.jpg');
        break;
    default:
        trace('Default action here.');
}

}

var dockTemplate = {
layout: 0, /* top | right | bottom | left | rotation */
icon_size: 128,
icon_min: 50,
icon_max: 128,
icon_spacing: 2,
items: [
{ id: ‘home’, label: ‘Home’},
{ id: ‘about’, label: ‘About’ },
{ id: ‘contact’, label: ‘Contact’ },
{ id: ‘product’,label: ‘Product’ },
{ id: ‘services’, label: ‘Services’ },
{ id: ‘support’, label: ‘Support’ }
],
span: null,
amplitude: null,
callback: this.dockActions
}

this.attachMovie(‘Dock’, ‘menu_mc’, 1, dockTemplate);
this.menu_mc._x = Stage.width / 2;
this.menu_mc._y = Stage.height;

------ And the function that creates the icons:

private function createIcons():Void {
var i:Number;
var id:String;
this.scale = 0;
this.width = (this.items.length - 1) * this.icon_spacing + this.items.length * this.icon_min;
var left:Number = (this.icon_min - this.width) / 2;
for(i = 0; i < this.items.length; i++) {
this.createEmptyMovieClip(String(i), i + 10).attachMovie(this.items*.id, ‘_mc’, 1);
this*._mc._y = -this.icon_size / 2;
this*._mc._rotation = -this._rotation;
this*._x = this*.x = left + i * (this.icon_min + this.icon_spacing) + this.icon_spacing / 2;
this*._y = -this.icon_spacing;
this*.onRelease = launchIcon;
this*.useHandCursor = true;

    }
}

Been wracking my brains for a while. As you can see the initial code goes through some methods of doing actions, but it is entirely based off of click. May end up just getting a hold of a developer friend, but thought I would post here first. Thanks in advance!