Saturday, April 10, 2010

This blog has moved


This blog is now located at http://rohanlatimer.blogspot.com/.
You will be automatically redirected in 30 seconds, or you may click here.

For feed subscribers, please update your feed subscriptions to
http://rohanlatimer.blogspot.com/feeds/posts/default.

Wednesday, January 20, 2010

blender texturing for collada/away3d

so i have a little project where i want to make a simple 3d model of a chair and bring it into flash. one of the textures will be able to be swapped in and out.

in order to do this, i will export from blender into the collada format. in away3d, i will then import it with the Collada Loader class.

here's how the blender bit can be done:


1. unwrap your model. simply press U and select unwrap

2. swap to the image window (shift f10)

3. with the faces selected that you wish to texture, go to image > open

4. load your image in and move it around until happy.

5. export to collada, file > export > COLLADA 1.4

6. you may need to edit the collada file image paths to be relative to the swf

Labels: , , ,

Wednesday, January 6, 2010

strange php/doctype bug

i was just spending the last few hours making a simple php template to use for websites when i came across a real strange bug. my template basically echos out the code for the document head, body and footer and inserts custom html in the middle somewhere.

now whenever i echoed out the head section with any doctype in it and any linebreaks, it put a space as the first character in the document, even though the source code was perfect.

i tried all kinds of str_replace on various hidden characters, \n, \r\n, \t etc. but to no avail. in the end i resorted to fixing it with css. i could have just had the entire head section on one line, but it bugged me and i wanted my template to spit out nice neat code.

anyways, will have the template up soon for all to download and use...

Labels: , , ,

Friday, October 30, 2009

WAMP password reminder

when phpmyadmin displays this error:

Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password

to change user password in wamp:

1. open phpmyadmin

2. click on privileges

3. click 'edit previelges' (little icon at the end) for user 'root'

4. scroll down to 'change password'. chuck in your password and hit 'Go'

5. repeat steps 3 and 4 for user 'localhost'

6. open your config.inc.php file from your wamp install directory. mine is c:/wamp/apps/phpmyadmin3.2.0.1/

7. find this line $cfg['Servers'][$i]['password'] and chuck your password here.

8. restart wamp and browsers ;]

Labels: , , ,

Thursday, October 29, 2009

Away3D basic demo

i was playing around with away3d for flash. I just wanted to create a simple 3D plane with a different MovieClip mapped to each side which both retained their interactivity.

demo here

i've bundled the source here in all platform friendly zip format (dunno about you but i'm getting tired i've getting source made by OSX archive that adds all the extra mac crap and makes me unzip every file on its own...)

anyways, source is in CS3 and uses Away3d 2.4

download here

Labels: , ,

Friday, October 9, 2009

more facebook flash fun

ok so found out today that you are not allowed to give the user insentive to add an app to their profile in order to access a differnt part of your app. i was trying to detect if they had installed the app, however the FBML else tag is not available for the tag meaning you can detect if they haven't added it, you just can't do anything about it...

my way around it was to have a link in the profile app which passed a variable for which page to go to via GET. more soon...

Labels: , , ,

Thursday, October 8, 2009

facebook app + flash = hmmmm

well i've started building a facebook app that's flash based and jumped head on into the Facebook AS3 API. there's likely going to be a lot of posts about this as i found out new things.

so far i've been able to embed a flash movie into the canvas page with the FBML tag. i've then got that to add a smaller flash app onto the user's profile page.

it's been tough finding out how to do all this stuff as the facebook docs are huge but not very well organised, at the end i might even write a tutorial about it.

here's somethings which i discovered that should have been very clearly mentioned in the getting started docs:

- you cannot get a vistor's user id (and therfore info) from a profile app. i was wanting to create an app that has a different state for the owner and a different one for a visitor, unfortunately it's not easy, if even possible at all.

- the 'add to profile' button as far as i have discovered cannot be edited or incorporated into a flash app so it just has to sit on the outside of the flash app on the canvas page

will list more issues as i find em. if you have any questions, email me and i'll give ya a hand.

Labels: , ,