Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-09-2007, 08:49 AM   #1
anurag
Senior Member
 
Join Date: May 2007
Posts: 106
Unhappy Extends to built in class--! why we do so

Quite often in our class we write
public class MyClass extends Sprite
public class MyClass extends XMLDocument
public class MyClass extends URLLoader
etc
How does it works in get executed in our program.Basically I know extending class denotes inheritance also we can use and call fields/variables and methods
of that class from subclass.But extending built in class .Does it means the same
Than how to implement functions of built in class from subclass.
can anybody help please .Thanks in advance
With Regards
Anurag
anurag is offline   Reply With Quote
Old 10-09-2007, 08:55 AM   #2
panel
AS3
 
panel's Avatar
 
Join Date: Mar 2007
Location: Warsaw
Posts: 1,991
Send a message via Skype™ to panel
Default

I don't really understand what d oyou mean by 'implement'? Those functios are already implemented so you can call them like any other function functionName();
The difference it that function body is in super class insted of your extended class.

If you wanna to change function behaviour or add some functionality you can override super class function

ActionScript Code:
public override function functionName():void { //you can writhe new code here //you also can run this function from superclass super.functionName(); }
panel 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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Class extends Class (in lower dir) masoth ActionScript 2.0 2 11-18-2006 01:50 PM
How can I implement a two-way relationship between classes in AS 2.0? MHH ActionScript 2.0 5 10-13-2004 04:35 PM
getting a Class that extends MovieClip to do something onClipEvent(load) ashley_coleman ActionScript 2.0 2 02-24-2004 08:59 PM
Have made own Camera class, AS2.0 loads built in Camera instead :( Solutions ? Amn ActionScript 2.0 10 01-19-2004 11:13 PM


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