Try this: on (release) { _parent./WA.onEnterFrame = function(){ // Set "_parent./WA" to wherever your Movie Clip is if(this._alpha !=0){ this._alpha -= 5; }else{ delete this.onEnterFrame; } } } Hope that helps, Mannix
[quoted text, click to view] "bwclan" <webforumsuser@macromedia.com> wrote in message news:dvsk94$ii1$1@forums.macromedia.com... > hi all , this script makes the movie dissapear instantly ... what > iwant is for > it to fade out smoothly (cant use tweening cos of the script i > think) heres the > script on the close button > > on (release) { > setProperty("/WA", _visible, "0"); > } > > any help much appreciated > craig
You could use an interval timer.. on(release) { id1 = setInterval(fadeOut, 10); function fadeOut() { WA._alpha-=2; if(WA._alpha < 1) { clearInterval(id1); } } } HTH tralfaz
[quoted text, click to view] "SomeTallGy" <webforumsuser@macromedia.com> wrote in message news:dvsn44$m04$1@forums.macromedia.com... > you can create empty movie clips dynamically either on the timeline > or in any > movieclip. So if you want to make on on the main timeline you > > _root.createEmptyMovieClip("fade", this.getNextHighestDepth()); > > probably not working as "this" is probably trying to make the > movieclip within > the button which I think will not work. > > if you wanted to make on on the level(s) below.. use _parent or > _parent._parent and so on.
You really don't need to create any new movieclips to fade out one that already exists. Using the simple example I posted earlier.. http://members.cox.net/4my5cats/fadeInOut.html tralfaz
hi all , this script makes the movie dissapear instantly ... what iwant is for it to fade out smoothly (cant use tweening cos of the script i think) heres the script on the close button on (release) { setProperty("/WA", _visible, "0"); } any help much appreciated craig
You can try running a script through creating an empty movieclip to dim the alpha of the movieclip you want to fade. on (release){ this.createEmptyMovieClip("fade", this.getNextHighestDepth()); fade.onEnterFrame = function(){ if(_root.WA._alpha <= 0){ _root.WA._alpha -= 10; // set this number higher for faster fade } else { unloadMovie(this); // unloads the created movieclip once it has finished } } Thats how I usually do it, hope this helps! Cheers. PS. I wrote this code off the top of my head, so double check the syntax when you cut and paste :)
cheers stg ... cant get it to work tho .... there are a couple of syntax errors reported but i cant work out what they are to fix them lol !! when you say create an empty mc, do you mean within the button ? or on the timeline ? cheers for your input though mate craig
you can create empty movie clips dynamically either on the timeline or in any movieclip. So if you want to make on on the main timeline you _root.createEmptyMovieClip("fade", this.getNextHighestDepth()); probably not working as "this" is probably trying to make the movieclip within the button which I think will not work. if you wanted to make on on the level(s) below.. use _parent or _parent._parent and so on.
I like how the movie fades out, but is there anyway to unload the entire flash object? Say there was something that you want to show in that same place where the object is after it disappears, but it is not something you can do in flash.
Don't see what you're looking for? Try a search.
|