Thursday, March 12, 2009

Flash Animation Player Fixed

Okay, apparently the original version I made only worked with large sets of images and on smaller sets it'd stutter and have problems. Sooo...I fixed...

animation_player.swf?v_spd=7&v_nbr=11&v_frm=jpg

Now, this version is ~slightly~ different, in that now the speed interval is controlled by a number between 1 and 12...it's not as precise as the original version, but I had to completely change the way it operated, relying now on frame level control where as the original was using setInterval and wound up tripping all over itself.

It should probably be noted that I've never had much luck with setInterval and I wonder if it's not a bug with ActionScript, as it doesn't seem to operate sequentially, or rather it'll trigger another interval before the first interval even has had a chance to finish running, which then leads to the program tripping all over itself. I have to tried to control it via the use of onLoad but that still doesn't seem to work very well.

Here's the original gif animation:
rockyfull.gif

Original size = 471k
JPG conversion = 158k

This new version is also slightly smaller, the original was 561 bytes, this new one is 494 bytes.

EDIT
----
One thing I need to add in, in addition to being able to use your own file names, is the ability to add in your own server domain destination, which would allow you to use the form on sites/servers that aren't your own, for example on Blogger.

Tuesday, March 10, 2009

Flash Animation Player Update

Okey dokey, it's been updated and the previous links will no longer work. Now you have to use:
animation_player.swf?v_spd=20&v_nbr=106&v_frm=jpg

The only difference is adding in the v_frm variable, which lets you specify what type of images you have.

Now, to make it all work you need a few things. First, you need to download the swf file on that link up there and then you need to plug it into your site wherever you want it like nyah:
<embed src='animation_player.swf?v_spd=20&v_nbr=106&v_frm=jpg' width='269' height='211'>

Then you need to name all your files in sequential order (starting with 1) like so:
image_1.jpg
image_2.jpg
image_3.jpg
image_4.jpg
...

You need to put in the width and height of your images (all images need to be the same size), put in the image format, put in the number of images you have to animate and then put in the speed (in milliseconds) that you want it to run. And viola!

It probably doesn't need mentioning, but you of course need the images to be in the same directory as the swf file.

Sunday, March 8, 2009

I Need Beta Testers

So, yesterday it just...suddenly popped in there...an epiphany of sorts. Usually when I go to bed I start thinking about different ideas and such and yesterday as I was going to bed I figured I should think of some web applications I could make with Flash...and then...

*POW!*

GIFS!

Animated GIFS!

...only, why should we be limited to the GIF format when there are others that are ~so~ much better...like PNG (with alpha transparencies)...and JPG, with its uber compression...hell since it's in Flash we can eve do JPGs with alpha transparencies!

But the problem of course is that not everyone can code in Flash and a lot of people wouldn't even know where to begin to try and setup such a beast...sooooo...I made a cookie cutter!

Right nyah:
animation_player.swf?v_spd=20&v_nbr=106

Now, this thing is simple, uber simple, STUPID simple, MAC LUSER simple. *nods*

All ya gotta do is plug in two values into the URL, the speed at which you want your animation to run...and the number of images you have in your animation, using nyah:
v_spd=20 - speed
v_nbr=106 - number of images

And then you just name all your images:
"image_1.png", "image_2.png", "image_3.png", etc in sequential order.

And that's it! Plug that into an embed tag on your site and viola! You can have animated JPGs and PNGs!

Of course, this is just a quick prototype I threw together so it has some quirks and kinks that need worked out. For example I've noticed if you use it on a browser that stalls out for one reason or another then it tends to fuck it all up and it won't reload itself properly. It also only supports JPGs right at the moment and it desperately needs a preloader for the images, otherwise it sorta re-cycles over itself until the images are all cached, which actually makes the initially loading a *LOT* slower than it'd be if I actually properly preloaded the images before throwing them into the setInterval function.

So anywho, I need people to test the little bugger out and tell me how it works, or how it doesn't work, or whatever other ideas or suggestions you have for the thing.

Thursday, March 5, 2009

I Am The Supreme Badass Extraordinaire!

Check this out:
www.backwater-productions.net/_video/video_player.swf?vid=mt_dew_hosed

www.backwater-productions.net/_video/video_player.swf?vid=elk_management
(you can use any SWF video in the directory)

Here's a live preview:


LOL, my new Flash video player. It's setup so that I only need just the ONE player and then I can dynamically load different videos into it by specifying the file name in the URL. I also used altered context menus and created my own built in "save as" function when you right click on the save button. It uses PHP in order to force the browser to save the SWF files rather than just opening them in a browser window, which is very handy.

And along the way I discovered a ~really~ horrific exploit:
www.backwater-productions.net/_video/dl.php?file=../index.php

You can't actually download it now, I threw in an extra script to detect teh file name extension, but without that extra script basically it would allow anyone direct access to *ANY* file on the server (so long as they knew the file name). And that would include PHP files server side containing user names and passwords! o_O

Needless to say, I'm quite glad I checked the damn thing before just throwing it out there. I wonder though how many other people might be using a variation of the code...probably not too many since it's sort of an advanced scripting usage (not necessarily in and of itself, but the functional intent would require someone to know as much PHP as Actionscript). Hopefully if anyone else is using a variant of the code they made sure to check its limits before hand.

I think for fun I'll add in the ability to custom skin the player via XML or CSS. Then I'll release it for free for public use.

I'm still not ~completely~ satisfied on its current look and the buttons aren't as of yet animated (in button like fashion). Those text boxes that show the video length and current video time are presently more of just an after thought, they aren't apart of the style at all, merely thrown in for the hell of it.

Oh, forgot to mention, unlike my older video players this one not only has play position tracking, but also has a seek controller as well, so you can easily move about within the video. It should work a lot better than the one YouTube is using, which frequently tries to snap to video key frames and often hangs for no real reason at all.

Another thing I should do if I make it skinable is to make it reconfigurable, in that I could set it up so that you could arrange the buttons however you like, change their size, whatever, all via the use of CSS or XML. Anywho, this is what I did today and it was quite fun.

Sunday, March 1, 2009

How To Draw Yiffy Art!

Best tutorial evar!



^__^

New Blog Video Player Concept

So I've been in need of a new video player for some time. The current one's controls are tiny, there's no position tracking or play time, no seeking and no download button on top of all that. Sooo...I've been idly coming up with some replacement ideas, such as nyah:


I really like that rounded/faded video edges look... mostly because I haven't ever seen anyone do it except for me (most likely because most Flash developers wouldn't even know how to do it even if they wanted to).

The overall style is a bit rough...I'm leaning more towards the boxish forms than the rounded with no border edge. I suppose I could leave it mixed like that...I dunno...I'll have to think about it. It could probably use some kind of speaker icon down there on the bottom of the volume control on the far right hand side. On the other hand though I could go for a more minalist look and leave it out, trusting that most people will have sense enough to figure it out on their own in two or three seconds.

Well, I'll have to give it some thought, but I figured I'd throw it on out here, if nothing else to remind all the Hatter Addicts that whilst they whine and snit, I continue to produce. ^__^