code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
| property verklein, verkleinfactor
property pHoogte, pBreedte
--property currentwidth, currentheight
property spriteNum
property startTime -- the time at the start of the timer
property timeoutDuration -- the duration of the wait
property timeMe -- a "toggle" to control the action in the exitFrame handler
property spriteNummer
on beginSprite me
-- uiteindelijke Width (W) en Height (H)
-- H = 758
-- W = 545
-- groot hoe die nu op de stage staat
--H = 682
--W = 1019
if sprite(spriteNum).Width = 1019 then pBreedte = 1019
if sprite(spriteNum).Height = 682 then pHoogte = 682
--pBreedte = the width of the sprite
-- pHoogte = the Height of the sprite
-- currentwidth= 1019
-- currentheight = 682
verkleinfactor = (100 - verklein)/ 100 -- verkleinings percentage
timeoutDuration = timeoutDuration * 30
startTime = the ticks
-- use this line if you want the timer to start when the sprite hits the stage
timeMe = 1 -- use this line if the timer starts when the sprite hits the stage
-- timeMe = 0 -- use this line if the timer starts when the user clicks the sprite
end
on getPropertyDescriptionList
description = [:]
addProp description,#verklein, [#default:50,#comment:"Hoeveel verkleint de gangdeur:",#format:#integer,#range:[#min:1, #max:99]]
addProp description,#timeoutDuration, [#default:5, #comment:"the duration of the time out wait in seconds:",#format:#integer,#range:[#min:1,#max:60]]
return description
end
on exitframe
if timeMe then
if the ticks > startTime + timeoutDuration then
-- the timer is up
timeMe = 0
pBreedte = pBreedte * verkleinfactor
pHoogte = pHoogte * verkleinfactor
end if
end if
updatestage
end |
wat mijn bedoeling dus is dat ik per sec. of minder een sprite in stappen laat verkleinen. ik hang dit dus ook aan een sprite.
kan iemand mij hiermee helpen? want mij lukt het niet.
Mijn profiel - Te koop: Overzicht van spullen..