A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: on(dragover) Help please

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

    on(dragover) Help please

    How do i use the on(dragover), becuase i am making a simple randomness game,(to start off) because i have something that you can drag, and i want to make it if you drag the thing over it it takes you to a new keyframe.
    Here is the movie clip i want to be drug on: (nothing happens)
    Code:
    on(dragOver) {
    	gotoAndStop(3)
    }
    Heres the code that you can drag the item(works)
    Code:
    on(press) {
    	startDrag(this)
    }
    on(release) {
    	stopDrag()
    }
    Also, i got music playing, and it only plays once, if i change
    Code:
    Play.onRelease = function() {
    	mix1.play();
    }
    To
    Code:
    Play.onRelease = function() {
    	mix1.loop();
    }
    will it loop?

  2. #2
    Member
    Join Date
    Apr 2009
    Posts
    62
    For the sound, shouldn't you change your function to look like this?
    PHP Code:
    Play.onRelease = function() {
        
    mix1.start();

    Then add this function to the same frame is your existing sound code
    PHP Code:
    mix1.onSoundComplete = function() {
        
    mix1.start();
    }; 
    Also there is a good tutorial on droptargets over on Kirupa.
    Check out my firefox theme "PacStrata" here

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