Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 5 of 5
  1. #1

    Default scroller problems

    yeah I'm have a problem with the scripting of this button this is the code I put in

    on (press){
    startDrag("_root.scroll_box.bar",true, 186.6, 0, 186.6, 104.3);
    }

    now the problem is that when I click the button to scroll down it will move , but as soon as I click it seem to lock on the mouse so when i move the mouse without clicking on the scroller it move but only up and down not sideways .So I know It needs something else to tell the button to move only when I tell it to or click on it. if some can help me out. Oh by the way it's on flash 8 and the code is like from flash 6 so that migh be the problem . if anyone can help thanks i advance.

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    It sounds as though you just need to add a stopDrag command on a release event...

    on(release){
    stopDrag();
    }

    The second startDrag parameter is what locks the object to the mouse if set to true....

    startDrag parameters...

    target:Object - The target path of the movie clip to drag.

    lock:Boolean [optional] - A Boolean value specifying whether the draggable movie clip is locked to the center of the mouse position (true ) or locked to the point where the user first clicked the movie clip (false ).

    left,top,right,bottom:Number [optional] - Values relative to the coordinates of the movie clip's parent that specify a constraint rectangle for the movie clip.
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

  4. #3

    Default

    Quote Originally Posted by NTD
    Hi,

    It sounds as though you just need to add a stopDrag command on a release event...

    on(release){
    stopDrag();
    }

    The second startDrag parameter is what locks the object to the mouse if set to true....

    startDrag parameters...

    target:Object - The target path of the movie clip to drag.

    lock:Boolean [optional] - A Boolean value specifying whether the draggable movie clip is locked to the center of the mouse position (true ) or locked to the point where the user first clicked the movie clip (false ).

    left,top,right,bottom:Number [optional] - Values relative to the coordinates of the movie clip's parent that specify a constraint rectangle for the movie clip.

    that's sounds like the problem I'll try and wll se what happens

  5. #4

    Default

    ok so I tried that and got an error and another I ready hur what you said on the botom and didn't understand it I know there things I can put but where thanks again.

  6. #5
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    The parameters at the bottom of my post are for the startDrag method....

    startDrag(target,lock,left,top,right,bottom);

    startDrag("_root.scroll_box.bar",true, 186.6, 0, 186.6, 104.3);
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Scroller tutorial problem
    By wayne1976 in forum General Flash
    Replies: 0
    Last Post: 09-25-2006, 07:43 PM
  2. Horizontal image scroller
    By ssr in forum Newbies
    Replies: 0
    Last Post: 02-28-2006, 08:35 AM
  3. Picture scroller problem
    By nbsbasketcase in forum General Flash
    Replies: 3
    Last Post: 07-17-2005, 02:55 PM
  4. URL Problems
    By liqidhed in forum General Flash
    Replies: 1
    Last Post: 06-24-2005, 02:15 AM
  5. loadVars() Problems
    By dfmes in forum Flash Scripting
    Replies: 2
    Last Post: 12-14-2004, 11:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial