dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: dynamic even handlers

  1. #1
    Member
    Join Date
    May 2004
    Posts
    33

    dynamic even handlers

    hi

    i took a little tutorial on dynamic event handlers but for some reason its not working with me heres the code exactly like in the

    tutorial :
    Code:
    goRight=function()
    {
    if (square._x<300) square._x+=5;
    else square.onEnterFrame=goUp;
    }
    
    goUp=function()
    {
    if(square._y>300) square._y-=5;
    else square.onEnterFrame=goLeft;
    }
    goLeft=function()
    {
    if(square._x>100) square._x-=5;
    else square.onEnterFrame=null;
    }
    i understand you have to place the code on the frame and not on the MC
    my mc's instance name is 'square' i use mx 2004

    ps im thinking of buying a book on ac and currently im thinking
    of buying sitepoints flash anthology for actionscript anyone
    have it ? i need a book that will enable me to create my own
    scripts in time

  2. #2
    Member
    Join Date
    May 2004
    Posts
    33
    anyone??

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