Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Thread Tools Rate Thread Display Modes
Old 07-21-2004, 10:19 PM   #1
Registered User
Join Date: Jul 2004
Posts: 10
Question How do you access the base class when extending the String class

I want to extend the String class so that I can add a replace method.

Currently I have the following

class RegString {

var str:String;

function RegString( string:String ) {
str = string;

function replace( matchstr:String, replacestr:String ) {

var s = str;

The replace function works fine but I can't use any RegString instances like String objects, whereas I would like to be able to do assignments etc... with other String objects.

So what I want is

class RegString extends String {

function replace( matchStr:String, replace:String ) {

...but how do I access the base string here?...
lloyd13 is offline   Reply With Quote

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

All times are GMT. The time now is 06:49 AM.

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.