A Flash Developer Resource Site

Page 1 of 3 123 LastLast
Results 1 to 20 of 56

Thread: Bring To Front

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    Im sorry flashkit but i was just wondering what it took to get people viewing my threads.

    anyway now you're here how do you bring an mc to the front via actionscript? I need it so that with the click of a button it brings a designated mc to the front and leaves the others in the background.

    This is a new edit so the following replies are not relevant to this post.
    [Edited by ferretneck on 05-21-2002 at 09:58 AM]

  2. #2
    Junior Member
    Join Date
    Sep 2001
    Posts
    24
    how's this:

    on(release) {
    unloadMovie(_level15);
    //unload a movie from level 15
    loadMovieNum ("MC.swf", 15)
    //...and then load another movie into the same level.
    }

    unless of course you're wanting to do something more dynamic, in which case you'd want the script to use variables instead of hard-coded movie clip names and levels.

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    what i need to do is swap a movieclip within the same movie - as in instances/symbols. is this possible?

    the situation is that i have a movie with a sound playing. the only feasible way of being able to switch the sound on and off is to swap the symbol with an identical one - with no sound. this means that to turn the sound back on i only need to swap the instance back.

  4. #4
    FK Doubt Killer hufersil's Avatar
    Join Date
    Apr 2001
    Location
    São Paulo, Brazil
    Posts
    186
    hi

    use the swapDepths() statement
    like this:

    myMovieClip.swapDepths(depth)


    I hope this helps

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    will this stop the movie clip from playing or will it still play in the background?

  6. #6
    Ximensions.com Sul's Avatar
    Join Date
    Oct 2000
    Location
    UK
    Posts
    423
    lol - u got my attention, not cos I'm a pervert, but cos I found it unusual, and thought there would be a an alternative motive to it. But I'm sure you don't have to go that far to get people to help you!

  7. #7
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    just having troubles making my subjects interesting enough for people to view my threads. any tips?

  8. #8
    Ximensions.com Sul's Avatar
    Join Date
    Oct 2000
    Location
    UK
    Posts
    423
    I think for a title, the following works:

    -Making it short
    -Descriptive of what the thread is about
    -Use interesting words, puns, etc if you really have to (not necessary though)
    -Make it stand out somehow, use your imagination (like you did with this thread!)


  9. #9
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    thats all very well, however I still havent got a solution to me problem! doh!

    nevermind - looks like too everybodys too interested in sex with flash...

  10. #10
    Senior Member
    Join Date
    Mar 2001
    Posts
    246
    Originally posted by ferretneck
    what i need to do is swap a movieclip within the same movie - as in instances/symbols. is this possible?

    the situation is that i have a movie with a sound playing. the only feasible way of being able to switch the sound on and off is to swap the symbol with an identical one - with no sound. this means that to turn the sound back on i only need to swap the instance back.
    It is possible with the use of attachMovie. I must admit that to me it seems like an overly complicated way to turn on and off sound.

    To be able to change between two symbols you have to initially set it up with attachmovie:
    //from the root:
    this.attachMovie("sound_on","somename",1);
    The symbol defaults to the upper left corner of the swf so you might want to set _x and _y.

    And then use this on a button:
    on (release) {
    this.attachMovie("sound_off","somename",1);
    }

    If possible it would be easier to do something like placing the two symbols in consecutive frames in a movieclip and then just using
    someclip.prevFrame();
    and
    someclip.nextFrame();
    to swap between the two.

    hope this helps,
    hc

  11. #11
    Senior Member
    Join Date
    Mar 2001
    Posts
    384
    why dont you use the sound object? you can control individual sounds without doing anything to your movie clip.
    another way to deal with this- set the sound in the mc(s) to stream, make as many frames as it takes for the whole sound clip. then, when you tell the clip to stop, the sound will stop playing as well.

    sex with flash... I havent seen that topic covered in any of the actionscript references- for help with this please see your local mental health professional.

  12. #12
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    cool man, the load and unload movie worked fine.

    oh and i consulted my mental health physician and he said that a getSex action will be assigned in flash 6 so keep your eyes peeled!

  13. #13
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    is there a way of dragging a masked object without it dragging the background with it?

  14. #14
    Junior Member
    Join Date
    Feb 2001
    Posts
    7

    resolved Nice subject

    When I saw this subject, I thought: "Oh my God, how this guy do dis? Sex with Flash? How Action had he used?

    Very subject. Sometimes we need to use our creativity. Your message is one of the most viewed that this forum.

  15. #15
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    Well it seems the best thing to do with this thread is to attempt a world record for the most views!

    If you are reading this please post a reply to keep the thread alive!

  16. #16
    FK Doubt Killer hufersil's Avatar
    Join Date
    Apr 2001
    Location
    São Paulo, Brazil
    Posts
    186



    Nice thread!

  17. #17
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    It is a very successful thread, but it seems no-one wants to play the record breaking number of views game.

    Keep replying!

  18. #18
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    x_num-y_num

  19. #19
    Member
    Join Date
    Mar 2001
    Location
    Lisbon, Portugal
    Posts
    64

    Smile

    hehehe, u really got my attention...

    do u tryied the stopAllSounds ();
    i never had to uset it but makes sense to me.

    good luck

  20. #20
    Senior Member
    Join Date
    Jul 2001
    Posts
    106
    i tried the stop sounds but there is no way of starting them again!

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