Hi Abdul,

here is some more info about my class:

this is where I'm at right now I'm still tying under stand the differences of a
Flex component class and a normal class and what is left out when you create a
component in Flex.


thanks,
-Art

class IciPostItNotes implements mx.core.MXMLObject
{
// Arrays that receive data to populate component
public var iciPostItNotesArray:Array;   // receives array of multible notes
w/properties for each note
public var iciQuickNotesArray:Array;    // ignore this propery
public var iciNotesArrayHasData:Boolean; // indicates if iciPostItNotesArray
has data or not

// Invisible Note properties
public var iciCurrentNoteInView:Number; // gets current selected viewstack
child
public var iciNotesAreEditableEditable:Boolean; // indicates if note is
editable or not
public var iciNotesArrayChangeFlag:Boolean;     // indicates if note array has
changed

// Visible Note Properties
public var iciNotesID:Number; // note id #
public var iciNoteTitle:String; // Note title ( noteAuthor+noteDate )
public var iciNoteAuthor:String // Author of note
public var iciNoteDate:Date; // Date note was created
public var iciNoteIndex:String; // [n] of (sum of childern) displays like: 1 of
5
public var iciNoteText:String; // contains note text


function initialized() : Void
{
// init info here
}

function createChildren() ; Void
{
// Viewstack populated here
// if array is empty iciNotesArrayHasData = false;
// if false viewstack is populated with a empty textfeild
}

function setupListener() : Void
{
// button listeners defined here
}

public function click(event_obj:Object):Void
{
switch(event_obj.target)
{
case add_pb:
trace("create child in viewstack");
break;

case remove_pb:
trace("do child in viewstack");
break;

case edit_pb:
trace("do edit current tf in viewstack");
break;

case first_pb:
trace("goto first child in view stack");
break;

case previous_pb:
trace("goto previous child in viewstack");
break;

case next_pb:
trace("goto next child in viewstack");
break;

case last_pb:
trace("goto last child in viewstack");
break;
}
}

}



Quoting Abdul Qabiz <[EMAIL PROTECTED]>:

List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
Date: Mon, 7 Feb 2005 05:42:57 -0800
Subject: RE: [flexcoders] codeless MXML seprate AS class help
Reply-To: [email protected]
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit


Hi Art,

I couldn't get what you are asking. Do you mean to have separate event
handler for all seven buttons in MXML?

What I interpret, you have seven buttons in mxml and one click function
handling the click events for those buttons. You can identify the button
clicked by using "event.target.id".


function click(event) { var target = event.target.id;

switch(id) {

case "button1":
//do something
break;
case "button2":
//do something
break;
case "button3":
//do something
break;
}
}




Does it help? Please give us more details?

-abdul



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, February 07, 2005 6:36 PM
To: [email protected]
Subject: [flexcoders] codeless MXML seprate AS class help


Hi All,

I'm trying to make my class seprate from my MXML. I'm following the simple
example founf in the docs but I've ran into one problem. How do I define
multiple click events from different buttons? I have 7 at the moment and for
the life of me I can't find an example w/ more than one button click
function.

thanks,
-Art




Yahoo! Groups Links









Yahoo! Groups Links










Reply via email to