1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Stage.scaleMode = 'noScale';
this.dockActions = function(label) {
switch(label) {
case 'Preferences':
trace('Actions here to handle Preferences.');
break;
case 'Blog':
trace('Actions here to handle Blog.');
break;
case 'Forum':
trace('Actions here to handle Forum.');
break;
default:
trace('Default action here.');
}
}
var dockTemplate = {
layout: 90, /* top | right | bottom | left | *rotation* */
icon_size: 128,
icon_min: 32,
icon_max: 128,
icon_spacing: 2,
items: [
{ id: 'settings', label: 'Preferences'},
{ id: 'blog', label: 'Blog' },
{ id: 'forum',label: 'Forum' },
{ id: 'shop', label: 'Store' },
{ id: 'support', label: 'Tech Support' },
{ id: 'search', label: 'Search Archives' },
{ id: 'contact', label: 'Contact Us' },
{ id: 'trash', label: 'Trash' }
],
span: null,
amplitude: null,
callback: this.dockActions
}
this.attachMovie('Dock', 'menu_mc', 1, dockTemplate);
this.menu_mc._x = Stage.width / 12;
this.menu_mc._y = Stage.height /2; |
Partager