웹디자인 강의
Flash 물방울 무비 시리즈(4)
2003.10.11 01:10
(예제 액션 적용 무비)
(빨간 소스 적용 무비)
1프레임 액션
stop();
var scale =5;
var scale1 =4;
m1.onRollOver = function() {
this.onEnterFrame = function()
{
if(this._xscale <= 500) {
this._xscale
+= scale*2;
this._yscale
+= scale*2;
_root.view1._xscale
+=scale1*2;
_root.view1._yscale
+=scale1*2;
}
for(i=1;
i<25; i++){
if(this.hitTest(_root["a"+i]) && _root["a"+i]._xscale >0){
_root["a"+i]._xscale
-= 2;
_root["a"+i]._yscale
-= 2;
}
}
}
}
m1.onRollOut = function() {
this.onEnterFrame = function()
{
if(this._xscale > 100) {
this._xscale
-= scale;
this._yscale
-= scale;
_root.view1._xscale
-=scale1;
_root.view1._yscale
-=scale1;
}
for(i=1;
i<30; i++){
if(_root["a"+i]._xscale < 100){
_root["a"+i]._xscale
+= 2;
_root["a"+i]._yscale
+= 2;
}
}
}
};
m2.onRollOver = function() {
this.onEnterFrame = function()
{
if(this._xscale <= 500) {
//
if(this._xscale <= 800)
this._xscale
+= scale*2;
this._yscale
+= scale*2;
_root.view2._xscale
+=scale1*2;
_root.view2._yscale
+=scale1*2;
}
for(i=1;
i<25; i++){
if(this.hitTest(_root["b"+i]) && _root["b"+i]._xscale >0){
_root["b"+i]._xscale
-= 2;
_root["b"+i]._yscale
-= 2;
}
}
}
}
m2.onRollOut = function() {
this.onEnterFrame = function()
{
if(this._xscale > 100) {
//
if(this._xscale > 200)
this._xscale
-= scale;
this._yscale
-= scale;
_root.view2._xscale
-=scale1;
_root.view2._yscale
-=scale1;
}
for(i=1;
i<25; i++){
if(_root["b"+i]._xscale <100){
// if(_root["b"+i]._xscale <200)
_root["b"+i]._xscale
+= 2;
_root["b"+i]._yscale
+= 2;
}
}
}
};
m3.onRollOver = function() {
this.onEnterFrame = function()
{
if(this._xscale <= 500) {
//
if(this._xscale <= 600)
this._xscale
+= scale*2;
this._yscale
+= scale*2;
_root.view3._xscale
+=scale1*2;
_root.view3._yscale
+=scale1*2;
}
for(i=1;
i<25; i++){
if(this.hitTest(_root["c"+i]) && _root["c"+i]._xscale >0){
_root["c"+i]._xscale
-= 2;
_root["c"+i]._yscale
-= 2;
}
}
}
}
m3.onRollOut = function() {
this.onEnterFrame = function()
{
if(this._xscale > 100) {
this._xscale
-= scale;
this._yscale
-= scale;
_root.view3._xscale
-=scale1;
_root.view3._yscale
-=scale1;
}
for(i=1;
i<25; i++){
if(_root["c"+i]._xscale <100){
//
if(_root["c"+i]._xscale <50)
_root["c"+i]._xscale
+= 2;
_root["c"+i]._yscale
+= 2;
}
}
}
};