# \[fmx 2004\] Transformalpha

**URL:** <https://forum.kirupa.com/t/fmx-2004-transformalpha/104575>\
**Category:** Uncategorized\
**Created:** [March 17, 2004, 4:57pm UTC](https://forum.kirupa.com/t/fmx-2004-transformalpha/104575 "2004-03-17T16:57:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![icestream](https://avatars.discourse-cdn.com/v4/letter/i/e19adc/32.png) [@icestream](https://forum.kirupa.com/u/icestream)\
**Post date:** [March 17, 2004, 4:57pm UTC](https://forum.kirupa.com/t/fmx-2004-transformalpha/104575/1 "2004-03-17T16:57:16Z")

</div>

hi,

I wrote the following script for a site. The code is on the first frame on \_root.

[AS]  
// header  
pathpadHolder = this.header.holder;  
padMenubar = this.header.menubar;

// functie voor de menubar bewegingfunction moveMenuBar(movieclip, button) {  
movieclip.onEnterFrame = function() {   
endX = button.\_x;   
movieclip.\_x += (endX-movieclip.\_x)/7;  
};  
}

// functie voor de overgangenfunction transFormAlpha(mc) { mc.onEnterFrame = function() {   
trace(this.\_alpha);   
if (this.\_alpha\<100) {   
ease = this.\_alpha/0.7;   
this.\_alpha += ease;   
trace(this.\_alpha);   
}  
else if (this.\_alpha\>100) {   
this.\_alpha = 100; delete this.onEnterFrame;   
}   
};  
}

// holder eigenschappen goed zetten  
function acties(obj, width, height) {   
obj.\_alpha = 2;   
obj.\_xscale = (width) ? width : 100;  
obj.\_yscale = (height) ? height : 100;  
transFormAlpha(obj);  
}

// plaatjes in een rij  
nummer1 = “1.jpg”;  
nummer2 = “2.jpg”;  
nummer3 = “3.jpg”;  
nummer4 = “4.jpg”;  
nummer5 = “5.jpg”;

//laad home plaatje  
padHolder.loadMovie(nummer1);  
acties(padHolder);

this.header.button1.onRelease = function() { padHolder.unloadMovie();  
padHolder.loadMovie(nummer1);  
acties(padHolder);  
};  
this.header.button2.onRelease = function() { padHolder.unloadMovie();  
padHolder.loadMovie(nummer2);  
acties(padHolder);  
};  
this.header.button3.onRelease = function() { padHolder.unloadMovie();  
padHolder.loadMovie(nummer3);  
acties(padHolder);  
};  
this.header.button4.onRelease = function() { padHolder.unloadMovie();  
padHolder.loadMovie(nummer4);   
acties(padHolder);  
};  
this.header.button5.onRelease = function(){  
};  
this.header.button6.onRelease = function() {  
};

//loop voor acties plaatsen op 7 buttons  
for (i=1; i\<7; i++) {   
this.header[“button”+i].onRollOver = function() { moveMenuBar(padMenubar, this);   
}  
};  
[/AS]

Everything works except the transitions between the jpg’s, because the oef handeler only loops 1 time. Does somebody know how to solve this problem?

thanx
