[06 Nov 2009] Brush/Layer

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
Elwood
Posts: 36
Joined: Thu Aug 18, 2016 8:00 pm

[06 Nov 2009] Brush/Layer

Post 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
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[07 Nov 2009] Re: Brush/Layer

Post 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?
Locked