Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-01-2008, 03:28 PM   #1
kaydara
Registered User
 
Join Date: Jan 2008
Posts: 7
Default Component Arguments

Hey guys,

im using actionscript with flex.
I have a custom component, but i need to create that custom component with some arguments...

if i do this:

var tmp:CustomComponent = new CustomComponent("lol") ;

how can i recieve the lol in the component ?
In wich variables should i recieve that, and do i need a oncreation function ?


Thanks in advanced.
kaydara is offline   Reply With Quote
Old 02-01-2008, 06:06 PM   #2
Slowburn
[Invent:Design:Create]
 
Join Date: Sep 2002
Location: Toronto, ON
Posts: 2,068
Default

edit your CustomCompoent class files to include arguments.....or extend the custom component class to accept argument values.
__________________
o Please do a search before you post
o Please use the [ as][ /as] tag for your code (so we can read it clearly)
Slowburn is offline   Reply With Quote
Old 02-01-2008, 08:07 PM   #3
dr_zeus
Feathers
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,999
Default

The argument goes to the constructor of your custom component.
__________________
Josh Tynjala | Feathers
dr_zeus is offline   Reply With Quote
Old 02-01-2008, 08:09 PM   #4
Slowburn
[Invent:Design:Create]
 
Join Date: Sep 2002
Location: Toronto, ON
Posts: 2,068
Default

sorry, should have clarified that.....thanks zeus.
__________________
o Please do a search before you post
o Please use the [ as][ /as] tag for your code (so we can read it clearly)
Slowburn is offline   Reply With Quote
Old 02-02-2008, 10:23 AM   #5
kaydara
Registered User
 
Join Date: Jan 2008
Posts: 7
Default

thanks guys
kaydara is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add parameters to component built from scratch [email protected] Components 9 12-03-2007 11:04 PM
removeMovieClip() not work for components? djandrew Components 30 08-03-2007 04:51 PM
Proper way to bind data to the DataGrid component - Best practices. andrea_muta Components 1 04-03-2007 09:13 AM
dynamic component (radiobutton) with setChangeHandler problem tROCK Components 6 08-25-2004 04:49 PM
help needed referencing a component instance inside my own custom component bleepbloop Components 4 08-06-2004 10:31 PM


All times are GMT. The time now is 10:58 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.