A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Fast Forward/Rewind

  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    18
    Flash MX
    The buttons and this script are in the main timeline:
    **fire is a movie clip within this timeline that houses the sound object, fireSong. revButton and ffButton are instance names for my rewind button and ffButton,respectively.**

    Code:
    this.onEnterFrame = function () {
    if (REV==1 && fireSongPosition>0) {
    	fire.fireSong.stop();
    	fireSongPosition=fireSongPosition-.5;
    	fire.fireSong.start(fireSongPosition,0);
    	}
    revButton.onPress = function () {
    	REV=1;
    	fireSongPosition=fire.fireSong.position/1000;
    
    }
    revButton.onRelease = function () {
    	REV=0
    }
    
    if (FF==1 && fire.fireSong.position<fire.fireSong.duration) {
    		fire.fireSong.stop();
    		fireSongPosition=fireSongPosition+.5;
    		fire.fireSong.start(fireSongPosition,0);
    	}
    ffButton.onPress = function () {
    	FF=1;
    	fireSongPosition=fire.fireSong.position/1000;
    }
    ffButton.onRelease = function () {
    	FF=0
    }
    
    }
    I cant see any problems but the buttons are not rewinding or fast forwarding
    [Edited by Sinister67 on 09-14-2002 at 02:02 PM]

  2. #2
    Aye sir I_am_Tarzan's Avatar
    Join Date
    Jul 2002
    Location
    Location: Location: Locations?:
    Posts
    489
    use the cc coding
    Code:
    this.onEnterFrame = function () { 
    if (REV==1 && fireSongPosition>0) { 
    fire.fireSong.stop(); 
    fireSongPosition=fireSongPosition-.5; 
    fire.fireSong.start(fireSongPosition,0); 
    } 
    revButton.onPress = function () { 
    REV=1; 
    fireSongPosition=fire.fireSong.position/1000; 
    
    } 
    revButton.onRelease = function () { 
    REV=0 
    } 
    
    if (FF==1 && fire.fireSong.position<fire.fireSong.duration) { 
    fire.fireSong.stop(); 
    fireSongPosition=fireSongPosition+.5; 
    fire.fireSong.start(fireSongPosition,0); 
    } 
    ffButton.onPress = function () { 
    FF=1; 
    fireSongPosition=fire.fireSong.position/1000; 
    } 
    ffButton.onRelease = function () { 
    FF=0 
    } 
    
    }
    And what might be the problem ?

  3. #3
    Junior Member
    Join Date
    Dec 2001
    Posts
    18
    The problem is that the fast forward and rewind does not work

  4. #4
    Junior Member
    Join Date
    Jan 2003
    Posts
    4
    I don't get the point here.

    DOES IT WORK or NOT?

    I am trying to forward and rewind a streaming sound myself... Haven't succeded yet (which is what brought me here) but these posts are not making much sense to me...

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