Page 1 of 1

[06 Nov 2009] Brush/Layer

Posted: Sat Jun 13, 2020 5:32 pm
by Elwood
Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 06 Nov 2009 11:05:32 +0200

Hello,

I'm trying to move a brush but can't make it :-(

I have a brush in Designer called "arrow1". I put on his code the following

Code: Select all

x=GetAttribute(#LAYER, %!arrow1, #ATTRXPOS)
Y=GetAttribute(#LAYER, %!arrow1, #ATTRYPOS)
MoveLayer(%!arrow1,x,y,x+200,y+200, { Speed = #SLOWSPEED })
Q1: Should I use MoveLayer() or MoveBrush()? What's the difference?

Doing so I thought the brush would move slowly but it doesn't. It just appears immediately at position x+200,y+200 I tried to place these lines on the code dialog and even on an event but both failed.

Q2: What's wrong?

Thanks

[07 Nov 2009] Re: Brush/Layer

Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 07 Nov 2009 23:54:21 +0100
Hello,

I'm trying to move a brush but can't make it :-(

I have a brush in Designer called "arrow1". I put on his code the following

Code: Select all

x=GetAttribute(#LAYER, %!arrow1, #ATTRXPOS)
Y=GetAttribute(#LAYER, %!arrow1, #ATTRYPOS)
MoveLayer(%!arrow1,x,y,x+200,y+200, { Speed = #SLOWSPEED })
Q1: Should I use MoveLayer() or MoveBrush()? What's the difference?
You must use MoveLayer() because MoveBrush() will create a new layer instead of using the existing one.

Actually, I don't see why the code you posted doesn't work. What happens if you pass the speed directly, i.e.:

Code: Select all

MoveLayer(%!arrow1,x,y,x+200,y+200, #SLOWSPEED)
Does it work then?