Archive for category Uncategorized

Using filters in Away3D

I’m working on my first project using Away3D and am stumbling on some basic issues. I was trying to use a blurfilter on objects with no result whatsoever. Until I found an example written by tartiflop that gave the answer: use the property ‘ownCanvas’.

Like:

 var topPlane:Plane = new Plane({ownCanvas:true});
 topPlane.filters.push(new BlurFilter(8, 8));

No Comments

Cannot change general setup of MySql Eventum

I installed the issue and bug tracking system Eventum. This is an open source system that is both made and used by the MySql team. During installation, I didn’t configure the smtp settings correctly and couldn’t find a way to reconfigure this. The installation guide mentions the path ‘Administration/General Setup’, but I couldn’t find the General Setup option. After googling around, I only found a spanish post about this issue:

http://gacimartin.com/2008/07/20/como-ver-las-opciones-de-superusuario-de-eventum-smtp-etc/

If you don’t read Spanish, this is a summary of the problem and the solution:

Apparently, it sometimes happens that your account is not registered as an ‘Admin’ account. You have find the id of your user account in the table ‘user’. Then find the corresponding row in the table ‘project_user” and set the field ‘pru_role’ to ‘7′.

No Comments

Canvas with an easing scrollbar

Unfortunately, Flex does not contain a container class with an easing scrollbar. I mean a scrollbar that will give you an ‘organic’ or ‘physical’ feeling. This is often implemented with an effect that causes the container content to gradually stop scrolling after you have stopped dragging the scroll thumb. Compare it with how you scroll through a list in for example an iPhone.

I superficially read some articles on how people implemented their version. I didn’t find a ready to use component, so I decided to make one myself as a challenge.

My component behaves like a Canvas with an HScrollBar and the idea is really simple:
There is an inner Canvas and an outer Canvas. The inner Canvas contains the content you want to scroll. The HScrollBar of the inner Canvas is hidden. The outer Canvas creates a proxy HScrollBar and positions this over the hidden HScrollBar. Now the user interacts with the proxy HScrollBar and each change is copied to the HScrollBar of the inner Canvas. And the trick now is to use an easing function when you copy the proxy Scroll thumb position to the hidden Scroll thumb position.

Here you see both HScrollBars on top of each other. The upper HScrollBar is the original scrollbar of the inner Canvas. The lower HScrollBar is the proxy version.

Get Adobe Flash player

And if we hide the upper HScrollBar and shift the lower HScrollBar upwards to take its place, we get this:

Get Adobe Flash player

While the principle seems to work, the feeling is not perfect. It’s not as nice as it is on an iPhone. So I’ll have to work on that.

Furthermore, I want to combine two behaviours:

  • Slow scrolling with a behaviour almost without easing
  • Stepwise/fast scrolling with a strong apparent easing

I’ll continue working on this and post improvements.

No Comments

Use syntax highlighting in WordPress

I spent more than an hour to find out how you can use syntax highlighting in WordPress. There’s tons of information around this subject, but I couldn’t find anything to get you started with a few easy steps. So….here is my attempt.

Step 1:
Install Syntax Highlighter Evolved.

Step 2:

Create or edit a post and select the ‘HTML’ tab on the top right.

Step 3. Copy your source code from your html-editor and paste into the post.

Step 4. Put code tags around the pasted code:

No Comments