You are not logged in [login] | [register]
RSS MAD is both an RSS feed archive and online feed reader.
You can browse our categories, search for a feed, or if you already have a URL, use our online feed reader.
Simply start browsing the site, and if you find some feeds you like, register to view them on your own personalized page!
you are here: home » blogs (technical) » web development
Searching 177034 articles in 8938 feeds.
Do you like RSS MAD? Why not spread the news and tell a friend about it - it's as easy as filling out this form!
added: Mon, 21st November 2005 | 262 views | 0x in favourites
feed url: http://asji-lab.blogspot.com/atom.xml
flash, xml and php thoughs and ideas
Before Flash 8, if you wanted to create a window with scrollable content, you'd have to mask the content. I always felt a little uncomfortable using this approach.
In Flash 8 you can use the new movieclip.scrollRect property.
There is an easy copy/paste example in the help files, but this is what it comes down to :
import flash.geom.Rectangle;
var container:MovieClip = mclip;
var window:Rectangle = new Rectangle(100, 0, 200, 40);
container.scrollRect = window;
mclip in this example is my 'content' movieclip in my scene. By using .scrollRect, mclip will be 'masked' according to the Rectangle properties.
Nice and clean...
I helped out a friend with her website, who wanted her site in a Christmas theme.
So i made some actionscript powered snow... i like the result very much.
Things like this are not so hard to make, but i guess it's the small details that make it nice.
Check it out here : http://www.gingerfantasies.nl/
I was looking for a way to use an easy calendar in a project i'm working on.
I haven't found a direct way, but we do have the DateChooser available.
The DateChooser class allows you to specify "disabledRanges".
For normal use as a date chooser, this means the user cannot select a certain date or range of dates.
But if want to use this as an event calender, you can set all dates to disabled and only enable the event dates, resulting in a very acceptable event calendar!
When the user selects an enabled date (use a listener), you can display the events for that date.
Hope this little tip helps someone...
It's amazing, but i still hear the same arguments to not choose for flash when developing websites. The same arguments as i heard when we were at version 4 of the flash player!
Like these :
1. Backbutton functionality doesn't work.
2. You can't deeplink with a flash site.
3. You can't use the regular right mousebutton functionalities.
4. It's difficult to maintain.
5. Text looks like crap.
6. There is too much movement going on.
7. A plugin needs to be installed.
8. Google can't index you.
9. Scrollwheel functionality.
...
People who come with these arguments obviously are still in the previous century.
If you know what you're doing, you can develop a full flash site, with coverage of all of these arguments (except for the plugin requirement).
1. Backbutton.
Allthough still a little problematic, i got this to work just fine, using a simple script in javascript, combined with 4 lines of php.
2. Deeplinking.
Using anchor tags in your adress, with a little javascript, you can make deeplinking to work. I do have a problem with this in Firefox, where i have to disable the automatic changing of the browsers adress or the backbutton solution won't work. But i'm sure a solution will present itself. The underlying idea is solid.
3. Contect menu
From Flash player 7 and up you can change the contents of the right mouse button in flash to display any functionality you'd want to offer your users.
4. It's difficult to maintain.
Any site where you mix the presentation and data(information) layers, will become unmaintainable.
If you use xml for storing your data, or perhaps a combination php and mysql, you can seperate data from presentation, resulting in a very maintainable situation.
5 Text quality
One of my absolute favorite improvements of the new flash 8 player is it's quality of rendered text. I even prefer this quality over how my fonts look in Photoshop!
For me a reason to start developing for flash 8 immediatly!
6. There is too much movement going on.
This is such a strange argument. There is exactly as much movement as the developer has put in there! Maybe even by request of a client...
So it's up to yourself what you do and do not move! A good developer will try to find the right balance in this.
7. A plugin needs to be installed.
This one is true. But it doesn't seem to be that much of a problem. Since the flash 7 player pervasiveness got all the way up to 97 percent or so, we can use the flash 7 player to upgrade to the next version(s). Besides, most people know and trust Macromedia and will install the player.
8 Search engines.
If you seperate your content(data) from your presentation, by for instance using xml, you can make pages of this data that google can index. Then redirect users to your flash page, with the right deeplinking and voila! .........
9 Scrollwheel functionality.
For a while now you can monitor the mousewheel within flash. It's one line of javascript to communicate this activity to the browser.
I really felt like writing this down. Because if you do want to discredit my favorite technology, try to be up to date!
Flash for me is a lovely experience, not only with well designed sites, but for me personally also to develop in !
If you want to see some of these arguments discredited in an example, look at www.dylanfrancis.nl a flash 8 site with the backbutton functionality working, deeplinking working, etc... And just look at the quality of the fonts!
Sounds cool no? And it is!
I was looking around the net to find some sort of physics solution for a little experiment i am working on.
In this experiment i want a convincing collision detection / resolving on two "rounded rectangles".
Anyway, eventually i ran into Flade. After playing the demo's for a hour :) i downloaded the engine.
And i looked at the examples.
And i was realllly impressed with the work.
But i don't understand it! I do but i don't. The examples that come with the zip file he offers for download, are quite complex.
Big problem is lack of documentation. Something which the Author (Alec Cove) seems to be aware of.
The project is Open Source and needs interested qualified people to help this along, with documentation and examples... especially simple examples for simple souls like me.
Go ahead and at least look at the examples! Brilliant!
I came across this blog posting from Ivan Todorov:
Article: Macrodobe 8, Microsoft, the future of development, and why Flash programmers have higher IQ
It is a long article, but it describes precisely how i feel where the Web is going and the role of flash in that.
(according to Ivan, i would be a "Experience Developer" :)
In any case, i think i will bring this article to every job interview from now on!
I was playing around a little with filters in Flash, started with a simple light-grey square with rounded corners and ended up with this (see image)
I only used the standard filters like Dropshadow, Glow and Bevel.
I based all the colors on a fixed color-scheme, which means i can now easily deconstruct it and redo it in ActionScript... and then i can change the colors, sizes... etc on the run.
Just felt like mentioning this, because i like this way of working with flash.... make something visual then get ideas of how to implement them.
Usually too many ideas :)
Since a lot of people are waiting for me to get a workable version of the site builder and i am sort of finished with my last project (www.dylanfrancis.nl) it's time to get back to the builder.
So what is it going to be?
It will be a webcenter, for managing all kinds of things that the power and features of your server can provide. That includes a site or store. But also email (especially lists), bookmarks, managing media (mp3/avi/...)
But my first goal now is to handle the "your site part"
I realize that for a lot of people "your server" sound creepy. Like you have to know Linux or webservers...
The main idea behind the whole thing is simplicity and that applies also for installation, use, etc.
Installation will be : "copy some files to your server" ... and that'll be all!
I am still trying to get my head around all aspects of this project, and to make a kind of roadmap.
A workable version will be available from January.
If you're interested in this and/or feel like participating in this, drop me a line...
grtz!
asji
One of few things that i dislike about a full flash site is the fact that i loose my mousewheel functionality as soon as the flash movie has focus (clicked on)
Today i made a little thingy that passes the scrollwheel functionality to the browser, using javascript.
Here's the code:
function _InitMouseWheel(){
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta)
{
getURL("javascript:window.scrollBy(0,"+-(delta*30)+");");
}
Mouse.addListener(mouseListener);
}
then somewhere in your code add :
_InitMouseWheel();
You only have to call it once (because of the listener...)
enjoy!
In my quest to remove as much of the "flash deveations" from webstandards, i made a brandnew backbutton handler.
I did this before with the flash version of www.adje.nl (now offline), but now improved on it.
You can see it in action at : Martin's site
I'd appreciate it if you'd let me know if it doesn't work with your browser...
I am now trying to get deeplinking to work in combination with this. Not easy but i'm getting there...
Today i was working on improving my latest Flash 8 site. My goal was to incorporate a CSS style sheet for all the loaded text on the site.
I quickly ran into some problems.
The data is loaded from xml files. And some of these xml files had the cdata tag to preserve html formatting (f.i. using external links), but others didn't.
To make sure my text got the correct formatting i added a declaration to my css file :
body{ color: #333333; font-family: Tahoma; font-size: 12px; display: inline;}
and added a little piece in my actionscript :
pod_string="<"+"body"+">"+pod_string+"<"+"body"+">";
Now all not-html formatted text get's it's style from the body-tag. (all the extra plusses is for displaying here)
Then i had to solve another problem.
It seemed to me that i was looking at Flash 7 text... no advanced anti-aliasing.
These lines take care of that :
txt_container.antiAliasType = "advanced"; txt_container.embedFonts = true; txt_container.gridFitType = "subpixel";
where txt_container is a new TextField...
Do this BEFORE assigning the stylesheet to the TextField!
Pretty cool no? Gives me a lot more freedom to externally format my text...
This has been posted a lot already, but i felt my blog wouldn't be complete without mentioning it.
If you start with XML in Flash, you'll quickly get annoyed by traversing xml trees by going through it's childnodes... at least that's how i felt.
Thank the maker for including an easier way... XPath from within Flash!
Easier, more intuitive and causing less problems in your code...
Have a look at this great page for more ...
Here is the official Macromedia documentation (PDF)
embarassing moments at the doctor's office
Nothing to do with what i'm writing here, but still very funny :))
After two weeks of silence on my blog, finally some news...
I made my first full site with flash 8!
this is the url : http://www.dylanfrancis.nl
Still some thingys to do, but it was finished enough to put online.
I was pretty much given "carte blanche" with this one, and i really enjoyed it!
Ok, so today was my intro into Flex builder 2.0.
Where to start?
I started programming when i was 11 in 1981 on my sweet old Commodore 64.
I've done an education in computer science, programming in assembly, pascal... you name it.
But i slowly drifted away from it. I can't tell you exactly why, but it happened anyway.
And then there was Flash. And with it all my passion for developing was back!
For my work i have done some stuff in Visual Basic, but it didn't touch me at all.
So what does this have to do with Flex?
I get the same effect. Don't get me wrong, i think the whole Flex idea is great and i am impressed with the quality of it. But it doesn't touch me.
After a day of trying things and following a couple of tutorials i've had it with Flex. The rest of the evening i've spend working on a new site that's in the pipeline... in Flash 8. And i enjoyed every minute of it!
I love the mix of visual work, combined with scripting, with the versatility with which i can tackle things, with the looseness of it all.
So for me, i'll stick with Flash for now... (allthough i am still mad about the getNextHighestDepth vs Components v2 BUG!!)
Pretty soon we'll be discovering ways to use the new 8.5 player features as well.
Like "Sound.computeSpectrum()" ... :)
Here is a nice page about some of these features : FlashGuru � Actionscript 3 - New Capabilities
I'd love to hear some arguments against (or in favor of) mine...
Macromedia Labs - Flex Builder 2 Tutorials
Today i started looking at the new Flex builder from Macromedia.
So far it looks very nice indeed! I still have to figure out in which situations i'd want to use flex instead of just Flash, but in any case i enjoy learning this stuff...
I'll post my findings when i have something to tell :)
Something different this beautiful morning :)
A few days ago I spend an evening with a good friend. He is diagnosed with ADHD.
If you don't know what that is, have a look here.
In any case, it stands for "Attention Deficit Hyperactivity Disorder".
We were talking about something which he described as "displacement", where you feel a separation of yourself in some form.
I told him I recognize this effect with some mind games I play sometimes.
One of those for instance, is to imagine infinity.
What helps with that is to look at the night sky. Start from where you are, inside your head, first person view. Then start traveling upwards, keep going, all the while realizing how far you've gone, and how far you still have to go.
If you think about this process from a programmers point of view, and you'd define the situation, you could come up with recursion. In a program, a recursive function, is a function which, once initiated, starts a loop in which it calls itself, thus exponentially increasing the number of loops that are running.
In a program, you can crash the system with recursive loops. So you have to be careful, to build in detection methods for stopping the loop if it tends towards infinity.
If I do the experiment above, my goal is to keep it up for as long as I can, but everytime try it, I can't keep it up for too long. I can almost feel the recursion building up exponentially, and then something inside me decides to let go, and I am back on earth :)
Now imagine you do not have these detection tools, and that in situations like this you get into a recursion... the system crashes!
Recursion is everywhere around us. Even, or maybe especially, in nature. If you're unaware of this and lack the natural ability to stop these loops, I can certainly imagine that life would not be a pleasant experience...
At the same time, I am playing games with it, because I like the experience. I also think it trains my mind to be more flexible and focused.
I don't know if this has anything to do with adhd or anything else, but I thought it at least interesting enough to write it down...
I would love to hear your thoughts about this...
Hi site-builder fans! :)
A small update.
I have decided to go for the "webcenter" alternative (see previous post)
I keep running into issues with flash's security settings.
An example :
Imagine you want to add an image to an item in your database.
If i want to load that image into flash from your local system, i first have to send it to a webserver (php script), then let flash know where i've put it on the server, then load it from the server back into flash... to load an Image!!
And that goes for anything you want to load from your local system.
So if we make this whole thing a webcenter, we skip one step in this load/save process.
This means that you can only use this by uploading the store-builder to your server.
Which is not too much to ask i suppose.
The sad thing with all this is the absurd strictness of flash's security.
There definitly are ways around this. Either with javascript or a server side language.
But it's such an annoying hasle... not to mention problems with diverse browsers and settings.
And all i need is a path...
The decision has been made. Webcenter it will be.
I am now working on the item editor. With dragging items you can easily fill your database and design the templates for your items.
As soon as i have finished with converting the application to "web-center" status, i'll make the files available for download. Right now it directly uses my own server, without any security settings...
I had a script that had this piece of script :
function loadLink(link) // when file is defined, load path&XML;
{
...
When i checked this code's syntax, flash reported no errors.
But when i wanted to Autoformat it, it did report errors.. but offcourse with no details.
Eventually found this page :
kirupaForum - Macromedia Flash 8 Bugs and Emerging Issues
which led me to this solution :
// when file is defined, load path&XML; ->>>>>> comment on a seperate line
function loadLink(link)
{
...
problem solved :)
First a complaint.
What is up with all these Flash components? They appear unstable and buggy, screw up my depths (MovieClip.getNextHighestDepth()) .. i had hoped these issues would have been addressed with flash 8, but no luck.
Today i ran into this one..,
I have a dataGrid on my Stage with two columns. 1st : name & 2nd : url
Then somewhere in my app i want to dynamically change the value of one of these 2.
This line does that :
myDataGrid.getItemAt(myDataGrid.selectedIndex).url=link;
But does it? When i tried this, at first i didn't see it! But then when i rolled over the item with my mousepointer... there it was... damn.
So i thought, ok... i need a refresh thing on it.
I tried :
myDataGrid.redraw() : doesn't work
myDataGrid.invalidate() : doesn't work
unbelievable no?
now here's your solution :
myDataGrid.dataProvider=myDataGrid.dataProvider;
et voila! there it is...
pfffffffffffff what a day....
Today i made another one of those lovely discoveries... Maybe you recognize the situation, you know you did it right, but it just won't go.
Anyway, i was playing around with the Flash ScrollPane for the store builder. I want to use it for the "item editor" :)
So dynamically creating clips in a ScrollPane.
But then you also want the scrollbar to scroll to the bottom of the page where you newly placed item is.
After a while i figured it out.
This little line makes the Pane scroll to the bottom :
MyPane.vPosition = MyPane.maxVPosition;
But....
When you have just created a new clip in it's content. The *(%$%# doesn't update it's maxVPosition yet...
So, in order to make this work you need to use a setInterval (flash mx) and in flash 8 :
setTimeout(ScrollToBottom,100);
function ScrollToBottom()
{
MyPane.vPosition = MyPane.maxVPosition;
}
nice no? those undocumented thingys?
Hope it helps someone.
Oh, MyPane.invalidate(); helps with content masking stuff...
Another little update... mostly to get my thoughts straight on some issues and ideas. Constructive input is always welcome!
I ran into some problems with flash security concerning loading and saving files on a local system. This can cause some serious usability issues, but i am trying to find ways around it with php or maybe a concept change.
Let me explain concept change.
It's about how to perceive this application. Is it a standalone application that you run and use as any other program on your computer, or is it a "web-center" where you can handle the items/files/products on your site?
If the latter is preferred, the concept doesn't violate flashes security restrictions.
In any case support from a server side language is needed. My personal preference is PHP.
I am tending to go towards a "web-center" idea. Would be cool to see this grow from an easy xml editor to a complex webcenter where you can handle all things concerning your site. Be it a personal one or a small to medium size e-store...
Another issue i am now exploring, is deep-linking. If you think about it, a site consists of pages of information (say your product page), held together by a maze of links. So in it's basic form this means you should make the pages for your items and then create your site with links in such a way the item pages can be reached as easily as possible.
But these links can be part of the pages your are linking to. So it's a dynamic thing which you should be able to control with this application.
And with still keeping the flash option open, i am trying to keep enough flexibility...
The last thing i want to mention it, is the name of the whole thing. I mean how creative is "Store builder"? :)
So this is still an open issue. Maybe something like "Drag&Shop" ... if you have a better idea.. lemme know!
I was really waiting for this one...The Singularity Is Near : When Humans Transcend Biology
If you've read his other book : The Age of Spiritual Machines: When Computers Exceed Human Intelligence you will probably be as excited as i am!
Once you really get into the topic, your view on your future will be completely different...
Kurzweil writes in a loose manner while maintaining clarity on some very insightfull topics.
I really recommend these books! In 5 years you had definitly wished you read this :)
To conclude... i am always interested to start a discussion on this topic in particular, so if you're tempted, leave a comment or send me an email.
I felt like talking a little about the progress i've made with the Store-builder so far.
I'm drilling down into the neccesary datastructure until i at least reach the phase where i can add items for my Flash-trial site. Since my output from the Store-builder is xml and i use xml for the content of my flash pages... once i get that far with this application, i won't have to make xml with notepad anymore :)
So at least we'll have a nice simple XML-editor.
Here is another shot to give you an idea.
Now you can load and save files, and make the primary structure for the site, with a cool drag and drop thing. Maybe you've heard of "the brain"?
(http://www.thebrain.com/products/personalbrain/default.html)
A little bit like that :)
Anyway, this blog hasn't been indexed yet, so i'll have to wait for reactions :)
When that happens i'll make this available...
» more
» more
Is RSS MAD missing something? Tell us about new feeds here.