A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: *Help FLASH 8* blur --

  1. #1
    Junior Member
    Join Date
    Apr 2003
    Location
    Dallas Area
    Posts
    19

    *Help FLASH 8* blur --

    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=f...ort-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];

  2. #2
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Everytime you change a property of a filter you have to re-apply it to the movie clip, so after this line of code:

    Code:
     dropShadow.blurY = nTimes-=5;
    You should add:

    Code:
    txtField.filters = [dropShadow];

  3. #3
    Junior Member
    Join Date
    Apr 2003
    Location
    Dallas Area
    Posts
    19

    no big deal to you...

    but you truely are a guru to me I was up all night with this. Obviously I'm new to flash. THANK YOU!!!

  4. #4
    Junior Member
    Join Date
    Apr 2003
    Location
    Dallas Area
    Posts
    19
    now I can't get it to come back to 100 = nTimes


    //--------------origninal from: http://www.osflash.org/doku.php?id=f...ort-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];

  5. #5
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    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??
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  6. #6
    Junior Member
    Join Date
    Apr 2003
    Location
    Dallas Area
    Posts
    19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center