Coder Social home page Coder Social logo

Mask and Mouse about anthill-framework HOT 4 CLOSED

jackhsu avatar jackhsu commented on May 24, 2024
Mask and Mouse

from anthill-framework.

Comments (4)

AntKarlov avatar AntKarlov commented on May 24, 2024

Hi,

Now in the Anthill no opportunities to create dynamic masks. But you can use the classic mask in Flash IDE in MovieClips before they are rasterized to bitmaps. Let me know about your tasks for which you need a mask - maybe I can give you a solution?

I do not really understand the essence of the problem you described in the second question. Would be great if you send me a sample so that I could clearly see the problem. My email: [email protected]

Thank you for feedback!

from anthill-framework.

jackhsu avatar jackhsu commented on May 24, 2024

Hi ,

Sorry for later reply .

I will send you a mail .but I think it would be much easy to just write a simple code here.

Just write a loader swf with the following code:

package
{
import flash.display.Loader;
import flash.display.Sprite;
import flash.net.URLRequest;

[SWF(width="800", height="480", backgroundColor="#FFFFFF")]

public class TestLoader extends Sprite
{
    public function TestLoader()
    {
        var loader:Loader=new Loader();
        loader.x=90;
        loader.y=0;
        addChild(loader);
        loader.load(new URLRequest("AnthillExamples.swf"));
    }

}

}

Notice that the swf is a little larger than the loaded swf. And I set it's x position to 90. So when you click the button , you will find the click region is offsetted to the left.

Thank you so much .

from anthill-framework.

jackhsu avatar jackhsu commented on May 24, 2024

Just solved this on my side .
It's in AntG.as

internal static function updateInput():void
{
mouse.update(stage.mouseX,stage.mouseY);
keys.update();
updater.update();
}

I have changed mouse.update(stage.mouseX,stage.mouseY); into mouse.update(_anthill.mouseX,_anthill.mouseY);
And loaded swf works well.

For the mask . It's a good way to implement it in IDE. But it can't solve when I need to mask an animation loop.I need to work on a bottle full of water. and there's an animation of fluid in the bottle. the fluid is raising controlled by the code. In this way , preprocess the mask in IDE will make the water become still.

from anthill-framework.

AntKarlov avatar AntKarlov commented on May 24, 2024

Hi,

Good solution for the mouse issue! :)
In the Anthill version 0.3.0 added support for animated masks.

Thank you for the feedback!

from anthill-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.