dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Please HELP! AS2 Question

  1. #1
    Junior Member
    Join Date
    Jan 2004
    Posts
    9

    resolved Please HELP! AS2 Question

    Hi there!
    Im using the following bit of AS2 on a couple of mcs of my project so I would like to use the specific instance name in this:

    onClipEvent(enterFrame){
    this._x = this._x + (_root.intSlideToX this._x ) /5;
    this._y = this._y + (_root.intSlideToY this._y ) /5;
    }

    It needs to call printMC, specifically.

    Heres whats on the button:
    on (release) {
    _root.intSlideToX = 642.5
    _root.intSlideToY = -187.3
    }

    printMC is NOT on the root level but the button is.

    Any help would be wildly appreciated!

  2. #2
    flash grasshopper
    Join Date
    Feb 2005
    Posts
    156
    That isn't AS 2.0, that's AS 1.0.

    The equivalent AS 2.0 would look something like
    Code:
    this.onEnterFrame = function()
    {
    .... actions
    }
    This would go on a frame of your timeline, not on an instance of anything.

    What are you actually trying to achieve here, though? - I can't quite work it out. You want something to move when the button is clicked?

Tags for this Thread

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