i just found at libspark this handy class
it’s just like the ObjectDumper Class from AS2 =D
and has the ability to throw the message to the firebug console =D
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
package org.libspark.utils
{
import flash.external.ExternalInterface;
import flash.utils.getQualifiedClassName;
/**
* <p>Data????????????perl?Data::Dumper???????
* [...]
just copy and paste the following 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
function getRandomPointInTriangle (A:Point,B:Point,C:Point):Point {
//P = aA + bB + cC
//@see http://www.cgafaq.info/wiki/Random_Point_In_Triangle
var a:Number = Math.random();
var b:Number = Math.random();
if (a + b > 1) {
a = 1-a;
b = 1-b;
}
var c:Number = 1-a-b;
var rndX:Number = (a*A.x)+(b*B.x)+(c*C.x);
var rndY:Number = (a*A.y)+(b*B.y)+(c*C.y);
return new Point(rndX,rndY);
}
var triangleHeight:uint = 150;
var triangleShape:Shape = new Shape();
triangleShape.graphics.lineStyle(1,0xff0000);
triangleShape.graphics.moveTo(triangleHeight/2, 5);
triangleShape.graphics.lineTo(triangleHeight, triangleHeight+5);
triangleShape.graphics.lineTo(0, triangleHeight+5);
triangleShape.graphics.lineTo(triangleHeight/2, 5);
addChild(triangleShape);
var [...]
today i found my self trying to put an Sprite on the top of the display list
so here is the basic idea for solve that problem
1
2
3
4
5
6
7
8
9
10
11
function alwaysOnTop_handler(e:Event):void {
//make this child always on top!
parent.addChild(this);
}
function added_handler(e:Event):void {
parent.addEventListener(Event.ADDED, alwaysOnTop_handler, false, 0, true);
}
addEventListener(Event.ADDED_TO_STAGE, added_handler, false, 0, true)
cheers!
Posted in AS3, General | Tagged Display List |
Using the Flash CS4 i had a little problem… everytime i tried to use the text tool, either flash crashed after or before even putting the text box on stage.
Thinking it was a flash bug i google search it… i found this.
i read only a few top posts and found that the issue was the [...]
well this is a handy code snippet to validate a string
if you want to avoid some bad words, this is for you:
1
2
3
4
5
6
7
8
9
10
11
12
function isValid(str:String):Boolean {
var regExp:RegExp = /\b(badword|nastyWord)\b/i;
var _isValid:Boolean = !regExp.test(str);
return _isValid;
}
var _inValidMessage = "this is a example for a [...]
wowFlag from Wolf on Vimeo.
As promised on youtube: here it’s the source
( thx to saqoosha for the help on the flarToolkit issue of translating the flag fixed vertex… you can find his example of doing this on his site, but he maded it for away3d =) )
the code is very extended, so if you have [...]
Well this is i think the most common pattern that i use in my apps
it’s not the exact implementation but it works for me =D
here’s and example on how i use it
By Raúl | January 26, 2009
i was looking something like the “Activity” Window in Safari for Firefox and found this handy extension HttpFox
it comes very useful when you want to track your content-page information
cheers!.
By Raúl | January 12, 2009
hi guys! well we’ve been busy these days, in fact some of us didn’t have vacations these holidays
so you can imagine the load of work that we have
we promise to post some interesting things just in a couples of days (or weeks =D hehe)
meanwhile you can visit our new blog http://blog.grupow.com
cheers!