A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: syntax question

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    144

    syntax question

    Is there anyway to combine these two functions into one?
    Code:
    lineObj.onRelease = function() {
    	stopDrag();			
    };
    lineObj.onReleaseOutside = function() {
    	stopDrag();
    };
    When I end up putting a dozen lines inside each of the functions, and I want them to do the same thing, it there a way to write something like this?
    Code:
    // this obviously does not work
    (lineObj.onRelease, lineObj.onReleaseOutside) = function() {
    	stopDrag();			
    };
    thanks

    -- mm

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Code:
    lineObj.onRelease = lineObj.onReleaseOutside = function() {
    	stopDrag();			
    };

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    144
    thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center