Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7075445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:10:42+00:00 2026-05-28T06:10:42+00:00

i got this script from this tutorial . I tried to convert it from

  • 0

i got this script from this tutorial. I tried to convert it from AS2 to AS3, but it seems like the displacement filter is only applied once for some reason. After that, the bitmap isn’t updated …

    var myBitmap:BitmapData = new BitmapData(1000,600,false,0);
    var pt = new Point(0,0);
    var mpoint = new Point(0,0);
    var myDispl = new DisplacementMapFilter(myBitmap, mpoint,1,2,10,30);
    var myList = new Array();
    myList.push(myDispl);
    water_mc.filters = myList;
    var i = 1;
    this.addEventListener("enterFrame", perlin );

    function perlin(evt)
    {
        var filterList = water_mc.filters;
        var offset = new Array();
        offset[1] = new Object(); 
        offset[1].x = i * 15;
        offset[1].y = i/8 * 15;
        filterList.mapBitmap = myBitmap;
        myBitmap.perlinNoise(45,5,3,50,true,false, 7,true,offset);

        water_mc.filters = filterList;
        i++;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:10:42+00:00Added an answer on May 28, 2026 at 6:10 am

    You dont need to apply the filter everytime since you are not making any changes to the filter in the Enter_Frame Handler. Also the DisplacementMapFilter can be directly applied to your movieclip. I have made some code changes to the code you pasted.

    //waterImage is a Bitmap Object. If you embed the object it will be a bitmap so no issues
    // typecast it if necessary. If you use a loader to load your image, then you can get the bitmap
    // using loader.content after the loader has done loading.
    var mpoint = new Point(0,0);
    var myDispl = new DisplacementMapFilter(null, mpoint,1,2,10,30);
    waterImage.filters = [myDispl];
    var i = 1;
    this.addEventListener("enterFrame", perlin );
    
    function perlin(evt)
    {
        waterImage.bitmapData.perlinNoise(45,5,3,50,true,false, 7,true,[i*15,(i/8)*15]);
        i++;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a bash script that reads input from a file like this: while
This is the calendar script I got from an online tutorial. It works fine
I got this script from here . I'm probably staring right at it but
I got this javascript code from off the internet. It's a script that changes
Right now I've got a mod_wsgi script that's structured like this.. def application(environ, start_response):
I got this colored dir script from http://tasteofpowershell.blogspot.com/2009/02/get-childitem-dir-results-color-coded.html : function ls { $regex_opts =
I was trying this script from a pdf file.I got stuck where the target
Hi All First of all I don't know Javascript, I got this script from
This is script from an audio player. I got from the Jquery cookbook that
ive got this script that echos the information from a mysql database. now it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.