Is there a horizontal flip function in arctic.js?

112 views
Skip to first unread message

wjx

unread,
Jun 12, 2012, 8:00:12 AM6/12/12
to Arctic.js
Hi, there

I noticed that images seems to be rotated only by the origin point.
Is there a method of flip images by x-axis or y-axis?


Thanks

chikathreesix

unread,
Jun 12, 2012, 10:42:05 PM6/12/12
to Arctic.js
Hi, wjx

currently there is no flip function in Arctic.js. sorry...
I will add this feature.

Thanks

jingxuan wang

unread,
Jul 14, 2012, 11:22:30 PM7/14/12
to arct...@googlegroups.com
Hello, there

I think I have some problem in using arctic.js
Anyone could help me out?

I tried to clip a part of an image for a SequenceMovieClip
But I found that the click response region is bigger than expected.
Following code will show this problem.
If I click the animation, console will print out a message.
But if I click the right area which is blank and no other objects there,
console print out that message as well.

On the following sample, if you click region of [174, 0, 348,147], console will print a message.

I have no idea whether this is the correct way of using it. 
Is it a bug?

-------------------
sample code
-------------------

var GameMain = arc.Class.create(arc.Game, {

    initialize:function(params){

        var ball1 = new arc.display.SheetMovieClip(

system.getImage(

'img/burst.png'

[174, 0, 348, 147]

), 

174, 2

);

 

    //2fpsで再生を行うMovieClipを生成

        var mc = new arc.display.MovieClip(2, true);

 

 

    //1フレーム目にscaleX:0.5, scaleY:0.510フレーム目でscaleX:3, scaleY:3SINE_OUTでアニメーションを行う

        mc.addChild(ball1, {

1: {},

2: {},

        });

 

  mc.addEventListener(

arc.Event.TOUCH_END, 

function() {console.log("this should not be triggered!");}

);


    //MovieClipのインスタンスがaddChildされたタイミングで再生開始

        this.addChild(mc);

    },

    update:function(){

 

    }

});


window.addEventListener('DOMContentLoaded', function(e){

system = new arc.System(

960,

960,

'canvas'

);

system.setGameClass(GameMain);

system.addEventListener(arc.Event.PROGRESS, function(e){});

system.addEventListener(arc.Event.COMPLETE, function(e){});

system.load([

'img/burst.png',

]);

}, false);



2012/6/13 chikathreesix <chikat...@gmail.com>
Reply all
Reply to author
Forward
0 new messages