Flex – (MacOs like) DockBar component

actionscript 3, Components, Flex

Some week ago for a project I was looking for a flex dockbar component. I found some but, the missing and most requested feature from users (and me too) was the ability to add items to the dockbar simply adding a mxml node so that click and rollover handlers, data bindings etc. could be easily implemented:


   
   

I could not find anything similar, so I wrote this component.

I did zillions of experiments like this in the past, but I tried to do it easy to set up, and tried to use the less code possible.
I found suprisingly easy to build it upon the HBox and Image components. Maybe not the most sofisticated implementation but so damn simple…

With some good ideas flex can be really easy to code.

See it moving (just move the mouse to the last 20px on the bottom):

Example #1 – Basic implementation
Example #2 – Basic implementation applied to a ViewStack
Example #3 – Tooltip, handcursor, rollover effects etc.

I need a component to place at the bottom of the screen so I hardcoded some params to place it but can be very easily tweaked.

Every example has view source enabled so just right click on it to view the code.

Here’s the code from example #1:


		
		
		
			
			
			
			
			
			
			
		
	

Do not remove the menuLabel and the activationArea elements. They was coded inside the actionscript of the component but then I moved them out to the mxml to make them easier to customize.

The activation area is the area to rollOver for the component to be opened (here 20px high… maybe 30 or 40 would be more confortable). The height of the dockbar instead is 100px and is the area to rollOut to make the component close.
Other parameters such minSize and maxSize are quite self-explanatory and limits the size of the icons.

The icons are embedded clips from a swf file. The registration point of the icons must be at the bottom-center.

Ths icons sizes are calculated based on horizontal and vertical distance. Many values are still hardcoded but could be easily parametrized.

You can try changing the backgroundColor and backgroundAlpha of the dockBar and the activation area to better understand how does it work.

Just leave a comment if you like it.
Bye

18 Comments

Back (in #000000)

Adobe, Uncategorized

This morning I delievered the final release of one of the biggest project recently worked to… and my first flex application!

Oh yeah I started with a big ass project and spent two incredibly heavy months arguing with flex (and his bugs.. mostly design ones), but learned a lot.

The project is a new full comprehensive English language course developed for DeAgostini Editore which will be shipped on DVD-Rom in libraries and newspaper shops.

This was the full remaking of my last “language course framework/engine” which was built during years starting in 2004 in “oop” as1. On this engine many CD/DVD language courses have been produced and often with really little time for the customization.

After many years it started to feel very old (once you try as3 and flex everything previous seemed old) and really not solid so we decided to rebuild everything from scratch.

Playing with Flex has been a great experience. I liked a lot many things and hated many others of it, but love surely wins.

The coolest thing personally are not components or mxml itself but (Insert love smilies here) containers. A great part of the project was as3 assembled, but having those awesome hbox, vbox, tile, canvas etc. with auto-appearing scrollbars and fully skinnable via css really helped a lot.

I am sure I will have a little more time now to come back to my experiments, and from today… with Astro (Flash player 10) out in beta I am sure it will me more and more fun!

p.s.: Why in the world previous beta of Hydra toolkit worked perfectly with my ATI Radeon X800 XL @300fps while now that changed name in PixelBender my videocard isn’t supported?
I just tought it was not on the list and so i tried to install the toolkit but a big red alert message clearly says that every filter will be run only by CPU (@0.5fps…).

X800 will not be the most recent graphic card in the world (and I was already planning to buy a new one next week) but I think that Adobe should (and could) really extend the supported vga list before the final release. Maybe it’s already planned but found no mention about it.

Le’ts really hope they will extend this list or will be quite a difficult and risky choice to use advanced filters for commercial project.

See you soon on this pages.

2 Comments

Oaxoa Blog now Gravatar enabled

general, Gravatar

I just uploaded a Gravatar plugin to this blog and it works :) .

A Gravatar is a Globally-Recognized-Avatar… It means that you just need to register to the Gravatar service and once you uploaded a picture of you.. it will be globally appearing on every gravatar-enabled blog.

But the coolest thing is the simple gravatar API (well more than an API it’s just a formatted request).

I am preparing a really cool experiment about Gravatars… however it’s 1.20 here now and tomorrow will be a heavy day :P , so I need some sleep. Please just be patient and check back in a few days (maybe tomorrow).

3 Comments

Actionscript 3 – Fun with 3D Particles

3D, actionscript 3, Math, morphing, Particles

Hi there, some time since I last posted a technical post so here we are.

Brief

I was experimenting with some simple 3d formulas and this is the result…
1200 particles morphing in 3D space.
Added an interactive camera to start having fun.

Usage

Simply move your mouse up/down to move camera forward/backward and left/right for strafing.
Perss SPACE bar to cycle particle conformation between four different shapes.

For better experience move forward and backward while particles are morphing…
Following the morph from behind while moving very fast feel very gratifing for me :)

Performances

On my old CPU it performs @31fps and neither takes the cpu at 100%
No z-sorting here, just fun. I am not trying to build a real 3d engine… and no class for now, just some procedural code, but I am sure my cool readers will not have problems wrapping it inside a class definition if needed. Also this site’s loading time is quite slow lately, to enhance it I might move into small business hosting in the future.

Caurina Tweener needed.

3dparticles.gif
Experience the demo

And here come the code! Simply past it in the first frame actions of a new fla.

Continue Reading »

19 Comments

Easter cleaning – WP update, new theme and bye bye nofollow

general, nofollow

I just updated WP to the latest release, installed a new theme (Dilecto was very cool but too fancy for my flavour) and installed a nofollow-remover plugin.

New theme:

This new templates name is “Not so Fresh” and you can find more info at the bottm of the page. It’s still far from waht I want but is much cleaner than the previous and I am still to busy/lasy to customize it or do my own. I work on too many sites and css designs to have some time to do my own.
As we say here in Italy the shoemaker walks with broken shoes…

Nofollow:

I personally admin every comment so there’s no chance that a spam comment could pass so why not give a little reward to my comments’ authors? I just installed NoFollow Free and from what I read in the features list is the best among the others.

It has many available settings. My settings will work in this way:
The nofollow attribute is removed from authors’ websites links but not from link in the comment text.
The attribute will be removed to author with more than 5 comments.

I am working on some cool experiments so stay tuned for more goodies.

Bye

3 Comments
« Older Posts
Newer Posts »