View Full Version : Blur transition effect
annette
09-08-2004, 12:15 PM
I'm having problems using the Blur effect tutorial 24 (www.actionscript.org/tutorials/beginner/Blur_transition_effect/index.shtml) by Patrick Mineault. I've used a button in the root to trigger the effect - one alternative he suggests- and this works fine when I blur just one image but when I try to use the same code for two images in seperate movie clips it only works on one. Can anyone help?
By the way I have used different instance names for the two images
hi
Hmmmm
not sure how good you are (its a litle bit complicated) at least mi way :)
class blur extends MovieClip {
var q, qq, IntVal, Caller;
function blur() {
//Uncoment the 2 linese belov if you not wana have it as an onroll efect
//juse it then NameofTheCLip.rollin() this will make it inwisible
//juse NameofTheCLip.rollout will make it visible
onRollOver = rollin;
onRollOut = rollout;
}
//if you rollout STOP what eve runing START alpha+ till alpha 100
public function rollout() {
clearInterval(IntVal);
if (!qq) {
qq = 1;
q = 0;
//to make it slower change the 10 to higher number
IntVal = setInterval(this.blurin, 10, this);
} else {
qq = 0;
}
}
//if you rollin STOP what eve runing START alpha- till alpha 0
public function rollin() {
clearInterval(IntVal);
if (!q) {
q = 1;
qq = 0;
//to make it slower change the 10 to higher number
IntVal = setInterval(this.blurOut, 10, this);
} else {
q = 0;
}
}
function blurOut(Caller) {
if (Caller._alpha>0) {
Caller._alpha -= 1;
} else {
clearInterval(Caller.IntVal);
}
}
function blurin(Caller) {
if (Caller._alpha<100) {
Caller._alpha += 1;
} else {
clearInterval(Caller.IntVal);
}
}
}
This is NOT a flash Document !!!
it is a Actionscript File !!! you have to save it whit name "blur" (casesensitiv!!)
to get it to work :EDIT/PREFERENCES/ACTIONSCRIPT/ACTIONSSCRIPT 2.0 SETINGS the folder in which this file is have to be set
then the blured part of your Combiimage
in the library rightclick /Linkage AS 2.0 Class --->blur so the Clip has a NEW functionaliti
(Sorry Mi english is not to good especiali to describe somthing :( )
if you need aditioanal help whit it write a messeg
annette
09-08-2004, 03:30 PM
Hi thanks very much for helping but I'm not sure I understand. I've put the blur.as in a folder on my desktop and in the Actionscript 2.0 settings I've referenced to this folder. But each time I test the movie it says that the blur.as class couldnt be loaded. Also I'm not sure exactly where I should be putting the linkage in - should it be the button I'm using in the root or the individual image movie clips?
the linkage shoud be on the CLip wich have to by InvisibleOut it adds the functionaliti to it which is described in blur.as
take kear Class Names are casesensitiv
blur -->ok
Blur -->wrong
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.