At a recent project I had to make a video loop indefinitely and most importanly: seemless. I tried all kinds of different methods, including using FLV, F4V, M4V, FLVplayback component, the Video class, embedded video and a few other. The only solution that worked was (in my opinion) the most ...
I code snippet I tend to use quite often. And one that I tend to forget how I wrote the last time i used it.
while (this.numChildren > 0)
{
removeChild(this.getChildAt(0));
}
Update:
And when you want to remove a child as a part of an event handler, do this:
event.target.parent.removeChild(event.target);
Let's say you want to ...
Posted in
AS3,
flash,
flexTags:
AS3,
child,
code,
event,
eventhandler,
flash,
flex,
parent,
remove,
removeChild,
snippet
If you have experienced getting only gibberish from the Arduino when tracing it's output using Flash, Flex or AIR, you might have misconfigured the socket server.
I spent a whole day trying to figure out why I only got square boxes, a couple of random numbers and an occasional 'f' now ...
Posted in
AS3,
arduino,
flash,
flexTags:
actionscript,
air,
arduino,
baud,
configure,
flash,
flex,
physical computing,
socket,
socket server
A couple of days ago I encountered a problem with Events. I clicked and object, but another returned the event. Despite adding mouseEnabled = false to the objects I didn't care about, I still couldn't figure it out. Events is nothing new to me, but this was beginning to get ...
Today I was tearing out my hair in frustration of a problem I just couldn't seem to figure out. And the solution was just about as stupid as I had hoped it wouldn't be.
The case was as followed: I'm putting MovieClips in a SWF for use as a library in ...
Posted in
flashTags:
actionscript,
AS3,
asset,
asset management,
class,
cs3,
custom class,
document class,
extending,
external assets,
external library,
flash,
library,
linkage,
movieclip,
package,
resources
For the time I'm working on a website and so far I've only spent some time doing research around all the ideas I have. One of them was to put all MovieClips in one externally loaded SWF. Loading the SWF is easy, but how do you access the individual MovieClips? ...
Posted in
AS3,
flashTags:
actionscript,
AS3,
assets,
big spaceship,
bulkloader,
document class,
external,
flash,
getdefinitionbyname,
load,
swf
I just stumbled across a very simple way of achieving an onReleaseOutside event when working with Papervision3D.
Now, why would I bring up Papervision3D in such a setting? If you, like me, have included a Papervision3D scene on a stage where other 2D objects (like MovieClips and other Flash components) are ...
Posted in
AS3,
flash,
papervision3dTags:
actionscript,
AS3,
blendmode,
button,
event,
fill,
flash,
graphics,
mouseevent,
multiply,
onrelease,
onreleaseoutside,
papervision3d,
pv3d,
release,
white
Sometime this winter a friend of mine (Knut Urdalen) introduced me to a part of mathematics called modular arithmetic. Now that is a nifty little thing.
In modular arithmetic, or modulus if you like, numbers reset themselves when reaching a given limit. Modulus is also known as "clock arithmetic", and the ...
Posted in
AS3,
flash,
flex,
mathTags:
actionscript,
AS3,
column,
flash,
flex,
grid,
loop,
math,
modulo,
modulus,
row