News for hackers. Stuff that matters.
Re:Ha Do That in HTML5 by jdietrich on Wednesday September 08, 2010 @12:20PM (#1672334)
Will the flash button gracefully degrade if I have an obsolete version of Flash Player, or I use a flash blocker? Can an African schoolkid see it on their OLPC XO? Can a blind person read it with their screen reader or braille terminal? Can I select it using a keyboard or an accessible input device? Can I restyle it in the browser, so it's clear enough for my grandma to read through her cataracts and big enough for her to click on despite her arthritis?

Every time you use Flash, you're insulting the dignity of the elderly, the disabled and any number of others. You're saying to users "if you're not a healthy young person on a modern computer with a fast connection, you're a second-class citizen". We shouldn't tolerate it, and in many countries the law doesn't allow us to.

HTML works because it works for everyone, not just a fortunate few. This isn't about technology, it's a civil rights issue. No matter how hard Adobe try, Flash accessibility is massively inferior to HTML accessibility. They should be ashamed that they took so long to even begin to address the needs of disabled users and developers using their products should be ashamed for not using the open, standards-compliant, accessible alternative.

Re:Ha Do That in HTML5 by jbail on Wednesday September 08, 2010 @10:45AM (#1671978)
You can do that in HTML5. You could use CSS3 with animated gifs/pngs --- or go straight to the canvas. Either way would get it done. I'd vote for using canvas.

I'll leave it to someone else to implement. I've got real applications to build today...

Re:Ha Do That in HTML5 by hnal943 on Wednesday September 08, 2010 @10:32AM (#1671938)
So... the point is that HTML5 can't make annoying buttons with poor usability?
Re:Ha Do That in HTML5 by peti on Wednesday September 08, 2010 @11:24AM (#1672110)
Annoying? Poor usability? It looks like a button, reacts on mouseovers, and would totally fit in some game's website. Besides, it is not the point here.
Re:Ha Do That in HTML5 by rimantas on Wednesday September 08, 2010 @11:36AM (#1672160)
…takes 41KB, and does not work on systems without Flash installed.
Re:Ha Do That in HTML5 by Yzupnick on Wednesday September 08, 2010 @11:47AM (#1672203)
What is his point? Flash rules HTML5 drools? Who cares. If a developer wants to use Flash then he can use Flash. If he doesn't, then he won't.
Re:Ha Do That in HTML5 by jordan0day on Wednesday September 08, 2010 @01:29PM (#1672600)
My thoughts too. While that might be a silly button to have for many sites, it looks like something I've seen in more than one video game menu. So, it's not without merit.
Re:Ha Do That in HTML5 by psadauskas on Wednesday September 08, 2010 @10:57AM (#1672022)
No, I don't believe I will. I'd rather my users know the button is a button, and will behave like they expect, all without taking up 50% of my CPU...

(Aside: I went back to the page to double-check CPU usage, and the button wasn't working this time. Yup, behold the awesome power of flash!)

Re:Ha Do That in HTML5 by confuzatron on Wednesday September 08, 2010 @11:06AM (#1672054)
Moving over this button resulted in no perceptible CPU impact on my machine (crazy fool).
Re:Ha Do That in HTML5 by White_N_Nerdy on Wednesday September 08, 2010 @11:43AM (#1672183)
I have seen many HTML5 demos that have taken up 50% or more of my CPU. So, what's the difference?
Re:Ha Do That in HTML5 by jordan0day on Wednesday September 08, 2010 @01:28PM (#1672592)
I think psadauskas' point was that a shiny button isn't a good benchmark for a flash vs. html5 comparison. Or at least that they don't think that shiny buttons make a lot of sense.
Re:Ha Do That in HTML5 by Encosia on Wednesday September 08, 2010 @10:51AM (#1672000)
Well, that shouldn't be very hard to reproduce: http://dl.dropbox.com/u/360937/do-that-in-html5-fail.png
Re:Ha Do That in HTML5 by moxiemk1 on Wednesday September 08, 2010 @01:22PM (#1672570)
Since I'm using an iPad at the moment, I was similarly spared from seeing what this button looked like.

That is, until people rose to his challenge. :(

Re:Ha Do That in HTML5 by STHayden on Wednesday September 08, 2010 @11:30AM (#1672137)
People who complain the button is ugly seem to be missing the point. iF there is something that flash can do that HTML5 and the canvas can't do then it's a bridge to be crossed.

While this might be a bad example it would be worth wile to have a list of what flash can do that HTML5 can not yet. The we can talk about if it is or is not worth implementing.

Re:Ha Do That in HTML5 by zackola on Wednesday September 08, 2010 @10:36AM (#1671947)
That is the ugliest button I've ever seen on the internet.
Re:Ha Do That in HTML5 by jherdman on Wednesday September 08, 2010 @10:52AM (#1672006)
I take it this means you weren't around for The Dark Ages? The time when animated GIFs ran amuck, standards were wept for acceptance, and the kingdom of Geocities was strong?
Re:Ha Do That in HTML5 by zackola on Wednesday September 08, 2010 @01:36PM (#1672638)
I was around for The Dark Ages for sure, and even including everything there, this button is worse. I'd even prefer a Java applet mirror reflection button to this thing.
Re:Ha Do That in HTML5 by 9ec4c12949a4f3 on Wednesday September 08, 2010 @11:50AM (#1672216)
If this banner is flashing, we may have just given you an epeliptic seizure!!
Re:Ha Do That in HTML5 by jgalvez on Wednesday September 08, 2010 @10:46AM (#1671982)
And I'm glad HTML5 may give me a hard time if I ever attempt to make one.
Re:Ha Do That in HTML5 by kqueue on Wednesday September 08, 2010 @11:00AM (#1672029)
I don't think the author knows much about html5 or the concept of canvas in general.

If he goes to http://www.chromeexperiments.com/, he'll realize that all this is doable.

Re:Ha Do That in HTML5 by rimantas on Wednesday September 08, 2010 @01:20PM (#1672561)
My rought take (sure, I cheated a bit with a background too):

http://kod.as/lab/button/

Safari and Chrome.

Re:Ha Do That in HTML5 by superk on Wednesday September 08, 2010 @12:16PM (#1672319)
I think the "gracefully" part is misleading. This could be done with Javascript and a simple CSS class added to the <button> is both graceful and degrades gracefully. But if we're comparing apples-to-apples, what's graceful about the Flash solution - opening one (possible more - Photoshop, etc) programs, learning a proprietary language (Actionscript) and exporting a binary that's not accessible to users or search engines, etc...
Re:Ha Do That in HTML5 by jws on Wednesday September 08, 2010 @01:02PM (#1672487)
From stackoverflow.com where some misguided fool wants to draw his page background with canvas:

… Webkit-based browsers do allow you to use a element in the CSS background property. Just give the canvas an id, then use "body { background:url(#mycanvas); }" in your CSS.

Sure, that isn't in the HTML5 standard per se, but since there is no HTML5 standard we can pretend it is.

steveklabnik points out in this thread an example of someone doing it, http://mobdb.com/reddit/button.html , but they use absolute positioning to overlay the button and canvas and will surely go mad if they try to use it for real.

I suppose, with this newfound CSS knowledge I will now have to change my home page background to a hilbert curve.

Edit: Actually, I think I'll use the "background: -webkit-canvas(name)" and getCSSCanvasContext() DOM function documented at http://webkit.org/blog/176/css-canvas-drawing/

Upshot: No hilbert for me. Takes about 1 second to render a maximally detailed hilbert in my browser on a core i7 processor.

Re:Ha Do That in HTML5 by steveklabnik on Wednesday September 08, 2010 @12:13PM (#1672305)
Re:Ha Do That in HTML5 by FreakCERS on Wednesday September 08, 2010 @05:54PM (#1673652)
Someone else at reddit (me) did it better: http://www.reddit.com/r/programming/comments/db37b/ha_do_tha...
Re:Ha Do That in HTML5 by seejay on Wednesday September 08, 2010 @01:12PM (#1672526)
Yup! guess it's time to eat his old Flash disks LOL!
Re:Ha Do That in HTML5 by confuzatron on Wednesday September 08, 2010 @07:23PM (#1673866)
He should have stipulated that the HTML5 version must have smooth animation, like the Flash version.
Re:Ha Do That in HTML5 by pedalpete on Wednesday September 08, 2010 @01:04PM (#1672492)
Does the author realize that the last image has Mr T. representing flash and Rocky representing HTML5.... in the movie, I believe, Rocky won.
Re:Ha Do That in HTML5 by wazoox on Wednesday September 08, 2010 @11:42AM (#1672181)
Apparently the effect loops endlessly, always the same. In fact it can be replicated with 1995 tech, i. e. animated GIF.
Re:Ha Do That in HTML5 by DavidBishop on Wednesday September 08, 2010 @12:34PM (#1672373)
(Why are there so many posts here without a comment section? Now to the topic at hand...)

Why?

That's my first question. Why? As in why do I need this button? As in why do I have to do this in HTML 5?

HTML 5 doesn't have to replace Flash. Flash may be great for some devices, and the computers of today can do Flash.

Why does this argument always end up with "But I can do this wildly unnecessary thing in Flash! I should be able to make something unequally unnecessary in HTML 5".

Perhaps HTML 5 can't do the unnecessary. Perhaps that's all the more reason to go to HTML 5.

Simplicity is the ultimate sophistication. - Leonardo da Vinci

Re:Ha Do That in HTML5 by S_A_P on Wednesday September 08, 2010 @11:50AM (#1672217)
He should have cleaned his room before taking a picture in it. If the debate was so tiresome between flash/html 5, why add fuel to the fire?

I still dont see the need to justify your purchase/platform/technology. build things that your consumers like, use VB script, Cobol, or powerbuilder for all I care- just make it cool.

Re:Ha Do That in HTML5 by basicxman on Wednesday September 08, 2010 @12:46PM (#1672425)
yawn Whatever happened to use the right tool for the right job?

If you need a button like that (gaming website is about the only thing I can think of), chances are your audience probably has Flash.

My personal opinion however is Flash is not the right tool for the particular job of creating navigation.

Re:Ha Do That in HTML5 by StavrosK on Wednesday September 08, 2010 @11:54AM (#1672243)
I can't, sorry, Flash doesn't support my OS so I can't see it.
Re:Ha Do That in HTML5 by benologist on Wednesday September 08, 2010 @11:38AM (#1672174)
This should be posted as a challenge:

http://armorgames.com/play/1716/gemcraft

Re:Ha Do That in HTML5 by seejay on Wednesday September 08, 2010 @01:13PM (#1672534)
Am I the only one who feels like this guy is just a troll???
Re:Ha Do That in HTML5 by mvalle on Wednesday September 08, 2010 @10:53AM (#1672010)
Is this from Adobe, or does someone really care that much?
Re:Ha Do That in HTML5 by 9ec4c12949a4f3 on Wednesday September 08, 2010 @11:49AM (#1672211)
ITT: People getting trolled to help him convert a website from flash to html5.