September 25, 2007

LIghtbox++ vs XHTML Validation

So I was tying so hard to keep my portfolio XHTML valid. When i added the Lightbox++ script (which is a modified version of Lightbox) my portfolio had some errors according to the W3 standards. So after doing a little research and looking around I came to this solution.

First, the problem was that the doctype wasn't recognizing the height and width attributes i was setting in the tag.

So here was my solution.


<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\" \[

&lt;!ATTLIST a width CDATA #IMPLIED>

<!ATTLIST a height CDATA #IMPLIED>

]\ >



The bold part being what I had to add. Hope i saved someone out there some time.

September 20, 2007

Top 5 Coolest Tricks in Flash

These are some of my favorite tricks Ive learned throughout the years in flash. Granted Ive never had a use for some of them and others only kinda half work. Nonetheless i think they're pretty cool do here it goes.


1)Right Click:


this.onEnterFrame = function(){

if (ASnative(800, 2)(1)){

/// Right click has been executed

}

}


So this is cool and everything however there is no guarantee future flash versions will support this because ASnative() is undocumented. However I have found this code useful if I was ever trying to detect whether the left mouse button is being held down. Just change the 1 to a 2. Oh and if you change it to a 4 it detect middle click.... whoda thunk.


2) Smoke effect:

This ones kinda easy. There is this method: http://www.toxiclab.org/tutorial.asp?ID=105

Basically i just use versions of that method minus the use of flash's built in blur filter. It's alot easier to just use a PNG thats alpha'd down to like 33% and have a couple of those moving over each other. This is what i got: http://www.lawjik.net/bishop/smoke.html


3) Transparent Background:
OK this one is kinda cool. http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14201
Ive never found a use for this but Ive def seen plenty of ads made like this. Im pretty sure not all browsers support this one tho so it might not be the best thing in the world to use. I think Kirupa.com goes into more detail about it somewhere.

4) AMFPHP
This is prob my favorite. This makes flash remoting sooooo easy. All you have to do is learn how to write up Object Oriented PHP scripts and flash can work with them instantly. I've used this for working with databases mostly, MySQL, but also for e-mail scripts, and other random functions. Best part is that its fast, and getting faster. The original developer gave up on it for personal reasons but its following has taken over and it continues to grow.
Check it out: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14201

5) SWFObject
Ya I know i said coolest tricks IN flash but, come on, this is awesome. Its even better when u mix it with SWFAddress. Check them out. Basically swfobject gets rid of that whole "click to activate object" thing. It also lets you perform browser testing and the flash version. Swfaddress is just as cool. It makes it so your flash movie works with the back, forward, and refresh buttons on the browser.

So there it is. My favorites. I know some aren't as useful as others but oh well they're cool.

September 19, 2007

XML/XSL Portfolio

So i just created my portfolio with XML and an XSL style sheet. Im not gonna lie it's pretty cool. All i have to do now is update my XML, which is just a list for all you people who have no clue what it is, and the page is updated. The best part was how easy Dreamweaver made the whole process. All you do is bind the XML to the XSL sheet while your developing it and you get a live view of your page. You pretty much just drag and drop the elements of the XML into tables, images, URLs etc. Then when all is said and done i added a little CSS to make it look good. This could be the beginning of a long and prosperous relationship with XSL.

Portfolio: lawjik.net/bishop