1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

actionscript 2

Discussion in 'Web Design & Development' started by ian macwiliam, Apr 2, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
    panel.onRollOver = panelOver;
    function panelOver(){
    this.onEnterFrame = scrollPanel;
    delete this.onRollOver;
    }
    var b = stroke.getBounds(_root);
    function scrollPanel(){
    if(_xmouseb.xMax ||_ymouseb.yMax){
    this.onRollOver = panelOver;
    delete this.onEnterFrame;
    }
    if(panel._x>=-15){
    panel._x-15;
    }
    if(panel._x<=-640){
    panel._x = -640;
    }
    var xdist = _xmouse-250;
    panel._x +=Math.round(-xdist/7);
    }

    This is the code(above)
    what im trying to do is make a navigation bar where theres a little window when you move the mouse to the right the buttons move automatically to the left,untill the last picture comes up then they stop moving,which works fine. But when i move to the left it doesnt stop at the last button it carrys on.
    the link to the website is http://www.flashfridge.com/tutorial.asp?ID=204 and i think there is a line in the code missing but im not sure(this isnt my website its a tutorials site but if you look at it this is what mine is suppost to do. Any help would be greatful. Thanks
     
  2. Grob needs help

    Grob needs help

    Joined:
    Mar 3, 2009
    Messages:
    327
    i have just been to your site and i got this error code
    Microsoft JET Database Engine error '80040e09'
    Cannot update. Database or object is read-only.
    /tutorial.asp, line 104
    this may be unrelated i don't know
     
  3. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
    no it isnt my website i am learning actionscript and i use this site for ideas.where u can see that it moves from side to side and when it gets to the end it stops (on the website).
    i have tried to duplicate it using the actionscrpt on the page but mine, when the pictures move left and the last picture comes into view stops.but when it moves right and the last picture on the left keeps going.
     
  4. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
  5. Grob needs help

    Grob needs help

    Joined:
    Mar 3, 2009
    Messages:
    327
    i don't understand this bit
    panel._x +=Math.round(-xdist/7);

    should the + be there, this could be the problem or it might not
     
  6. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
    i took out the " + " and tried it but it wouldnt scroll much either way if you look at the website
    ianmacwilliam.site88.net
    the top version has the original code.
    The bottom version has the " + " taken out.
    as you can see it moves only a little in the bottom version.
     
  7. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
    As im learning actionscript 2 i dont understand most of it. I know a little as ive done some programming in BASIC, a few years ago when i had the Amiga.
    As you can see in the top one it move to the left and stops at the last picture but when you move the bar to the right the picture keeps going and doesnt stop on the last picture.
     
  8. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
    Also how do it stop it scrolling when my mouse leaves the panel it just keeps scrolling.
     
  9. ian macwiliam

    ian macwiliam Thread Starter

    Joined:
    Mar 21, 2009
    Messages:
    30
    ive uploaded the file for u to browse thanks
     

    Attached Files:

  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/914299

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice