dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: LoadMovie: Loaded swf w/ sound not working

  1. #1
    Member
    Join Date
    Jun 2001
    Posts
    31

    LoadMovie: Loaded swf w/ sound not working

    Hello,

    I've spent 2 days combing thousands of threads and after several million attempts, I'm stuck on this.

    I have simple play-stop button loop player, loading into my main movie. The player movie loads fine on its own, however loaded into the movie in an MC the buttons aren't functional.

    I did come across the script here that noted how to include a 'this' in the line my_sound = new Sound(this); and I finally got the sound loading in the main movie, but the buttons are still not linking to each stop and play position.

    I know this problem lies within the player code, howver after bleeding my brain for a few days I'm stuck.

    My code for the player movie:


    my_sound = new Sound(this);
    my_sound.attachSound("sundancer");
    my_sound.start(0,1000);
    gotoAndStop("stop");


    For each button:


    on (release) {
    _root.my_sound.start(0,1000);
    _root.gotoAndStop("stop");
    }

    on (release) {
    _root.my_sound.stop();
    _root.gotoAndStop("play");
    }


    I did try using _parent with no success, so this is what I've been working with originally. My code for the main movie w/empty MC:

    this.createEmptyMovieClip("loop_player", 5);
    loop_player.loadMovie("loop_player.swf", "loop_player");
    loop_player._x = 100;
    loop_player._y = 100;


    I know someone here can help me!

    many thanks in advance
    claude coleman jr.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Attach your .flas zipped up and in a MX only format, not MX2004.

    You'd have a better chance of getting an answer if your .fla was in a MX only format, and zipped up.

    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.

    You can even delete your sound file before using Save As..., it will reduce the file's size, and I can use my own sound to test it out.

  3. #3
    Member
    Join Date
    Jun 2001
    Posts
    31

    Got it...

    Thanks so much oldnewbie

    I solved my issue:

    I changed the script for the buttons in the player swf to the path name of the MC it was being loaded into - loop_player - being the residing MC:

    on (release) {
    _root.loop_player.my_sound.start(0,1000);
    _root.loop_player.gotoAndStop("stop");
    }

    Works! Don't know if this is the regular fix for this, but thorough testing shows it to be functional and fine.

    thnx again
    claude

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    In that case it probably doesn't work in the player .swf itself anymore, but it is one way of doing it... Not the best, but it works.

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