Page 1 of 1

[04 Mar 2008] Another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 04 Mar 2008 18:40:23 +0100

i have a little problem here when moving layers...

the code first :o)

Code: Select all

@BRUSH 1, "Hollywood.png", {LoadAlpha = True}
@BRUSH 2, "image15.jpg"

DisplayBGPic(1)
EnableLayers()

DisplayBrush(2, 16,#TOPOUT)
DisplayBrush(1, 0, 0)
i = -1013
Function p_MainLoop()
	If i < 0
		AddMove(1, #LAYER, 1, 16, i)
		i=i+1
		DoMove(1)
	EndIf
EndFunction

SetInterval(1, p_MainLoop, 1000/60)  ; 60fps

Repeat
    WaitEvent
Forever
With this code i want to scroll the layer 1 from the top outside the screen to the bottom. My image is a 256x1013 pixel jpeg. The problem i've found is that, for a while the layer scroll, then the program hangs and the debugger tells me : Internal limit encountered! Contact the author.... Line bla.. bla.. in AddMove

Any suggestions?

[04 Mar 2008] Re: Another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 4 Mar 2008 11:20:59 -0800 (PST)

I'm not sure if this is the problem, but the Hollywood documentation suggests using ClearMove() after DoMove(). However, since you are using layers anyway, why not comment out your AddMove() and DoMove() commands, and in place of AddMove(1, #LAYER, 1, 16, i), try ShowLayer(1, 16, i)

[04 Mar 2008] Re: Another problem :D

Posted: Sat Jun 13, 2020 5:31 pm
by Andrea
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 04 Mar 2008 21:12:07 +0100
I'm not sure if this is the problem, but the Hollywood documentation suggests using ClearMove() after DoMove(). However, since you are using layers anyway, why not comment out your AddMove() and DoMove() commands,
Yes, with this works
and in place of AddMove(1, #LAYER, 1, 16, i), try ShowLayer(1, 16, i)
The same with the display command

Thans a lot rev :D :D