A couple of Prototype Ports for ActionScript





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

10
Date Submitted Fri. Aug. 25th, 2006 7:30 PM
Revision 1
Helper psykoprogrammer
Tags inheritance | JavaScript
Comments 0 comments
A small example demonstrating inheritance in Javascript, complete with calling base class constructors and methods. For the more detailed description, visit http://www.adampresley.com.
16
Date Submitted Sat. Aug. 26th, 2006 11:20 PM
Revision 1
Helper psykoprogrammer
Tags ajax | JavaScript
Comments 1 comments
A simple AJAX class. The code for the class is provided as well as example HTML and PHP code for usage.
10
Date Submitted Wed. Nov. 9th, 2005 11:45 PM
Revision 1
Helper poncho
Tags Form | JavaScript | Zero
Comments 0 comments
ZeroField
9
Date Submitted Sun. Nov. 20th, 2005 8:56 AM
Revision 1
Helper poncho
Tags Hide | JavaScript | Show
Comments 0 comments
Unobtrusive Show/Hide
9
Date Submitted Wed. Nov. 23rd, 2005 6:03 PM
Revision 1
Helper poncho
Tags Convert | JavaScript | Kilometer | Mile
Comments 0 comments
Unobtrusive Kilometer/Mile Converte
6
Date Submitted Fri. Oct. 13th, 2006 10:01 AM
Revision 1
Beginner nothingHappens
Tags ActionScript | DataGrid | Flash | sorting
Comments 0 comments
I think that the problem comes when you populate a DataGrid's dataProvider with data from a a remoting call, such as a RecordSet returned from AMFPHP. The remoting protocol doesn't remember the datatype of each database column, so once you get the RecordSet back to ActionScript everything has become a String. You could go to the trouble of casting every numeric column's contents in the RecordSet to a Number so that the DataGrid will sort those columns numerically (1, 2, 3, ...) rather than lexicographically (1, 10, 11, ..., 2, 20, ...)... or you could throw this quick little function in and tell it which columns you consider numeric. It will replace the default sorting behavior with one that casts to numbers before comparing, when dealing in the columns you specify. Pass it an array of the columns' indices and the DataGrid in question. Non-numeric strings in the columns you specify will get treated as 0 and left unsorted at the top.
8
Date Submitted Fri. Dec. 8th, 2006 9:28 PM
Revision 1
Beginner neshumah
Tags ActionScript | Random
Comments 0 comments
Return a random number within a gived range
5
Date Submitted Tue. Sep. 5th, 2006 8:27 PM
Revision 1
Beginner MovingParts
Tags Bind | Control | controls | datasource | same | two
Comments 0 comments
so you executed a query that took .5 second to execute and you want to bind that to a windows control. next you decide that you will need to have two controls bound to the same datasource. not a problem, except when you do this:
control1.datasource = datatable
control2.datasource = datatable

you notice that each control mirrors the other and you cannot pick two seperate and distinct values.

one way to solve this is to create two datatables and execute the query twice. unfortunately this now doubles your query time. bad idea.

here is the elegant solution...
10
Date Submitted Wed. Feb. 28th, 2007 3:35 PM
Revision 1
Helper mjlintz
Tags JavaScript
Comments 2 comments
Highlight table row on rollover.
8
Date Submitted Wed. Feb. 21st, 2007 8:53 AM
Revision 1
Beginner mikedowson
Tags CSS | JavaScript
Comments 2 comments
An easy way to hide and show div's using Javascript and CSS.

Basically just a slight variation on this script by Real Gagnon.