A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: my tell target is not doing what i'm telling him to

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    42
    Hello too all,

    I've come for hepl on a problem that passes my understanding...

    So, my animation starts with a laoding section on scene one, when the last frame of scene two is loaded, I go to and play scene 2 frame 1...

    On that scene I have a movie clip on frame 1, 2 ,3,4,5 and 6... So i've got buttons on the movie clip wich i son frame 1 of scen 2...

    As you press on it you're suppose to go to scene 2, frame 2...
    This is the code I wrote down the button....


    on (release) {
    tellTarget ("../") {
    gotoAndPlay ("Scene 2", 3);
    }
    }


    so I thought It's suppose to go to scene 2 frame 3, but it goes to scene1 frame 3.... Does anyone know ???

    Should I name my movie clip....And tell target him....and if so, where do I name my movie clip ???

    Thanks for all the info given to me....
    Have a nice chat people.... Peace...
    Pepe

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    1,180
    Hi..
    From a button inside a MC use '_root':

    on (release) {
    _root.goToAndPlay(3);
    }

    Or using your example:

    on (release) {
    tellTarget ("_root") {
    gotoAndPlay (3);
    }
    }

    Hope this helps.

    PS: Theres no need to target scene 2 as your already in it.

  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    42
    well too all, I found a solution....


    If anubody wants to know, I created a frame label, on each frame on my animation...

    on (release) {
    tellTarget ("../") {
    gotoAndPlay ("Scene 2", "etap3");
    }
    }


    I replace the frame number 3 by a frame label, called etap3, but it still seems weird........


  4. #4
    Aquarium drinker
    Join Date
    Nov 2000
    Location
    Greater than 45 degrees in Minkowski space
    Posts
    571
    Hi there,

    I think you have a problem understanding the purpose of a tellTarget(). You see, each one of your movie clips has a separate timeline, and a separate play head. What this means is that you can control each one of these playheads separately. An example of the use of a tellTarget() action would be an animation on rollover of a button and another on rollout. The code for this would be:

    on (rollOver){
    tellTarget('/rollInOrOutAnimation'){
    gotoAndPlay('theRollInFrame')
    }
    }
    on (rollOut){
    tellTarget('/rollInOrOutAnimation'){
    gotoAndPlay('theRollOutFrame')
    }
    }

    You would have to name your MC inside the instance properties panel. And you would have to add frame labels inside your Movie Clip using the Frame properties panel.

    Now for your problem, I think using this will do:

    on (release) {
    nextFrame();
    }

    In this case, you're trying to move the playhead of the main timeline, not of a movie clip, so you don't need a tellTarget() action.

    Hope this helps.

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