Archive for the ‘software’ Category

in bed with … [EMBED]

Monday, July 26th, 2010

Using flash develop or FDT and sick of going back to CS4/5 just to create some swc’s that you might have to change everytime you update any of the assets? So 2000 and something…

Use embeds!

I started using a generic static class to add all my embeds for a project and then you can easily draw them from there.

The static class:

public class HomePageAssets {

[Embed(source="../../../bin-debug/assets/loader/bar.png")]
public static var BrandBar : Class;

[Embed(source="../../../bin-debug/assets/loader/dude_again.png")]
public static var DudeAgain : Class;

[Embed(source="../../../bin-debug/assets/loader/logoType.png")]
public static var LogoType : Class;

...

And in any class:

addChild(new HomePageAssets[myAssetVar]);      // e.g. "BrandBar"

Njoy!

AS3 – VO thoughts on…

Friday, July 23rd, 2010

I started to use static VOs in my framework and having fun doing so.For those who dont know what a VO is, its a ValueObject.As a friend recommended I am using them solely as static classes, meaning I dont create an instance, which should keep memory leakage down and make them available globally.

So far I am using two types as I would describe them:

1) property based: where I defined property get-setters for everything I want to store (mainly strings) some even constants, so a very non-depth storage object

2) list based: where I need a storage for many of the same kind of objects and search functionality and add and delete function basically this is a searchable fancy array which is static and therefore available everywhere. Neat.

I like the simplicity of those classes. They are framework, nearly language independent or sorts. Now if anyone out there knows how secure it is to have global code flying about , please comment.

Hackintosh: Dell Mini 10v and Snow Leopard

Sunday, May 30th, 2010

Is now easier than ever.

Get the main install start here at Gizmodo. But you will have to do a bit more just to polish a few things:

Swapping keys:

You will notice that the Apple command(windows logo) and the alt key are swapped in terms of functionality. Just go to the keyboard settings in system prefs and click on Modifier keys at the bottom of the page.

Repair Disk Permissions:

- do this after install, to increase performance and to check everything is in order.

I had an odd permission setting going on where I had to set my account as admin on the main partition otherwise it gave me read-only permissions.

Non-functional Fxx keys:

Use the Fn key in combination and you will have that working. Easier than any other solution, which might disable your brightness and volume.

Touchpad:

You will have to setup the touchpad in the best possible way. The buttons on the pad are a pain to use, so I set the left and right mouse button to be single and two-fingered taps on the pad. This will make your work life much easier.

There you go, much better, no?

AS3: Beware 4294967295

Monday, March 22nd, 2010

An easy one to miss and get accustomed to is catching the number 4294967295 on a decreasing for…loop.

That is, if you use uint, which I like doing when using for…loops. Yet if you use uint instead of int and do your loop i–, you might find yourself confronted with i=4294967295. What happens here is, that uint ranges from 0 to 4294967295, meaning if you go 0–, it will go round to 4294967295. Good to know if you want a loop like that, but rather creating unexpected effects in most scenarios.

So if you use a for…loop with i–, use var i:int !!!!

FDT – sandbox error (load xml, etc.)

Monday, February 15th, 2010

Solved: It took me a fair while to find anything on this that actually worked and the Flash Player Trust directory kept on popping up.

One will have to check the latest Flash Player security paper.

For Flash Player 9 you can find it here.
And you want to look for information on the: Global Flash Player Trust directory

On mac it is located at: /Library/Application Support/Macromedia/FlashPlayerTrust/

In there you can simply create a file with the suffix .cfg, which the Flash Player checks every time it starts up and plays an swf.

If the file or folder path is in that file, it is trusted and doesn’t throw sandbox errors anymore. In the above case, I haven’t tested if it’s the swf or the xml that Flash has to trust, but in my case they are both somewhere beyond the folder I added in the file (/Users/marcuskirsch/Documents/–JOBS/0064SCMI/201006AntennaFuture/DEV).

I named my file : fdtTrust.cfg

That means everything inside the DEV folder is kosher.

This one works for me and player 9 on Snow Leopard and FDT 3.5 enterprise, I haven’t checked on player 10 which might have all that in an Adobe folder rather than Macromedia(not sure about this), I guess the security paper on 10 will mention it.

UPDATE:
after wrestling with more than 3 other machines it seems I tried lots of things and missed the working one.
Here is the one that worked on my last machine:
set your workspace to trusted at this website:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
That should render it nicely.

Hope that helped you guys.

FDT – rendering for standalone applications

Monday, February 15th, 2010

First: Have you installed all the flash debug players you want?

google: download flash debug player and you will get a list of players (standalone, plug-in) at Adobe that you can download for your OS. also here

How to install into FDT:

After downloading and installing the latest debug flash player from Adobe, tell FDT where it is by opening FDT and change the Preferences at:

Preferences > FDT > Tools > Flash Player

Browse to the player in the Flash folder or wherever you have placed your Flash Player.app(mac)

Reset your Debug or Run settings so that they use Adobe Flash Player.

This should get you started playing the swf in the Adobe Player.

Now this will still result in sandbox problem if you want to load xml files, etc. locally.

If you want to fix this, look up this blog entry.

FDT – shortcuts

Friday, February 12th, 2010

nice little list I found:

Mac Win Name Type Context
CMD+1 CTRL+1 Quick Fix Generating Code If Error exists
CTRL+Space CTRL+Space Auto Completion Generating Code Editing Code
F2 F2 Show Class/Interface in Flash Explorer Navigation Editing Code
F3 F3 Open Declaration Navigation Cursor over Type, Property, Function
F4 F4 Show Type Declaration Navigation Cursor over variable
CMD+T CTRL+T Quick Type Hierarchy Navigation Cursor over Type or Function
CMD+O CTRL+O Quick Outline Navigation Editing Code
CMD+7 CTRL+7 Toggle Comment Code Editing Editing Code
CMD+U CTRL+U Quick Type Dependency Navigation Editing Code
CMD+SHIFT+T CTRL+SHIFT+T Open Type Navigation Editing Code
CMD+R CTRL+R Find References Search Cursor over Type, Function, Property
CTRL+H CTRL+H Search in multiple Files Search Editing Code
CMD+D CTRL+D Delete Line Code Editing Editing Code
CMD+M CTRL+M Maximize/Minimize View Perspective Editing Code
CMD+L CTRL+L Go To Line Navigation Editing Code
CMD+0 CTRL+0 Quick Trace Code Generation Cursor over Property
CMD+SHIFT+F CTRL+SHIFT+F Format Code Formatting Editing Code
ALT+SHIFT+R ALT+SHIFT+R Rename Refactoring Editing Code
CMD+SHIFT+O CTRL+SHIFT+O Organize Imports Generating Code Editing Code

FDT – SVN: connecting your project to a repository

Wednesday, February 10th, 2010

Now I am just new to all this, yet been through the process enough to see that there are a few things here and there that appear a bit complicated whilst trying to achieve hooking up your project to SVN reposis. Here is my list, step-by-step, I hope it will help some of you.

Original setup: FDT 3 on macbook pro, snow leopard, with a CVSDude/Codesion account.

CVSDude/Codesion:

- set up an account for our project. there is plenty of discussion on having multiple projects per repository, I so far tend to separate them to have a single on for each project.

- add the subversion service (New)

- add a user or group with the appropriate privileges to the project under the ‘People’ section. If you are the admin of your subversion account, your name will already be added as default.

- copy the URL in the service list under Project Quickview next to Subversion

FDT

- in FDT go to the View/Perspective icon (top right) and if not already in the list, click on Other… and choose the SVN Repository Exploring perspective

- go to the window on the SVN Repositories window and right-click to add a New repository location

- paste your project Subversion URL into the URL field, enter your username and password in Authentication, click finish.

Now for some reason, sometimes the pasting adds the URL twice in two lines and you will receive an error. Just repeat the process above, choose the faulty URL from the dropdown this time and delete the additional URL from the textfield and connect again, it should let you in this time.

- add a ‘trunk’ and ‘tags’ folder to your repository, they will automatically recognized as special folders

- Go to the Flash FDT perspective

- create a Flash project

- Go to Team >Share Project

- Choose the project repository you ant to use for this project

- On the Specify Location screen in Simple Mode browse to the repository’s trunk to choose as location

- Finish

- On the first commit screen, tick off all files, that you don’t want to version control. E.g. for simplicity reasons, don’t commit anything with a ‘.’ in it’s name (e.g.  .settings).

- After this first commit, go to all your files and folders that you want to snv:ignore for the future. Right-click > Team > Add to svn:ignore   Most likely all not-dealt-with files will have a small question mark on them. After you set them to ignore, it will dissappear.

- Add a ‘lib’ folder to your flash project structure, it’s the place I put my swc’s. Right-click >Source Folder>Add to ClassPath  and it will show the appropriate icon.

- commit the ‘lib’ folder by right-click>Team>Commit

- to finalize, Team>Update the whole flash project

- Now you can add other flash files by dragging them onto your src or lib folder and dont forget you Main.as, which I tend to place outside the src folder by creating a new class file and copy pasting or writing whatever needs to go in there. Most other existing class files can be added by drag drop on ‘src’

- Done

Hope that helped.

!!! Important: if you like to drag and drop your code files into a new flash project and youhave been using them in another subversed project be careful! SVN puts little hidden svn files in every folder. Use TinkerTool or something similar to show hidden files on your system and clean all those up otherwise they will mess with the SVN.

Clay Shirky on failing to recognize user potential

Tuesday, December 1st, 2009

Clay Shirky compares two social media/ data based community projects and explains in a fairly simple manner how creative subversion makes tools/projects successful.

via watch it at Fora.tv (about 10 min)

Council, 4th December, Brussels

Monday, November 30th, 2009

zen_tiot_logo

Council, the international thinktank/network of excellence that I am a proud member of gets me talking about location, my article for glass magazine and some of my projects. Wish me luck…

http://www.theinternetofthings.eu/