Current time: 05-19-2012, 09:57 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API Discussion
Author Message
01-11-2010, 03:31 PM
Post: #1
API Discussion
Ok, so I've been working on the the classes for the Kynto lib. I'm making great progress so far. Here is an example of a class I just finished off.

PHP Code:
var timer = new Timer(3000);
timer.addEventListener(TimerEvent.TimeronTimer);

function 
onTimer(e)
{
    
alert(e.currentTarget); //which would give you direct access to the timer obj


The events aren't just pretty to look at, the entire lib is built around this system. Anyway, I'm looking for ideas of classes you would like to see included in the lib once it's released. Happybracket

http://williamrob.in/ Imawesome
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-11-2010, 03:33 PM
Post: #2
API Discussion
avatar & fakefurni libs

x)
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-12-2010, 01:15 AM
Post: #3
API Discussion
Updated example:

Code:
var timer = new Timer(3000);
timer.addEventListener(TimerEvent.Timer, onTimer);
timer.start();

function onTimer(e)
{
    alert(e.currentTarget.currentCount);
    e.currentTarget.stop();
}

http://williamrob.in/ Imawesome
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-12-2010, 01:20 AM
Post: #4
API Discussion
fantastic, event-driven code is so much prettier to look at.

how about some html-request classes to get data from pages... and more Kynto based events ColonD
Find all posts by this user
Like Post Quote this message in a reply
01-12-2010, 01:22 AM
Post: #5
API Discussion
You have new JSONCallBack(url) which performs a crossdomain call for your data.

http://williamrob.in/ Imawesome
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-13-2010, 05:43 AM
Post: #6
API Discussion
Quick update:

Code:
var user = new UserDataRequest(1);
user.addEventListener(KyntoEvent.USER_INFO, function(e)
{
    trace("yay " + e.currentTarget.U);
});

http://williamrob.in/ Imawesome
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-13-2010, 05:44 AM
Post: #7
API Discussion
Willy Wrote:Quick update:

Code:
var user = new UserDataRequest(1);
user.addEventListener("userInfo", function(e)
{
    trace("yay " + e.currentTarget.U);
});

o nice. maybe add an alexjjj check so it goes boo if he is there? <3

PHP, MySQL, xHTML, CSS, JavaScript, C#, Lingo, AS3

[Image: mfpreviewsig.png]

http://sketcher.me
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-13-2010, 05:45 AM
Post: #8
API Discussion
Willy Wrote:Quick update:

Code:
var user = new UserDataRequest(1);
user.addEventListener(KyntoEvent.USER_INFO, function(e)
{
    trace("yay " + e.currentTarget.U);
});

Incredible! this is so great, theres loads of things that have opened up with the events Happybracket
Find all posts by this user
Like Post Quote this message in a reply
01-13-2010, 05:51 AM
Post: #9
API Discussion
Code:
var user = new UserDataRequest(1);
user.addEventListener(KyntoEvent.USER_INFO, function(e)
{
    var usr = e.currentTarget;

    if(usr.U == "sam") new ChatRequest("sam smells");
});

haha ColonD

http://williamrob.in/ Imawesome
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
01-13-2010, 05:52 AM
Post: #10
API Discussion
Willy Wrote:
Code:
var user = new UserDataRequest(1);
user.addEventListener(KyntoEvent.USER_INFO, function(e)
{
    var usr = e.currentTarget;

    if(usr.U == "sam") new ChatRequest("sam smells");
});

haha ColonD

thats it, kdev is called off D:

PHP, MySQL, xHTML, CSS, JavaScript, C#, Lingo, AS3

[Image: mfpreviewsig.png]

http://sketcher.me
Visit this user's website Find all posts by this user
Like Post Quote this message in a reply
Post Reply 


Forum Jump: