A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: What is the equivalent code to tellTarget?

  1. #1
    Senior Member
    Join Date
    Mar 2001
    Posts
    269

    Unhappy

    I've got the follwoing code:

    tellTarget (_root.frontPage)
    {
    gotoAndStop ("lastFrame");
    loadMovie ("test.swf", "dummyMovie");
    }

    Now... I've tried replacing this with:

    _root.frontPage.gotoAndStop("lastFrame");
    _root.frontPage.loadMovie("test.swf", "dummyMovie");

    I thought this 'should' have the same effect as that of the first bit of code... but apparently not?
    What I want to do is load a movie over a dummy movie (existing in a movie on the main timeline). Now, it just so happens that my dummy movie only exists on a specific frame - hence, I have to instruct it to go to the frame before I load it.

    I've also tried:

    _root.frontPage.gotoAndStop("lastFrame").loadMovie ("test.swf", "dummyMovie");

    That doesn't work either.
    [OK... so I was in Java mode!] : )

    Does all that make sense?
    If anyone can figure out what I'm saying... and can give the equivalent code... I'd really appreciate it.

    Thanks.


    Jam

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    London
    Posts
    961
    I think you have the right code but...

    _root.frontPage.gotoAndStop("lastFrame");
    _root.frontPage.loadMovie("test.swf", "dummyMovie");


    ... although you are telling the movie clip to go to a specific frame, because you are then instantly loading a movie, Flash has not yet had time to go to the next frame.

    You could try:

    _root.frontPage.loadmovie = "test.swf"
    _root.frontPage.gotoAndStop("lastFrame");

    Then in the correct frame of the frontPage movie clip put the action:

    If (loadmovie ne "")
    loadMovie(loadmovie, "dummyMovie");
    End If

    This checks to see if the loadmovie variable exists and if it does it loads that movie.

    Try it.

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