A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Volume w/ mouse position

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    3

    Volume w/ mouse position

    Ok, I'm really new to flash - so I'll be grateful for any help on this.

    I basically have a movie that when the mouse goes over, the movie follows. However I've restricted it to only move up and down when my mouse goes over it. I want it so that when the mouse is dragged higher, the higher the sound goes, and when it is brought down lower, it get's quieter.

    This was my attempt but it f***ed up the graphics for some reason:

    soundone = new Sound();
    soundone.attachSound("soundone");
    soundone.start()

    top = beforestate2._y-50;
    bottom = beforestate2._y+50;
    left = beforestate2._x;
    right = beforestate2._x;
    center = beforestate2._x;


    this.onEnterFrame = function() {
    _root.volposition.text = _root.one.beforestate.soundone.getVolume();
    var yMouse = _root._ymouse;
    soundone.setVolume((_y-bottom)*2);
    if(Math.abs(xMouse - this._x) < 2) {
    this._y = yMouse;
    } else {
    this._y -= (this._y-yMouse) / 6;
    }

    }

    I've been trying this for a long time with no luck. Any help is appreciated!

    Thanks, andifall.

  2. #2
    Junior Member
    Join Date
    Dec 2009
    Posts
    3
    anyone?

  3. #3

  4. #4
    Junior Member
    Join Date
    Jul 2010
    Posts
    3
    Quote Originally Posted by koenahn View Post
    I do not open this link

  5. #5
    Senior Member
    Join Date
    Mar 2010
    Posts
    157
    If you don't trust the link, just google the site (www.tutvid.com) and it Will appear, meaning it's safe. I only once bumped into a not so safe site via google, and that was the pirate bay, a very well-known game-torrent site if i'm right. if you still don't believe me, just go check out tutvid's youtube channel. he has flash tutorials. the link is safe. if the domain is safe, surely why would he put a virus in a subdomain? nobody would. trusting tutvid therefore means trusting the link, and tutvid is Safe. just ask google and its little baby brother youtube.

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