A time ago I had I little problem, I was doing an application and it had some severed changes, at some point I hasn’t capable of detect some mouse down events because I had a lot of sprites inside of sprites inside of movieClips with lots of event listeners and so on. So I and Hugo found this solution. Basically you put a generic mouse down event on stage and pass an array of objects with the name of the display object you want to catch the event and the name of the function you want to call. One good thing is that you can catch more than one event at the same time even if the displayObjects are in front of another displayObjects.
Note: this is really bad programming, if you can don’t use it, use only in severe cases.
This function can be used to test a hit between a displayObject with an amount of displaysObjects (Array). It will return the displayObject where the biggest contact area occurred. Note: it uses the bounding boxes.
How many times do we have an XML that comes from a webservice or from a sourceÂ
that we don't know. In these times getting that xml to a file can be cumbersome (imagine that you have authentication). So how about a nice little way to see all the node and attribute names in that xml, here's how:
For this file we'd get something like:
NODE NAME: Mouse
NODE NAME: ScreenSaver
ATTRIBUTE OF ScreenSaver NAME: desc
NODE CHILD OF ScreenSaver NAME: Active
ATTRIBUTE OF Active NAME: desc
NODE CHILD OF ScreenSaver NAME: File
ATTRIBUTE OF File NAME: desc
NODE CHILD OF ScreenSaver NAME: Time
ATTRIBUTE OF Time NAME: desc
ATTRIBUTE OF Time NAME: min
ATTRIBUTE OF Time NAME: max
ATTRIBUTE OF Time NAME: unit
To solve the problem of the image sequence I already know the solution, some time ago me and Pedro did something like this. This time I made two different versions, a class version (project in flex 3) and a component to flash cs3. With this solution, you can keep your images outside the project and manipulate them like a movieClip.
Arguments and Parameters
folder -> images folder.
filename -> first part of filename (ex: image1.jpg ), it should be "image".
type -> extension of the filename (jpg,png).
startImageNum-> first image number.
endImageNum->last Image numer.
For the class (ImageSequencer.as) version use:
For the component version:
Run “ImageSequencer.xmp†to install component. Run flash cs3, go to Windows > Components > Standard Components, drag ImageSequencer to the stage and fill the Parameters.
Last month I had to run one image sequence with 100 images, so I create a new movie in flash, put every image in every frame, image1 to frame1, image2 to frame2, etc. It ran ok in flash but when I exported it to flex (SWC format) the problem began. Every time I did some modifications to one of the SWC files in the project it started to delay 15 minutes to build. So be careful with the number of images inside a SWC file, it can be very boring.
Today our good friend Gabor announced his new baby: Decorator.
Decorator is an Image Generator that exports/print postscript from it. Which means you can print your images a large as you want, without any pixel.
It generates lovely outputs and I can already see the potential to this awsome tool, my living room will love this new way of wallpaper, and the best about it's always unique due to a random seed generator.
I've had the opportunity to try the closed beta, and I must say that I was impressed with the outcome of just a little fiddling with the engine.