Wednesday, December 21, 2005

scrollRect : easy 'masking'

Before Flash 8, if you wanted to create a window with scrollable content, you'd have to mask the content. I always felt a little uncomfortable using this approach.
In Flash 8 you can use the new movieclip.scrollRect property.
There is an easy copy/paste example in the help files, but this is what it comes down to :

import flash.geom.Rectangle;
var container:MovieClip = mclip;
var window:Rectangle = new Rectangle(100, 0, 200, 40);
container.scrollRect = window;

mclip in this example is my 'content' movieclip in my scene. By using .scrollRect, mclip will be 'masked' according to the Rectangle properties.

Nice and clean...

Wednesday, December 14, 2005

Flash snow

I helped out a friend with her website, who wanted her site in a Christmas theme.
So i made some actionscript powered snow... i like the result very much.
Things like this are not so hard to make, but i guess it's the small details that make it nice.

Check it out here : http://www.gingerfantasies.nl/

Thursday, December 01, 2005

DateChooser as event Calendar

I was looking for a way to use an easy calendar in a project i'm working on.
I haven't found a direct way, but we do have the DateChooser available.

The DateChooser class allows you to specify "disabledRanges".
For normal use as a date chooser, this means the user cannot select a certain date or range of dates.
But if want to use this as an event calender, you can set all dates to disabled and only enable the event dates, resulting in a very acceptable event calendar!
When the user selects an enabled date (use a listener), you can display the events for that date.

Hope this little tip helps someone...

flash or no flash?

It's amazing, but i still hear the same arguments to not choose for flash when developing websites. The same arguments as i heard when we were at version 4 of the flash player!
Like these :

1. Backbutton functionality doesn't work.
2. You can't deeplink with a flash site.
3. You can't use the regular right mousebutton functionalities.
4. It's difficult to maintain.
5. Text looks like crap.
6. There is too much movement going on.
7. A plugin needs to be installed.
8. Google can't index you.
9. Scrollwheel functionality.
...

People who come with these arguments obviously are still in the previous century.

If you know what you're doing, you can develop a full flash site, with coverage of all of these arguments (except for the plugin requirement).

1. Backbutton.

Allthough still a little problematic, i got this to work just fine, using a simple script in javascript, combined with 4 lines of php.

2. Deeplinking.

Using anchor tags in your adress, with a little javascript, you can make deeplinking to work. I do have a problem with this in Firefox, where i have to disable the automatic changing of the browsers adress or the backbutton solution won't work. But i'm sure a solution will present itself. The underlying idea is solid.

3. Contect menu

From Flash player 7 and up you can change the contents of the right mouse button in flash to display any functionality you'd want to offer your users.

4. It's difficult to maintain.

Any site where you mix the presentation and data(information) layers, will become unmaintainable.
If you use xml for storing your data, or perhaps a combination php and mysql, you can seperate data from presentation, resulting in a very maintainable situation.

5 Text quality

One of my absolute favorite improvements of the new flash 8 player is it's quality of rendered text. I even prefer this quality over how my fonts look in Photoshop!
For me a reason to start developing for flash 8 immediatly!

6. There is too much movement going on.

This is such a strange argument. There is exactly as much movement as the developer has put in there! Maybe even by request of a client...
So it's up to yourself what you do and do not move! A good developer will try to find the right balance in this.

7. A plugin needs to be installed.

This one is true. But it doesn't seem to be that much of a problem. Since the flash 7 player pervasiveness got all the way up to 97 percent or so, we can use the flash 7 player to upgrade to the next version(s). Besides, most people know and trust Macromedia and will install the player.

8 Search engines.

If you seperate your content(data) from your presentation, by for instance using xml, you can make pages of this data that google can index. Then redirect users to your flash page, with the right deeplinking and voila! .........

9 Scrollwheel functionality.

For a while now you can monitor the mousewheel within flash. It's one line of javascript to communicate this activity to the browser.


I really felt like writing this down. Because if you do want to discredit my favorite technology, try to be up to date!
Flash for me is a lovely experience, not only with well designed sites, but for me personally also to develop in !

If you want to see some of these arguments discredited in an example, look at www.dylanfrancis.nl a flash 8 site with the backbutton functionality working, deeplinking working, etc... And just look at the quality of the fonts!

Monday, November 28, 2005

Flade: Flash dynamics engine. Open Source!

Sounds cool no? And it is!
I was looking around the net to find some sort of physics solution for a little experiment i am working on.
In this experiment i want a convincing collision detection / resolving on two "rounded rectangles".
Anyway, eventually i ran into Flade. After playing the demo's for a hour :) i downloaded the engine.
And i looked at the examples.
And i was realllly impressed with the work.



But i don't understand it! I do but i don't. The examples that come with the zip file he offers for download, are quite complex.
Big problem is lack of documentation. Something which the Author (Alec Cove) seems to be aware of.
The project is Open Source and needs interested qualified people to help this along, with documentation and examples... especially simple examples for simple souls like me.

Go ahead and at least look at the examples! Brilliant!

Friday, November 25, 2005

Why i do what i do and want to keep doing it

I came across this blog posting from Ivan Todorov:

Article: Macrodobe 8, Microsoft, the future of development, and why Flash programmers have higher IQ

It is a long article, but it describes precisely how i feel where the Web is going and the role of flash in that.
(according to Ivan, i would be a "Experience Developer" :)

In any case, i think i will bring this article to every job interview from now on!

Flash 8 Filters

I was playing around a little with filters in Flash, started with a simple light-grey square with rounded corners and ended up with this (see image)


I only used the standard filters like Dropshadow, Glow and Bevel.
I based all the colors on a fixed color-scheme, which means i can now easily deconstruct it and redo it in ActionScript... and then i can change the colors, sizes... etc on the run.

Just felt like mentioning this, because i like this way of working with flash.... make something visual then get ideas of how to implement them.
Usually too many ideas :)

Thursday, November 17, 2005

back to the Store/Site builder

Since a lot of people are waiting for me to get a workable version of the site builder and i am sort of finished with my last project (www.dylanfrancis.nl) it's time to get back to the builder.

So what is it going to be?

It will be a webcenter, for managing all kinds of things that the power and features of your server can provide. That includes a site or store. But also email (especially lists), bookmarks, managing media (mp3/avi/...)
But my first goal now is to handle the "your site part"
I realize that for a lot of people "your server" sound creepy. Like you have to know Linux or webservers...
The main idea behind the whole thing is simplicity and that applies also for installation, use, etc.
Installation will be : "copy some files to your server" ... and that'll be all!

I am still trying to get my head around all aspects of this project, and to make a kind of roadmap.

A workable version will be available from January.

If you're interested in this and/or feel like participating in this, drop me a line...

grtz!
asji

Tuesday, November 08, 2005

the loss of my mousewheel in Flash

One of few things that i dislike about a full flash site is the fact that i loose my mousewheel functionality as soon as the flash movie has focus (clicked on)
Today i made a little thingy that passes the scrollwheel functionality to the browser, using javascript.

Here's the code:

function _InitMouseWheel(){
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta)
{
getURL("javascript:window.scrollBy(0,"+-(delta*30)+");");
}
Mouse.addListener(mouseListener);
}

then somewhere in your code add :

_InitMouseWheel();

You only have to call it once (because of the listener...)

enjoy!

Monday, November 07, 2005

Flash and the Back button

In my quest to remove as much of the "flash deveations" from webstandards, i made a brandnew backbutton handler.
I did this before with the flash version of www.adje.nl (now offline), but now improved on it.
You can see it in action at : Martin's site

I'd appreciate it if you'd let me know if it doesn't work with your browser...

I am now trying to get deeplinking to work in combination with this. Not easy but i'm getting there...