A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Problem with levels i think....

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    17
    I don't know how to tell a target to play from inside a movieclip to one on the main stage. If you don't undertand me, for example in my footer, I want the rolling spike wheel to tell my energy to play(to cause damage so the energy decreases), but only if it reaches certain frame, so In that frame i put on the actions tell targer("energy") play. but a window pops up with a message that an instance name wasn't found or something similar, it only works if i put the energy inside the rolling enemy.

    Do i have to put a _root. something or what?
    Hope you understood me

  2. #2
    Owner of the thread tublu's Avatar
    Join Date
    Nov 2000
    Posts
    2,430
    yeah ,,you have to use the path and instance name properly ... easiest is to use _root.MConStagename ...or you could try climing up and then gojing down again , lol
    like using _parent._parent.MConStagename

  3. #3
    Junior Member
    Join Date
    Jan 2002
    Posts
    17
    thanx, I solved it with this
    tellTarget(/energy);

  4. #4
    Senior Member
    Join Date
    Sep 2001
    Posts
    369

    I find this helps.......

    If you're using Flash 5, the "tellTarget" command is still usable but deprecated. Another option is using the "with" command, such as this...

    with (_parent) {
    _root.loaderBar._xscale = (20);
    }
    }

    This code could be placed in a movie clip that resides on the main stage. This is an example of how you would target things on the timeline ABOVE the timeline in the movieclip (in this case, the main stage). Here, you're targeting a movieclip instance on the parent timeline called "loaderBar" and xscaling it by 20. I use this a lot for anonymous preloaders. I also use it for "mouse out" animations for buttons. The beautiful part of that type of preloader is that it simply targets whatever timeline you put the movie clip on. So you can make a lot of different movieclips and use the same preloader without having to change the code. Pretty cool.

  5. #5
    Member
    Join Date
    May 2001
    Posts
    50

    Re: I find this helps.......



    This code could be placed in a movie clip that resides on the main stage. This is an example of how you would target things on the timeline ABOVE the timeline in the movieclip (in this case, the main stage). Here, you're targeting a movieclip instance on the parent timeline called "loaderBar" and xscaling it by 20. I use this a lot for anonymous preloaders. I also use it for "mouse out" animations for buttons. The beautiful part of that type of preloader is that it simply targets whatever timeline you put the movie clip on. So you can make a lot of different movieclips and use the same preloader without having to change the code. Pretty cool.
    [/B]
    Hi,

    this is interesting code but I still don't get it 100%.
    Do you have some simple .fla example I could have a look at?
    I would really apreciate it, cause I'm still new to
    actionscript and want to learn...

    Thanks a lot.

    Oksey

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