A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: [Resolved] [Resolved] [Resolved] Audio buffer-- Problems

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    this is killing me.. It is probably something super simple and I am missing it. I get the "a script in your movie is making the flash player run slowly. do you want to abort this script."

    I have a bout 60 audio clips that i am loading in when i neeed them. Not as staright mp3s but as swf's. they are all different lengths and I want them to buffer for a bit before they play (they are set to stream btw). they all have a loop at the begining with the following code. It works fine on my computer but not on the web, or when i view as streaming in test movie.


    // How much is loaded

    _root.cStatus = "buffering";
    goPoint = 30;

    if (Math.abs(this._totalframes/this._framesloaded)<=goPoint) {
    this.gotoAndPlay("audio", "start");
    } else {
    this.nextFrame();
    }


    what is going wrong here? Suggestions on how to make it work? any help is greatly appreciated.

  2. #2
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    anyone?

    *feels cold and alone as tumble weed blows by*
    *bump*

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    Hello? Could this have something to do with the bug (sorry about the dirty word bit 101) in the flash 6 player, and the streaming sounds. I just don't understand why such simple code would freeze my flash player. Could someone just let me know if the code will not work? I have tried all variations... even going back to ifframeloaded.

    I'm tearing my hair out here.

  4. #4
    Junior Member
    Join Date
    Apr 2002
    Posts
    24

  5. #5
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    sub

  6. #6
    flashing since v3
    Join Date
    Jan 2002
    Posts
    401
    it might be because of that retarded streaming issue?

  7. #7
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    Here is a new FLA crossposted with my other thread.

    I re-wrote it, and made it self sufficient. Check out the trace items in the first frame and follow the directions.
    -add some audio to the second frame in the audio scene (labelled "add audio here")

    http://www.mediasink.com/work/nobutt.fla

    I left the button in because it helps to illustrate the problem, but added the trace actions you requested.


    Someone please give me an answer to why this is happening.

  8. #8
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    BTW: previous conversation here
    in the new streaming problems thread
    http://board.flashkit.com/board/show...86#post1635786

  9. #9
    Senior Member
    Join Date
    Feb 2001
    Posts
    1,835
    Hi,

    I read all the discussion on the streaming thread - I'm pretty sure that this is a coding issue though. I don't have Flash MX, so can't test it but here are my thoughts.

    First off - nextFrame() and prevFrame() will do a 'gotoAndStop' - this isn't what you want, you need to use 'gotoAndPlay' - otherwise the swf will stop executing and will exhibit exactly the behaviour that you seem to be getting - ie. stopping although it should theoretically carry on.

    So, use 'gotoAndPlay(frameLabel)' and 'gotoAndPlay(_currentframe - 1)' instead.

    further: you don't have to use 'else{this.nextFrame()}'. Apart from the problem mentioned above, the swf will automatically play the next frame, you don't have to program that.

    one more: this._totalframes/this._framesloaded is always positive, so you don't need 'Math.abs'.

    give those a try...

    - n.


  10. #10
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    Yes I figured this out in all of my brilliance. Foot goes into mouth.

    I formely appologize to anyone who spent any time on this. Thank you for your reply.

  11. #11
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    does this mean you got it working?

    mike chambers

    [email protected]

  12. #12
    Junior Member
    Join Date
    Apr 2002
    Posts
    24
    Yes I did. Again, I am very sorry for any waste of time.

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