[Tutorial : Advance] Flexible Magic Button, version 01
[Tutorial : Advance] Flexible Magic Button, version 01
|
|
Feb 27 2006, 09:27 PM
Return to original view | Post
#1
|
![]() ![]() ![]() ![]()
Senior Member
662 posts Joined: Jan 2003 |
simple, not advance
|
|
|
Feb 28 2006, 10:44 AM
Return to original view | Post
#2
|
![]() ![]() ![]() ![]()
Senior Member
662 posts Joined: Jan 2003 |
yup, i mean this tutorial is simple and nice for ppl that want to learn it,
dun make ppl scare by just putting "advance" there. too many ppl already thinking flash is crap and use alot of bandwidth, but the crap is actually those ppl that dun know how to use and optimise it properly |
|
|
Mar 7 2006, 12:01 AM
Return to original view | Post
#3
|
![]() ![]() ![]() ![]()
Senior Member
662 posts Joined: Jan 2003 |
well, to made this more super advance, i will share my way of doing dynamic button/menu. right now, with this method, u still need to write quite alot of scripts. Let say, you have 100 buttons, u will need to
btn1.onrollover ............... btn100.onrollover btn1.onrollout ............... btn100.onrollout btn1.onrelease ............... btn100.onrelease Many way can be use to solve this. First, use Class file, write a generic button behaviour class file and attach it to the button movieclip (right click the button movie clip, and put the classname under AS2.0 class field) class btnClass extends MovieClip { public function btnClass() { } private function onRollOver() { this.gotoAndPlay("frmOver"); //this one goto play roll over frame in button } private function onRollOut() { this.gotoAndPlay("frmOut"); //this one goto play roll out frame in button } } second way, no need to use class file. just use attachmovie function with a loop. when u attach the button on stage, attach the onrollover,rollout and release for them as well. for(var i=0;i < numba;i++){ attacMovie("buttonname in library", "newname"+i, i); ["newname"+i].onRollOver = function(){ this.gotoAndPlay("frmOver"); } . // and all the remaining button behaviour . . . } - EDIT - and more tips, use XML to store all the button names, links and other details. and something more, which is not really needed to do most of the time. use action script to create the dynamic text field. you might asking why use actionscript to create it. because in this way, if your button has a long name, so it wont like cut out by the dynamic text field size you manually set in the button. As you see, I m just posting more of a "way" to do it, and not the full source, because I believe one person can learn more, if he/she research more on him/herself instead of modifying a source file provided or copy and paste This post has been edited by mclelun: Mar 7 2006, 12:19 AM |
| Change to: | 0.0150sec
0.43
6 queries
GZIP Disabled
Time is now: 27th November 2025 - 12:56 AM |