February 20th, 2008 by
Jaap Kooiker
This is like…. what?
I recently discovered that there’s a problem with the registration point when a html layer (eg div) is placed above the flash runtime. For some weird reason the Application registration point is set to zero according to the x and y of the overlay div (see sample). I for sure cannot change that registration point so why is it changing. The other thing is that all content stays in place at the right coordinates, but the mouse position shows us (see example below) that the registration point changes - it looks like that anyway.
From my opinion this is a bug of the player. The weird thing is that this only occurs in FireFox and not in IE.
It could be a serious problem when you wan’t to know last registered mouseX and mouseY before “leaving” the stage.
note:
I got a rather “innovative” (read: not nice) sollution to know the last real mouseX and mouseY postion.
Keep the last 2 known positions in an array and stop registering on Event.MouseLeave. Use the fore-last position in you’re application to determine the last valid position.
Check this Sample
Is there someone who can tell me why this “Phenomenon” occurs? I would like to know….why…
Edit Firefox 2.0.0.12 / Fp 9.0.115.0:

Jaap Kooiker
Posted in Actionscript 3.0, Bugs, Components, Did you know?, Flex |
4 Comments »
February 15th, 2008 by
Jaap Kooiker
My…my…my…
Internet Explorer is like….bad for your health (but you already know that)
In one of the projects I was working on, we used the custom preloader class by Jesse Warden. This way we were able to define our own preloader and it works great, but ofcours not in IE. The alignment in IE doesn’t seem to work after a refresh - or not even at all. This doesn’t happen in any other respectable browser and when using the default flex html template. But we use SWFObject in our projects and then the problem occurs (again only in IE). For the record…it isn’t a SWFObject problem.
After placing a resize event listener on the stage the following occurs.
For some weird reason IE triggers a Resize event at a point when stage width and height is still zero. And at init both width and height are also zero. These 2 resize events aren’t dispatched in for instance FireFox. So no problem there : )
To solve this IE problem (yes…just so you know that’s an IE problem) a resize eventListener has to be declared in the set preloader method (see sample below). Then a modification in the centerPreloader has to be made.
Jesse placed :
x = (stageWidth / 2) - (clip.width / 2);
y = (stageHeight / 2) - (clip.height / 2);
instead use the following:
x = (stage.stageWidth / 2) - (clip.width / 2);
y = (stage.stageHeight / 2) - (clip.height / 2);
And there you go…now it works fine, even in IE : )
Sample - Source
Posted in Actionscript 3.0, Components, Did you know?, Flex |
5 Comments »
May 14th, 2007 by
Jaap Kooiker
I’m sorry to say the above out loud, but I just have to.
Personally I don’t like the standard flash components. Why? They are heavy and mostly unusable because we use flash to build custom interfaces and the standard components aren’t made to be custom easily. Take for instance a button and try to make a fade between off state and on state. Anyway, once in every couple of years I grab a component (as with the FLVPlayback in an earlier post) and start playing with it. The conclusion: I always get a little disappointed.
I know, I know, in a moment I’m going to tell you what I want, keep reading
Now with Flash CS3 Adobe has thrown away the one component that could be of any use and that’s the accordion component. Well that said…. I still think the components set shipped with Flash CS3 is wrong. I have my own custom AS2 components which do exactly what I want, when I want. I name a few: Button, DropDown, Accordion, List, Pane (which is Box in Flex), Scroll, Pager, and so on…. You noticed something? There are similarities in the standard Flash components set and mine! But I still (and many others out there) create my own, mine are very customizable and do exactly what I want. So for me the flash components are obsolete and ready to be thrown overboard.
So, what do I want…
…the basic, but apparently unappealing (I mean not selling) layout components (which are shipped with Adobe Flex Builder). I think these would be helpful. I know these would be heavy to, but at least they are usefull and I will use them. The layout components could have sober functionality and they probably do what I want anyway, layout other displayObjects. The great thing is that skinning is not needed. Though the components have to be somewhat extendable, like in Adobe Flex. A few important components I’d like to see in the standard Flash Components Library: Container, Box, VBox, HBox. Devider… So Adobe, if you please could make these suitable for flash (or tell me why they can’t, please), I would be a happy man. For now I will just create my own layout components…again.
Jaap Kooiker
EDIT
Here’s a button sample in reaction to Serge (my component isn’t in the swf because currently I don’t have them at home, but I tried to make it clear what I want: fading, state transition, etc.)
EDIT EDIT
I had comment from some people who worked in this branche for a long time now and which I respect. One day I hope to be one of them….
For now, there isn’t anyone saying this is a good idea, isn’t there enough information (maybe sitting around a table with a few guru’s and me helps :)). Or is it nearly impossible to create good layout “components”?
Posted in Actionscript 2.0, Actionscript 3.0, Components, Did you know?, Flash 8, Flash CS3, Flex, Interaction Design |
10 Comments »