A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: onSoundComplete from _level1

  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    24

    onSoundComplete from _level1

    Hi All,
    I have a main movie (_root) which loads an external swf file on level1.
    The external swf file plays an external mp3 via a soundObject.
    When the track ends I want my buttons to reset in the main movie.
    I am trying to achieve this with the onSoundComplete command:

    myMusic.onSoundComplete = function() {
    _root.container.au_MC2.bplay1.gotoAndStop(5);
    _root.container.au_MC2.bplay1.enabled = true;
    _root.container.au_MC2.bplay1.useHandCursor = true;
    _root.container.au_MC2.stop1._visible = false;

    I've put this code in the external swf (which is loaded in level1)

    Bit it isn't working!?
    _level1 or _parent instead of _root isn't working either.

    Can anyone help me out..please?

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    The main movie's timeline is on _level0 and not _root, when targeting the main timeline from a movie loaded on a level.

    Try _level0!

    Simple... Working with levels, main movie is _level0.
    Working with container clips, main movie is _root.

  3. #3
    Junior Member
    Join Date
    May 2004
    Posts
    24
    sorry Old Newbie, my mistake...I mistyped that.
    I meant _level0 instead of _level1 in the last sentence

    But anyway that isn't working either..

    other ideas?

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

    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
    Junior Member
    Join Date
    May 2004
    Posts
    24
    Ok got that solved.
    I was loading this external swf from the server, while playing the main movie locally on the PC. Once I had them both on the same location and offcourse adapting the link to that it was working.

    This makes sence offcourse. The externally loaded swf is still on a different location - in this case my PC - and therefor cannot target the main movie.

    But thanx again for fast replies old newbie!

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    So did _level0 do the trick, once you had sorted that out?

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