[flashpro] Fade scripter for objects

Valentijn Langendorff valentijn at multimediaconsult.nl
Fri May 20 08:32:41 EDT 2005


Thanx Denis!

So it works for Mclips. I thought of converting my buttons then is a better
idea.... But is there a way to to do the same with 'stupid' instances of
buttons?

Regards




On 20-05-2005 14:24, "Denis Huë" <denis at atypic.be> wrote:

> 
> function fade(here, maxi) {
> here.onenterframe = function() {
> if (math.round(here._alpha)==maxi) {
> delete here.onenterframe;
> trace("stopped");
> } else {
> trace(this._alpha);
> finalfo = maxi;
> distancefo = (finalfo-here._alpha);
> here._alpha += distancefo/10;
> }
> };
> }
> 
> fade(yourmovieclip,10);
> stop();
> 
> 
> my function works for fadein & fadeout
> 
> // denis Huë / www.atypic.be
> 
> -----Message d'origine-----
> De : flashpro-bounces at muinar.org [mailto:flashpro-bounces at muinar.org] De la
> part de Valentijn Langendorff
> Envoyé : vendredi 20 mai 2005 13:59
> À : Mailing list for professional Flash designers and developers
> Objet : [flashpro] Fade scripter for objects
> 
>> 
>> Hi All,
>> 
>> I'm trying to fade an object [button] from 100% to 20%
>> Within a actionscript...
>> What am I doing wrong here!. Ps. Placed in the first frame of a scene x
>> 
>> 
>> function fade(){
>>       this._alpha = 100;
>>       
>>       this.onLoad = function(){
>>           if (this._alpha<100 && this._alpha>20){
>>               this._alpha -= 5;
>>           }
>>       }
>>       
>>       
>> }
>> buttoninstanceorotherobjects.fade();
>> 
>> 
>> Regards Valentijn
>> 
>> ______________________________
>> 
>> ICT Solutions & Design
>> 
>> Valentijn Langendorff
>> E : valentijn at multimediaconsult.nl
> 
> 
> ------------------------------------------------------------------
> send message to the list:               mailto:flashpro at muinar.org
> [FlashPro] list info, subscribe, archive:   http://flash-list.com/
> There's also a WebPro mailing list:     http://webdesign-list.com/
> cutting-edge sounds for flash:            http://flash-sounds.com/
> 
> 
> ------------------------------------------------------------------
> send message to the list:               mailto:flashpro at muinar.org
> [FlashPro] list info, subscribe, archive:   http://flash-list.com/
> There's also a WebPro mailing list:     http://webdesign-list.com/
> cutting-edge sounds for flash:            http://flash-sounds.com/




ICT Solutions & Design

Valentijn Langendorff
E : info at multimediaconsult.nl



More information about the FlashPro mailing list