Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-06-2006, 02:16 PM   #1
actionscriptLearner
Registered User
 
Join Date: Jan 2006
Posts: 2
Default Extending List Component

I've been looking high and low across many forums and Flash websites, but cannot seem to find a way to do what I need. I am trying to make an extension of the List component. Basically, I want the List component but have it customized and setup with additional functions. So, I want to extend or subclass the List component, but the only way I've seen so far is to use movie clips. But, this does not allow me to retain the original functionality of the List component, as I would still like to be able to do newList.addItem() or any other method for List. Perhaps the only way to do that would be to define all those methods in the new subclass and call them using super(). But, if there is a direct way to modify the List component as I want, and turn it into a new component directly, I would appreciate help on that. Sorry if this isn't very clear.
actionscriptLearner is offline   Reply With Quote
Old 01-06-2006, 06:14 PM   #2
Xeef
Off-Line
 
Xeef's Avatar
 
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539
Default

hi and welcome to As.Org

it depends on what functionality you wana ADD

try this :

ActionScript Code:
//a "List" component needs to by in the library ! import mx.controls.List; List.prototype.ListTrace = function() {     for (a=0; a<this.dataProvider.length; a++) {         trace(this.dataProvider[a]);     } }; _root.createClassObject(List, "L", 1); L.dataProvider = [1, 2, 3]; L.ListTrace();
__________________

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 01-06-2006, 11:46 PM   #3
actionscriptLearner
Registered User
 
Join Date: Jan 2006
Posts: 2
Default

That does help alot, but what I'm trying to do now is to modify the List component so that the scrollbar goes down by one page, not one item. But, I want a global change (similiar to how you can globally change the styles of the List). I'm not exactly sure how this would work, as I have only gotten into customizing components.
actionscriptLearner 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
Major Problems trying to capture "click" event in List component ManinBlaq Components 11 01-30-2007 07:12 PM
List Component Double-Click Fuzzplug Jones Components 3 04-18-2006 10:10 PM
2 Part Question: Tooltips for List Component . Word Wrap for List Component FaceEraser Components 0 09-12-2005 01:31 PM
2 Part Question: Tooltips for List Component . Word Wrap for List Component FaceEraser Components 0 09-12-2005 01:13 PM
using the List component in my class?? dangerhotrod Components 5 11-18-2004 07:34 AM


All times are GMT. The time now is 06:22 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.