A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: My head hurts

  1. #1
    Try This...
    Join Date
    Mar 2004
    Location
    CA
    Posts
    80

    My head hurts

    If this looks right or wrong any help would be appreciated. I have no Idea where I went wrong..


    code:

    on (release) {
    if (playing == undefined or playing == false) {
    music = new Sound(this);
    music.loadSound(tracks.firstChild.childNodes[nodeNum].attributes.path);
    title = tracks.firstChild.childNodes[nodeNum].attributes.name;
    if (pause == true) {
    pausePos = ((slider.dragger._x/100)*music.duration)/1000;
    music.start(pausePos, 0);
    pause = false;
    } else {
    music.start(0, 0);
    }
    playing = true;
    gotoAndPlay(2);
    }
    }


  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    Hello,

    It would help if you told us

    a) What it is you are trying to accomplish.

    b) What's going wrong (how the behavior of this script differs from what you want).

    I assume this has something to do with stopping and starting a sound, but I may be missing some subtleties...

    I did notice you are never setting the pause variable to true, which means your pause toggle switch won't work as you expect.

    code:

    if (pause == true) {
    pausePos = ((slider.dragger._x/100)*music.duration)/1000;
    music.start(pausePos, 0);
    pause = false;
    } else {
    music.start(0, 0);
    pause = true; // ADD THIS LINE
    }



    - Jim
    Last edited by jbum; 12-09-2004 at 08:52 PM.

  3. #3
    Try This...
    Join Date
    Mar 2004
    Location
    CA
    Posts
    80
    Here is the FLA, whats happening is when you enter the site the music player comes up. When you press play you can see the slider move like one pixel then stop. but if you forward the next song same thing happens, go back one song and all of a sudden it works. AAAARGGGG

    http://ryan.lod-squared.net/

    to see what happens click link above


    Thanks In Advance
    Attached Files Attached Files

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Unexpected file format! Can't open your .fla.
    You'd have a better chance of getting an answer if your .fla was in a MX only format.

    You would have to save a copy of your MX2004 .fla, (using Save as...) and changing the Document type to MX only in the Save as... window.

  5. #5
    Try This...
    Join Date
    Mar 2004
    Location
    CA
    Posts
    80
    here ya go

    Thanks Again
    Attached Files Attached Files

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Need your XML.

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