I’m currently in the middle of building quite a large content management system in AS3, and I’ve come to the part of working in a decent file manager - so far it can upload, rename, delete and preview (only images) at this moment, but I need to add other things - a downloader, and a thumbnailer, which I’ve spent the last two days doing, anyway - I was looking into how to improve the preview system I have in place… it would be nice for the system to automatically detect what kind of file I’m looking at and decide what the correct way to preview it would be. To do this I need to have flash look at the extension each file has and take it from there - anyway here a little bit of code that’ll remove the extension…
function extractFileType(file:String):String {
var extensionIndex:Number = file.lastIndexOf(".");
if (extensionIndex == -1) {
//No extension
return "";
} else {
return file.substr(extensionIndex + 1,file.length);
}
}
trace(extractFileType("file.jpeg");
And here’s a sneak peek of the thumbnailer - apologies about the photograph - I’ve there’s enough demand I might clean the code up a bit and release it on here…
And here is a glimpse of the editor and file manager - It’s so beta I haven’t even got round to labeling the buttons!
August 10, 2008 at 8:14 am · Filed under Finds, Random
I need to get round to putting some more stuff up on here, been so busy recently… I’ve got an as2 xml/php admin I want to release but I’m still trying to find time to iron out the bugs… If anyone wants to look over it for me send me an email…
July 3, 2008 at 7:32 am · Filed under Finds, Random
Don’t ask me why I was on the microsoft site… I know, I’m ashamed. But what the feck is this all about? Going a bit far don’t ya think ?
EDIT: Just looked back over the picture - just to clarify; it’s not the word ‘eliminate’ that I’m pointing out, it’s the over-dramatisation of the sentence used.
Made my first class - quite excited about it really! Anyway, it started out as a need to get round the fact that flash can’t use scale9 movieclips as masks, which means we can’t get any nice rounded edge masked tweens, so I wrote this to get round it. In the end it turned out really nice, and I thought I’d share it with everybody; it’s going to kick ass for building interfaces - anyway if anyone uses it gimme a shout..
This weblog is a personal compendium of 22 year old Graphic Designer Liam J Rutherford, currently residing in Glasgow, Scotland. He may be referred to as what is commonly known as a geek.