STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/62693149?noj=FRM62693149-22DC" width="1" height="1"></div>

Smooth Button Tutorial.swf

This is the info page for
Flash #30702

(Click the ID number above for more basic data on this flash file.)


Text
l

a

i

r

o

t

u

n

T

B

h

m

s

by technophobe

smooth button tutorial

in this tutorial you shall learn to create buttons like these:

text

text

First, check the .swf
Notice that when you hover over the button, the animation starts,
when you take the mouse away from the button it reverses, even
when you take the mouse away half way through the animation!
In trying to get this effect you may have tried to put the movieclip
with the reversed animation in the UP frame of the button and the
movieclip with the forward animation in the OVER frame. But this
will not be smooth. It looks like this:
Notice how the animation works if you hover over it all the way and
then let go. However it looks terrible if you hover over it and then
quickly take the mouse away. it also reverses when you open the file.

So this may seem like an impossible effect to achieve, but it really
isn’t that hard. Here’s how:
1.Create a symbol (F8) and call it button. Set the behaviour to
movieclip.

2.Put your animation in the movieclip (the actual animation, not a
movieclip with the animation. The frames of the animation need to
be seen in the clip you created in step1).

3.(Still in the movieclip) draw a shape (on a new layer) that you
want to be the area that users will hover over (the hit area). Hit F8
and turn it into a button, and make the object in it invisible, because
we don't want users to see it, its only a hit area.

<p align="left"><font face="Tahoma" size="15" color="#000000"><b>4.Go back to the movieclip and insert a new symbol on a new layer. <sbr />Make it a movieclip and give it the instance name ‘controller’ without <sbr />the ‘’s. make it invisible.</b></font></p><p align="left"><font face="Tahoma" size="15" color="#000000"><b>5.In the new movieclip called controller make three Keyframes. In <sbr />the first Keyframe open the actions bar and enter this: </b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>stop();</b></font></p><p align="left"><font face="Tahoma" size="15" color="#000000"><b>in the second frame enter this: </b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>_parent.prevFrame();</b></font></p><p align="left"><font face="Tahoma" size="15" color="#000000"><b>and in the third frame enter this: </b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>gotoAndPlay(2);</b></font></p>

<p align="left"><font face="Tahoma" size="15" color="#000000"><b>6.Then open the actions panel for the button that you created in <sbr />step3 and type this:</b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>on (rollOver, dragOver) {</b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>play();</b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>controller.gotoAndStop(1);</b></font></p><p align="left"></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>}</b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>on (rollOut, dragOut) {</b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>controller.gotoAndPlay(2);</b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>}</b></font></p><p align="left"></p><p align="left"></p>

<p align="left"><font face="Tahoma" size="15" color="#000000"><b>7. in the first and last frame of the movieclip you created in step1 put <sbr />the </b></font></p><p align="left"><font face="Tahoma" size="15" color="#0033ff"><b>stop();</b></font></p><p align="left"><font face="Tahoma" size="15" color="#000000"><b>action.</b></font></p><p align="left"></p><p align="left"></p>

you are done!!!
explanation:
what you have done is created the animation, made it play when you
roll over the clip, and made a controller clip that makes the playhead
effectively reverse when you roll off the movieclip.
thanks for watching! now use your imagination to think up new
things you could do with this!
thanks again,
Techno
This Tutorial was made exlusively for www.albinoblacksheep.com and it is illegal to
use it anywhere else.

ActionScript [AS1/AS2]

Frame 1
stop();
Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
stop();
Frame 10
stop();
Instance of Symbol 22 MovieClip in Symbol 23 MovieClip Frame 1
onClipEvent (enterFrame) { point = new Object(); point.x = _xmouse; point.y = _ymouse; updateAfterEvent(); var diffX = (point.x - this._x); var diffY = (point.y - this._y); var r = Math.sqrt((diffX * diffX) + (diffY * diffY)); if (r > 15) { r = 15; } this.black._x = r * Math.cos(Math.atan2(diffY, diffX)); this.black._y = r * Math.sin(Math.atan2(diffY, diffX)); }
Symbol 31 Button
on (rollOver, dragOver) { play(); controller.gotoAndStop(1); } on (rollOut, dragOut) { controller.gotoAndPlay(2); } on (release) { _root.nextFrame(); }
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 2
_parent.prevFrame();
Symbol 32 MovieClip Frame 3
gotoAndPlay (2);
Symbol 36 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 26
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 26
stop();
Symbol 44 Button
on (rollOver, dragOver) { play(); controller.gotoAndStop(1); } on (rollOut, dragOut) { controller.gotoAndPlay(2); } on (release) { _root.prevFrame(); }
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 26
stop();
Symbol 53 Button
on (rollOver, dragOver) { play(); controller.gotoAndStop(1); } on (rollOut, dragOut) { controller.gotoAndPlay(2); }
Symbol 57 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 26
stop();
Symbol 61 Button
on (rollOver, dragOver) { play(); controller.gotoAndStop(1); } on (rollOut, dragOut) { controller.gotoAndPlay(2); }
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 26
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 26
stop();
Symbol 75 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 26
stop();
Symbol 81 MovieClip Frame 26
stop();
Symbol 85 MovieClip Frame 26
stop();

Library Items

Symbol 1 BitmapUsed by:2 37 70 95
Symbol 2 GraphicUses:1Used by:Timeline
Symbol 3 FontUsed by:4 5 6 7 8 9 10 11 12 13 14 15 16 17 48
Symbol 4 TextUses:3Used by:Timeline
Symbol 5 TextUses:3Used by:Timeline
Symbol 6 TextUses:3Used by:Timeline
Symbol 7 TextUses:3Used by:Timeline
Symbol 8 TextUses:3Used by:Timeline
Symbol 9 TextUses:3Used by:Timeline
Symbol 10 TextUses:3Used by:Timeline
Symbol 11 TextUses:3Used by:Timeline
Symbol 12 TextUses:3Used by:Timeline
Symbol 13 TextUses:3Used by:Timeline
Symbol 14 TextUses:3Used by:Timeline
Symbol 15 TextUses:3Used by:Timeline
Symbol 16 TextUses:3Used by:Timeline
Symbol 17 TextUses:3Used by:Timeline
Symbol 18 GraphicUsed by:23
Symbol 19 GraphicUsed by:23
Symbol 20 GraphicUsed by:21
Symbol 21 MovieClipUses:20Used by:22
Symbol 22 MovieClipUses:21Used by:23
Symbol 23 MovieClipUses:18 19 22Used by:24
Symbol 24 MovieClipUses:23Used by:Timeline
Symbol 25 GraphicUsed by:36 42 47 75 105
Symbol 26 ShapeTweeningUsed by:36
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClipUses:27Used by:36 42 47 105
Symbol 29 GraphicUsed by:36 47
Symbol 30 GraphicUsed by:31 32 44 53 61 85 86
Symbol 31 ButtonUses:30Used by:36 42 75
Symbol 32 MovieClipUses:30Used by:36 42 47 57 63 69 75
Symbol 33 ShapeTweeningUsed by:36
Symbol 34 ShapeTweeningUsed by:36
Symbol 35 GraphicUsed by:36 42 47 75 85
Symbol 36 MovieClipUses:25 26 28 29 31 32 33 34 35Used by:Timeline
Symbol 37 GraphicUses:1Used by:Timeline
Symbol 38 ShapeTweeningUsed by:42
Symbol 39 GraphicUsed by:42 63 69 75 86
Symbol 40 ShapeTweeningUsed by:42
Symbol 41 ShapeTweeningUsed by:42
Symbol 42 MovieClipUses:25 38 28 39 31 32 40 41 35Used by:Timeline
Symbol 43 ShapeTweeningUsed by:47
Symbol 44 ButtonUses:30Used by:47
Symbol 45 ShapeTweeningUsed by:47
Symbol 46 ShapeTweeningUsed by:47
Symbol 47 MovieClipUses:25 43 28 29 44 32 45 46 35Used by:Timeline
Symbol 48 TextUses:3Used by:Timeline
Symbol 49 FontUsed by:50 71 87 90 96 100 101 102 106
Symbol 50 TextUses:49Used by:Timeline
Symbol 51 ShapeTweeningUsed by:57
Symbol 52 ShapeTweeningUsed by:57
Symbol 53 ButtonUses:30Used by:57
Symbol 54 FontUsed by:55 67
Symbol 55 TextUses:54Used by:57 63
Symbol 56 GraphicUsed by:57
Symbol 57 MovieClipUses:51 52 53 32 55 56Used by:Timeline
Symbol 58 ShapeTweeningUsed by:63
Symbol 59 ShapeTweeningUsed by:63
Symbol 60 ShapeTweeningUsed by:63
Symbol 61 ButtonUses:30Used by:63 69
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClipUses:58 59 60 39 61 32 55 62Used by:Timeline
Symbol 64 ShapeTweeningUsed by:69
Symbol 65 ShapeTweeningUsed by:69
Symbol 66 ShapeTweeningUsed by:69
Symbol 67 TextUses:54Used by:69
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClipUses:64 65 66 39 61 32 67 68Used by:Timeline
Symbol 70 GraphicUses:1Used by:Timeline
Symbol 71 TextUses:49Used by:Timeline
Symbol 72 ShapeTweeningUsed by:75
Symbol 73 ShapeTweeningUsed by:75
Symbol 74 ShapeTweeningUsed by:75
Symbol 75 MovieClipUses:25 72 39 31 32 73 74 35Used by:Timeline
Symbol 76 GraphicUsed by:81
Symbol 77 ShapeTweeningUsed by:81
Symbol 78 ShapeTweeningUsed by:81
Symbol 79 ShapeTweeningUsed by:81
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClipUses:76 77 78 79 80Used by:86
Symbol 82 ShapeTweeningUsed by:85 86
Symbol 83 ShapeTweeningUsed by:85
Symbol 84 ShapeTweeningUsed by:85
Symbol 85 MovieClipUses:30 82 83 84 35Used by:86
Symbol 86 ButtonUses:39 81 85 30 82Used by:Timeline
Symbol 87 TextUses:49Used by:Timeline
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:Timeline
Symbol 90 TextUses:49Used by:Timeline
Symbol 91 BitmapUsed by:92
Symbol 92 GraphicUses:91Used by:Timeline
Symbol 93 BitmapUsed by:94
Symbol 94 GraphicUses:93Used by:Timeline
Symbol 95 GraphicUses:1Used by:Timeline
Symbol 96 TextUses:49Used by:Timeline
Symbol 97 BitmapUsed by:99
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:97 98Used by:Timeline
Symbol 100 EditableTextUses:49Used by:Timeline
Symbol 101 EditableTextUses:49Used by:Timeline
Symbol 102 EditableTextUses:49Used by:Timeline
Symbol 103 GraphicUsed by:105
Symbol 104 GraphicUsed by:105
Symbol 105 MovieClipUses:25 103 28 104Used by:Timeline
Symbol 106 TextUses:49Used by:Timeline
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:Timeline

Instance Names

"black"Symbol 22 MovieClip Frame 1Symbol 21 MovieClip
"controller"Symbol 36 MovieClip Frame 1Symbol 32 MovieClip
"controller"Symbol 42 MovieClip Frame 1Symbol 32 MovieClip
"controller"Symbol 47 MovieClip Frame 1Symbol 32 MovieClip
"controller"Symbol 57 MovieClip Frame 1Symbol 32 MovieClip
"controller"Symbol 63 MovieClip Frame 1Symbol 32 MovieClip
"controller"Symbol 69 MovieClip Frame 1Symbol 32 MovieClip
"controller"Symbol 75 MovieClip Frame 1Symbol 32 MovieClip

Special Tags

Protect (24)Timeline Frame 10 bytes ""




http://swfchan.com/7/30702/info.shtml
Created: 19/5 -2019 05:58:25 Last modified: 19/5 -2019 05:58:25 Server time: 22/12 -2024 13:48:35