Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-30-2006, 07:33 PM   #1
MichaelxxOA
Flash Sucks
 
MichaelxxOA's Avatar
 
Join Date: Mar 2005
Location: Victorville, Ca
Posts: 2,228
Send a message via AIM to MichaelxxOA Send a message via MSN to MichaelxxOA Send a message via Yahoo to MichaelxxOA Send a message via Skype™ to MichaelxxOA
Default Extending InteractiveObject

So I'm in the Flash 9 Alpha...

With the new VM there is no need to use MovieClips unless that element has a timeline of it's own.. and there's no need to use Sprite/DisplayObjectContainer unless you're element will contain children of it's own, and so on and so forth.

So I decide in my Ball Throwing example that my ball could be an InteractiveObject just fine, so I extend it and test it, and due to my good fortune I get an Error

Code:
ArgumentError: Error #2012: Ball class cannot be instantiated.
	at com::Experiment$iinit()
So.. I go to Flex Builder and test my code, and it works fine.

So I guess this is just a heads up for you guys to know that this is just an Alpha bug and will be resolved, I sent an email to Adobe.

Take care.
Michael
MichaelxxOA is offline   Reply With Quote
Old 06-30-2006, 07:47 PM   #2
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

Quote:
The InteractiveObject class is the abstract base class for all display objects with which you can interact: mouse, keyboard, and focus.

You cannot instantiate the InteractiveObject class directly. A call to new InteractiveObject() throws an ArgumentError exception.
This aint a bug bud.
Tink is offline   Reply With Quote
Old 06-30-2006, 08:49 PM   #3
MichaelxxOA
Flash Sucks
 
MichaelxxOA's Avatar
 
Join Date: Mar 2005
Location: Victorville, Ca
Posts: 2,228
Send a message via AIM to MichaelxxOA Send a message via MSN to MichaelxxOA Send a message via Yahoo to MichaelxxOA Send a message via Skype™ to MichaelxxOA
Default

I'm not instantiating it, I'm extending it.

Michael
MichaelxxOA is offline   Reply With Quote
Old 06-30-2006, 09:37 PM   #4
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

You successfully instantiated a subclass of InteractiveObject in Flex Builder? I don't think you're allowed to (having to do with extending abstract classes directly)
__________________
(6)
senocular is offline   Reply With Quote
Old 06-30-2006, 10:02 PM   #5
MichaelxxOA
Flash Sucks
 
MichaelxxOA's Avatar
 
Join Date: Mar 2005
Location: Victorville, Ca
Posts: 2,228
Send a message via AIM to MichaelxxOA Send a message via MSN to MichaelxxOA Send a message via Yahoo to MichaelxxOA Send a message via Skype™ to MichaelxxOA
Default

Yes I can, and no I can't.. I just downloaded the final Flex 2 (was using Beta 3)

This all actually came from a conversation I had with Danny Patterson today who was telling me that in these cases I'd want to extend InteractiveObject directly.

I'll talk to him some more and see what I can figure out...

Take care, thanks.
Michael
MichaelxxOA is offline   Reply With Quote
Old 06-30-2006, 10:07 PM   #6
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

I'll ask around here too.
__________________
(6)
senocular is offline   Reply With Quote
Old 06-30-2006, 10:17 PM   #7
MichaelxxOA
Flash Sucks
 
MichaelxxOA's Avatar
 
Join Date: Mar 2005
Location: Victorville, Ca
Posts: 2,228
Send a message via AIM to MichaelxxOA Send a message via MSN to MichaelxxOA Send a message via Yahoo to MichaelxxOA Send a message via Skype™ to MichaelxxOA
Default

Thanks Sen
MichaelxxOA is offline   Reply With Quote
Old 07-02-2006, 09:49 AM   #8
pan69
Fight ya for a pint!
 
pan69's Avatar
 
Join Date: Jan 2005
Location: Sydney / Australia
Posts: 1,706
Default

Did you implement a constructor for your Ball class?

www.lukeschreur.com

Last edited by pan69; 11-22-2012 at 01:10 AM.
pan69 is offline   Reply With Quote
Old 07-04-2006, 03:48 AM   #9
MichaelxxOA
Flash Sucks
 
MichaelxxOA's Avatar
 
Join Date: Mar 2005
Location: Victorville, Ca
Posts: 2,228
Send a message via AIM to MichaelxxOA Send a message via MSN to MichaelxxOA Send a message via Yahoo to MichaelxxOA Send a message via Skype™ to MichaelxxOA
Default

Yes I did implement a constructor...

I just realized that I shouldn't be using InteractiveObject anyway, because I'm using the Graphic of the ball object, and Graphic isn't defined in the inheritance chain until Sprite, at the same time even on the most simplified of classes I'm still getting an error when extending InteractiveObject.

Michael
MichaelxxOA is offline   Reply With Quote
Old 07-04-2006, 09:19 AM   #10
Tink
Addict
 
Tink's Avatar
 
Join Date: Nov 2001
Location: London
Posts: 2,128
Default

Quote:
I'm not instantiating it, I'm extending it.
in extending it, and then creating an instance of it, you are instantiating it.

I pretty sure you cannot just extend it like you are trying.
Tink 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
problem with extending a Button class (AS2 class in linkage properties) yaroukh ActionScript 2.0 24 05-04-2005 09:31 AM
Extending Component Classes: MX 2004 LostInRecursion ActionScript 2.0 3 09-02-2004 07:06 PM
Extending Scrollpane to allow dragging to stage morro Components 1 06-29-2004 11:07 PM
Extending the Date Object TheJhereg ActionScript 2.0 2 04-23-2004 09:04 AM
Extending Color Stimpson ActionScript 2.0 4 01-24-2004 12:31 PM


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