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
I'm currently using Flex Builder 3.0.1.205647 with Flex SDK 3.1.0 and I got an error saying Flex couldn't create my AIR file. After a bit of googling I found out that it is a bug in Flex Builder 3 (Bug report #FB-11712), and it seems like it will be fixed ...
Posted in
air,
flexTags:
air,
application icon,
bug,
compile error,
create file,
flex builder,
flex sdk,
gumbo,
icon,
non-embedded files,
xml
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 ...
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
Earlier this week I finished a project for one of our clients. The client produces quite lot of video content, and wanted a video player that could be embedded in other websites. This was a rather straight forward project where I got to use a lot of things I already ...
Posted in
AS3,
flexTags:
AS3,
buffering,
custom preloader,
events,
flex,
FLV,
MetadataReceived,
NetConnection,
video,
VideoDisplay
Interesting (and more than a bit annoying) observation; neither the property totalTime or the event MetadataEvent.METADATA_RECEIVED will trigger unless the buffer is full.I just discovered this as I tried to dynamically set the bufferTime to be 30% of the total playtime (I calculate the bufferTime using totalBytes and bytesLoaded). But ...