Click to See Complete Forum and Search --> : *Help FLASH 8* blur --


josh_spoon
08-18-2005, 01:40 PM
I'm tring to mod this to have the blurY decrease to 1 to create a horror movie
trailer effect the counter works but blur does nothing.

here is the script:

//--------------origninal from: http://www.osflash.org/doku.php?id=flashcoders:undocumented:flash-7-export-to-flash-8

// I want do have the blur get smaller along the y axis. the funciton works as you
// see with the number count it is decreasing and stopping on < than 2 but the blur
// is doing nothing
//------------problem----------
function displayMessage():Void {
trace(nTimes);
dropShadow.blurY = nTimes-=5;
txtField.htmlText = "<font size='60'>The Wakening</font>" + nTimes;
if(nTimes < 2) {
clearInterval (nInterval);
}
}

var nTimes:Number = 100;
var nInterval:Number = setInterval(displayMessage, 1000);


//------------end problem----------

// create textfield
this.createTextField("txtField", this.getNextHighestDepth(), 100, 50, 500, 100);
txtField.html = true;

txtField.textColor = 0x0055CC;
// set new antialias mode
txtField.antiAliasType = flash.text.TextRenderer.AntiAliasType.ADVANCED;
// create shadow filter
var dropShadow = new flash.filters.DropShadowFilter();
dropShadow.blurX = 5;
dropShadow.blurY = nTimes; //var from problem
dropShadow.distance = 3;
dropShadow.angle = 35;
dropShadow.quality = 2;
dropShadow.alpha = 0.5;
// apply shadow filter
txtField.filters = [dropShadow];

FlashGuru
08-18-2005, 05:48 PM
Everytime you change a property of a filter you have to re-apply it to the movie clip, so after this line of code:

dropShadow.blurY = nTimes-=5;

You should add:

txtField.filters = [dropShadow];

josh_spoon
08-18-2005, 06:11 PM
but you truely are a guru to me I was up all night with this. Obviously I'm new to flash. THANK YOU!!!

josh_spoon
08-19-2005, 03:21 PM
now I can't get it to come back to 100 = nTimes


//--------------origninal from: http://www.osflash.org/doku.php?id=flashcoders:undocumented:flash-7-export-to-flash-8
// I can't get it to blur up now?
//
//
//------------problem----------
var nTimes:Number = 100;
// changes XBlur
var nTimesR:Number = 100;
// changes XBlur
var nInterval:Number = setInterval(dnScaleBlur, 100);
// every 100th of a second call dnScaleBlur
function dnScaleBlur():Void {
trace(nTimes);
if (nTimes<=100) {
nTimes--;
txtField.filters = [dropShadow];
} else if (nTimes<=30) {
nTimes++;
txtField.filters = [dropShadow];
}
//clearInterval (nInterval);
dropShadow.blurY = nTimes;
txtField.filters = [dropShadow];
txtField.htmlText = "<font size='30'>The Wakening</font>"+nTimes;
}
//------------end problem----------
// create textfield
this.createTextField("txtField", this.getNextHighestDepth(), 100, 50, 500, 100);
txtField.html = true;
txtField.textColor = 0x0055CC;
// set new antialias mode
txtField.antiAliasType = flash.text.TextRenderer.AntiAliasType.ADVANCED;
// create shadow filter
var dropShadow = new flash.filters.DropShadowFilter();
dropShadow.blurX = 2;
dropShadow.blurY = nTimes;

dropShadow.distance = 3;
dropShadow.angle = 35;
dropShadow.quality = 2;
dropShadow.alpha = 50;
// apply shadow filter
txtField.filters = [dropShadow];

>flashl!ght<
08-19-2005, 10:32 PM
Did I miss something? I thought Flash 8 wasn't, uh, released yet? How come I keep seeing people asking questions about how to use it??

josh_spoon
08-19-2005, 10:51 PM
go herehttp://www.osflash.org/doku.php?id=flashcoders:undocumented:flash-7-export-to-flash-8] here
and here (http://www.flashblog.com)