parsing XML with Flex/AS3 is a breeze but I need to do some work with php and it isn't quote as straightforward as i had hoped. In any event, the best bet seems to be to use simpleXML. And here is a pretty good tutorial:
http://debuggable.com/posts/parsing-xml-using-simplexml:480f4dfe-6a58-4a17-a133-455acbdd56cb
I'm still trying to get used to how to use custom namespaces but i'm close (i hope!)
Monday, September 22, 2008
Thursday, August 28, 2008
The future of the web
This is the most amazing thing I have seen in years:
http://labs.mozilla.com/2008/08/introducing-ubiquity/
http://labs.mozilla.com/2008/08/introducing-ubiquity/
Wednesday, August 20, 2008
Problems adding AS3 created objects to Flex Components
I have spent the better part of a day discovering that adding actionscript created UIComponents to the display list of a flex component will cause the component to not set the scrollbars properly.
Here is what I had:
1. An mx:Canvas object added to the stage using the tag
2. An AS3 class called ImageHolder that was extended from UIComponent
3. A loop to adds a series of 28 images into the Canvas, setting the x and y props so that they were spaced into rows of 4.
When I ran it, the objects would start to add properly but when it got to the bottom row of the canvas (where the rest of the images would have to be hidden inside the container) the images showed on above the canvas and then suddenly get hidden by the container -- as though they were on top of the canvas and not inside of it. In addition the scrollbar would not properly scroll to the last row of images -- essentially hiding the from view. I assume this is because the Canvas component was not recognizing that those last items were there and wouldn't resize again.
After trying a number of different approaches, I finally decided to create a custom component that was based on a canvas and add the images to it instead. Once I did this and added this Component to the Canvas it worked perfectly.
It probably says somewhere in the docs that you should use components as a building blocks instead of creating actionscript objects, but I just assumed that they would play nice together...
Here is what I had:
1. An mx:Canvas object added to the stage using the
2. An AS3 class called ImageHolder that was extended from UIComponent
3. A loop to adds a series of 28 images into the Canvas, setting the x and y props so that they were spaced into rows of 4.
When I ran it, the objects would start to add properly but when it got to the bottom row of the canvas (where the rest of the images would have to be hidden inside the container) the images showed on above the canvas and then suddenly get hidden by the container -- as though they were on top of the canvas and not inside of it. In addition the scrollbar would not properly scroll to the last row of images -- essentially hiding the from view. I assume this is because the Canvas component was not recognizing that those last items were there and wouldn't resize again.
After trying a number of different approaches, I finally decided to create a custom component that was based on a canvas and add the images to it instead. Once I did this and added this Component to the Canvas it worked perfectly.
It probably says somewhere in the docs that you should use components as a building blocks instead of creating actionscript objects, but I just assumed that they would play nice together...
Tuesday, August 19, 2008
Wednesday, August 6, 2008
creating a browser window in a flex app
Here is a very cool way of creating a browser window -- using an iframe -- inside of flex:
http://deitte.com/archives/2006/08/finally_updated.htm
It also points out in the update why this is not the best way to go about this problem -- primarily because of accessibility (it can't be accessed by screen readers) -- but it is useful if really needed....
http://deitte.com/archives/2006/08/finally_updated.htm
It also points out in the update why this is not the best way to go about this problem -- primarily because of accessibility (it can't be accessed by screen readers) -- but it is useful if really needed....
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...
Subscribe to:
Posts (Atom)
