Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-02-2008, 05:38 PM   #1
Trying People
madcat's Avatar
Join Date: Mar 2002
Location: Atlanta
Posts: 269
Default OOP / Function Question

Just wondering if it was possible to call a) either two functions within the same addEventListener or b) to nest a function within a function -- using AS3.

New to OOP and was just wondering if I could do so.

madcat is offline   Reply With Quote
Old 06-02-2008, 08:45 PM   #2
Senior Member
DiamondDog's Avatar
Join Date: Jan 2008
Location: Exeter, UK
Posts: 263

(a) I don't think you can call two functions directly from one event listener (I'm a noob, so I could be wrong) but you can definitely do this:

addEventListener(Event.SOME_KIND_OF_EVENT, masterFunction);

	// all this function does is call two other functions

function doFunction1():void

function doFunction2():void
So, yes, you can definitely call one function from within another.
Not sure if that's what you mean by 'nesting'?
DiamondDog 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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
one template, many looks? subquark ActionScript 1.0 (and below) 1166 10-29-2013 06:18 PM
[AS3] A "Bullet" Class for everyone. Bracer Gaming and Game Development 36 01-18-2009 07:33 PM
too much knowledge required to take advantage of the beauty of extending classes dsdsdsdsd ActionScript 3.0 4 03-17-2008 08:53 AM
inheritance issue in AS3 BrettAF3D ActionScript 3.0 3 07-27-2007 08:35 AM
mx.utils.Delegate demystified astgtciv ActionScript 2.0 26 06-15-2006 03:12 PM

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