Just another note to myself. Here is a great javascript and CSS resource:
Quirksmode.org
Tuesday, July 8, 2008
PHP email with attachments -- and how to do sendAndLoad in AS3
I took a bit of a break after the marathon 2 months to get this DVD ready and worked on a wordpress site -- and learned a lot about reconfiguring it to do what I really wanted. In any event, I'm back to working on the final steps of porting the Flash DVD to the Web. This has posed all sorts of Flash AS3 challenges as we are trying to make it usable for both high and low bandwidth users.
One new feature for the web version will be to allow users to email a copy of a selected photo to a friend. Of course, this meant learning how to use the AS3 version of sendAndLoad -- and also how to do file attachments in php email.
These links have come in handy for both of these:
How to do sendAndLoad in AS3 >
How to do file attachments in PHP email - option 1> | option 2 > | option 3 >
So far I've implemented the php code in option 1 and found it quite easy. I'll try the html version in option 2 if I get time. Option 3 is to PHPMailer. I'd like to try it someday but generally prefer to learn the code rather than implement a class built by someone else...
One new feature for the web version will be to allow users to email a copy of a selected photo to a friend. Of course, this meant learning how to use the AS3 version of sendAndLoad -- and also how to do file attachments in php email.
These links have come in handy for both of these:
How to do sendAndLoad in AS3 >
How to do file attachments in PHP email - option 1> | option 2 > | option 3 >
So far I've implemented the php code in option 1 and found it quite easy. I'll try the html version in option 2 if I get time. Option 3 is to PHPMailer. I'd like to try it someday but generally prefer to learn the code rather than implement a class built by someone else...
Monday, May 19, 2008
Odd behavior with E4X filtering in AS3
This one drove me nuts today and so I thought I'd better blog it. I was trying to create a function that to filter an xml file using E4X and locate a node with a specific "photoid" attribute:
First I tried to get retrieve the node with the correct id by filtering:
var myList:XMLList = pdXML..photo.(@photoid=="123");
but, it appears that unless the XMLList has more than one item it won't trace anything out when you do this:
trace(myList.toString()); //shows nothing
trace(myList); //also shows nothing
...even though the list clearly has one item in it:
trace(myList.length()); //returns 1
The only way that it will show the node attribute value is when you refer specifically to the attribute in the trace statement like this:
trace(myList.@photoid); // shows "123"
If the xmlList has more than one node it traces fine using toString(). But the thing that JUST occurred to me is that I SHOULD have used toXMLString()-- which (as I just correctly tested) traces the single node correctly. Even so, the xmlList should trace properly even without using the toString() or toXMLString() methods -- like this: trace(myList);
In any event, I'm not sure if this is a bug or a feature but it sure was a frustrating way to spend an afternoon...
First I tried to get retrieve the node with the correct id by filtering:
var myList:XMLList = pdXML..photo.(@photoid=="123");
but, it appears that unless the XMLList has more than one item it won't trace anything out when you do this:
trace(myList.toString()); //shows nothing
trace(myList); //also shows nothing
...even though the list clearly has one item in it:
trace(myList.length()); //returns 1
The only way that it will show the node attribute value is when you refer specifically to the attribute in the trace statement like this:
trace(myList.@photoid); // shows "123"
If the xmlList has more than one node it traces fine using toString(). But the thing that JUST occurred to me is that I SHOULD have used toXMLString()-- which (as I just correctly tested) traces the single node correctly. Even so, the xmlList should trace properly even without using the toString() or toXMLString() methods -- like this: trace(myList);
In any event, I'm not sure if this is a bug or a feature but it sure was a frustrating way to spend an afternoon...
Friday, May 16, 2008
Tutorials for skinning Flex components
Here is a blog posting that points to a number of tutorials on how to skin Flex components. I'm not ready to review them now but they will probably come in handy later ;-)
Click Here >
Click Here >
Wednesday, May 14, 2008
Bandwidth and debugging tool
Here is a GREAT tool for testing and debugging:
http://www.charlesproxy.com/
It lets you throttle your bandwidth to test how your page(or flash) works for different users -- plus it allows you to monitor the download times of various objects and the backend communication between flash and your server. VERY useful!
http://www.charlesproxy.com/
It lets you throttle your bandwidth to test how your page(or flash) works for different users -- plus it allows you to monitor the download times of various objects and the backend communication between flash and your server. VERY useful!
Monday, May 12, 2008
Playing with AS3 Drawing
I've been going through Colin Moocks' AS3 book and trying out some of the examples (along with getting distracted by trying related things). In this piece I tried to create a dynamic randomized drawing window. The colors are pulled randmly from an array, and the app randomly draws 3-9 lines to form an object and also randomly selects the alpha prop. After 6 objects are drawn it deletes the lowest one in the display list. People have been doing this kind of thing for a long time but this was fun to do with AS3:
Sunday, May 4, 2008
Subscribe to:
Posts (Atom)
