Have to find the correct version of that logo to add to flash, but don’t want to load them all in the unbelievably slow preview app, or bother loading up Illustrator only to find out the designer sent you a photoshop eps without vector data? Sorry I’m venting a bit, but this plugin really saves me time—and it’s free. EPS Quicklook Plugin
There’s actually a whole bunch of other plugins that are helpful too (beware: the zip one is pretty slow though). List of Quick Look Plugins for Leopard
I don’t know where the capitalization came from, but it’s such a simple API for anyone who’s happy with AS3 (is there anyone who isn’t?) that FIVe3D worth the challenging finger-work. I made this demo in about 3 hours total, it draws bitmaps, and adds them to Sprite3Ds, and mimicks what we’ve been working on for 2 months in Papervision3D (I’ll definitly have a link to that when its fully launched).
For a great many simpler 3D applications, I think FIVe3D is the way-to-go, but Papervision3D still does have an edge in speed (when properly optimized that is) if dealing with more then 20 or so planes.
One quirk of FIVe3D that I initially didn’t get, was that the order of my addChild statements determines what shows up on top of what, not the Z value of the sprite, so included with this source is a handy depth sorter loop, that will work with any 53D setup.
Also modified it a little so that height and width could be stored in the sprite3D class, i know bad me, but until i get my head around Mathieu’s version of Matrix3D. That ugly blinking plane on the right side is actually a series of bitmapDatas, that are playing back (like cached animation) that I learned from John Grden a few weeks ago. I’m working on my own version of a class to automatically create bmp animations from a timeline swf, unless his goes open source…
Finally had an excuse to make some connected springs, ala the Visual Thesaurus. This was the last of the tests before realizing that the project would be simpler.
Double-click a dot to add a child dot, or click and drag any dot to move it.
Some code will be on the way in a bit.
Update
Last edited by nilloc on Wednesday, April 1, 2009
Oh yeah, this is kinda late (my how the last 7 months flew by), but here’s the actual project in action: Lil’ Wayne’s World
Sorry it has been so long since my last post. I doubt anyone is reading this anyways. In this article i’m going to attempt to show you what you need to know in order to upload a file (music in this case) into your rails application and safely tuck it away on amazons simple storage solution. I realize this is a very specific application. However, it took me two days to get this working properly so I figured i’d share what I did in order to get this working. I’m assuming you are using rails 2.1 (but that may not be required) and have already created your application. if not you can create and application by issuing the typical rails application_nam command
If you are just planning to upload file to S3 and do not need to manipulate them else do anything to them before they end up on the server. Then I suggest you just use the plugin.
No simple way to manipulate the file or extract data from it before sending to S3
So now that we are going to perform this operation manually there are a few things you will need for this example. You will need to install the mp3info gem as root at command prompt. gem install mp3info gem install aws-s3
Say yes to any dependencies once those two gems successfully install you will have to restart your webserver and they will be ready to use in your application
I’m going to skip over a lot here because I don’t know how you want to configure your application however the steps are pretty simple create some scaffold. Make an upload form.
and then save the data. I’m only going to show you the model code. I believe everything is self explanatory from there. I will be happy to field any questions if anyone cares to ask. Enought chit chat show me the code
require"ftools"require"aws/s3"require"mp3info"class Song <ActiveRecord::BaseincludeAWS::S3
belongs_to :user
has_one :song_metadata
before_validation :set_all_meta_data
after_save :write_file
after_destroy :delete_file
before_create :connect_to_amazon
validates_inclusion_of :mime_type, :in=>%w( audio/mpeg audio/mpg ), :message=>"The file you uploaded is not an mp3"
validates_inclusion_of :file_size, :in=>300.kilobytes..20.megabytes, :message=>"must be between 300k and 20mb"
attr_accessor :id3tagsdef song=(file_data)@file_data = file_data
enddef write_file
buckets = Service.buckets
bucketexists=false
buckets.eachdo|bucket|if bucket.name == AppConfig.ec2["bucket"]
bucketexists=trueendendif !bucketexists
Bucket.create(AppConfig.ec2["bucket"])end@file_data.rewindif !S3Object.exists? get_file_url, AppConfig.ec2["bucket"]
createsong_meta
S3Object.store(get_file_url, @file_data.read, AppConfig.ec2["bucket"],:access =>:public_read)endenddef createsong_meta
m = SongMetadata.newself.song_metadata = m
if id3tags.title
m.title = id3tags.titleelse
m.title = "No song name set"endif id3tags.artist
m.artist = id3tags.artistelse
m.artist = "No artist name set"endif id3tags.album
m.album = id3tags.albumelse
m.album = "No album name set"end
m.year = id3tags.year
m.track_number= id3tags.tracknum
m.save!
enddef get_song
self.connect_to_amazon
S3Object.value mp3_url, AppConfig.ec2["bucket"]enddef delete_file
self.connect_to_amazon
S3Object.delete mp3_url, AppConfig.ec2["bucket"]enddef set_all_meta_data
if@file_data!=""&&@file_data@file_data.rewindself.mime_type = @file_data.content_typeifself.mime_type == "audio/mpg"||self.mime_type=="audio/mpeg"
tmplocal = "#{RAILS_ROOT}/tmp/musicfiles"
tmpname = "#{Time.now}-#{@file_data.original_filename}"File.makedirs(tmplocal)File.open("#{tmplocal}/#{tmpname}", "w"){|file| file.write(@file_data.read)}
mymp3 = Mp3Info.open("#{tmplocal}/#{tmpname}")self.id3tags = mymp3.tagself.bitrate = mymp3.bitrateself.samplerate = mymp3.samplerateself.samplerate = mymp3.samplerateself.mpeg_version= mymp3.mpeg_versionself.layer = mymp3.layerself.length = mymp3.lengthself.file_size = @file_data.size
mymp3.closeFile.delete("#{tmplocal}/#{tmpname}")self.mp3_url = get_file_url
endendenddef get_file_url
"#{user_id}/xrays/#{id}/song/#{@file_data.original_filename}"enddef connect_to_amazon
Base.establish_connection!(:access_key_id=> AppConfig.ec2["access_key"], :secret_access_key=> AppConfig.ec2["secret_key"])endend
That is really the meat and potatoes. It is all hanging out in the model nicely tucked away. getting the data out of S3 is simple and is left as an exercise for the reader. Obviously you need to insert your own access_key and secret key. I’m not making any assumptions about the configuration of your application and thus this is entirely us to you the reader as well. Hope this helps someone..
So we’ve been developing in Flex 3 for the last 3 months now, and I’m wondering why I didn’t switch earlier… Anyway a small annoyance that bothered me for the first couple weeks was the inability to double click any files that needed to be edited outside of Flex. It just throws this weird error:
Unable to open external editor…
(com.adobe.flexbuilder.ui.osx_3.0.194161) Sort of more about the error here…
With a little research it seems that this is a problem with the System Editor settings with Eclipse itself (which Flex Builder is based, for the noobs like I me).
So taking a bit of a shot in the dark I looked through com.adobe.flexbuilder.ui.osx_3.0.194161, and it didn’t seem to have anything other then commands to open system editable? files. So just deleted the package from the plugins folder (actually i moved it to a plugins-disabled folder in the main Flex directory), and holy crap it worked!
So far I and my co-developer Sean, and our intern Derek haven’t come across any other errors, or changes in performance, just the unfettered ability to double-click FLAs and watch them load in Flash.
Give it a try and lemme know if your results vary. Though I suppose you should be doing so at your own risk…