A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: StartDrag...More Problems

  1. #1
    Confused
    Join Date
    Dec 2000
    Location
    Boston
    Posts
    31
    It seems that when I use the StartDrag Action, I am not able to use the with function to play movie clips controlled by a button...

    FOR EXAMPLE:

    on (rollOver) {
    with (instance) {
    gotoAndPlay (1);
    }
    }

    Any suggestions would be great...

    Thanks!

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi...
    The following script uses the 'with' action and the 'drag' action in the same script:

    on (rollOver) {
    startDrag (_root.myMovie, true);
    with (_root.myMovie) {
    gotoAndPlay (1);
    }
    }
    on (release) {
    stopDrag ();
    }

    Hope this helps.

  3. #3
    Junior Member
    Join Date
    Feb 2001
    Posts
    10
    Originally posted by Marx
    Hi...
    The following script uses the 'with' action and the 'drag' action in the same script:

    on (rollOver) {
    startDrag (_root.myMovie, true);
    with (_root.myMovie) {
    gotoAndPlay (1);
    }
    }
    on (release) {
    stopDrag ();
    }

    Hope this helps.
    ___________
    What does _root.myMovie stand here for?

    Mazhar
    http://www.deadlyzone.com

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi...

    '_root.myMovie' is the absolute target path to a movie clip symbol on my stage. The relative path would be 'myMovie'.
    The term '_root' refers to the main movie's timeline. You can target the main timeline from within any movie, however deep, by attaching '_root' at the begining of your path.

    Good luck.

  5. #5
    Confused
    Join Date
    Dec 2000
    Location
    Boston
    Posts
    31

    well...

    Not exactly what I was looking for. Sorry about that, i'll try to be more clear. Ok, I have 4 buttons for my navigation, these buttons are all animated so that when you roll over them, a movie clip plays on top of them...Right?

    So when I added a StartDrag action to a movie clip, which was a pair of eyes that looked at your mouse the whole time. So when I got the eyes to follow the mouse, I tried the navigation again, and none of the movies played! Should I try putting _root. infront of EVERY INSTANCE that I use?

    Keep those suggestions comming!

    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