A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: go to and play (expression) ?

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Posts
    7
    ok, it's late, i'm tired, but this should work, right?

    > i've got a variable set from another MC named goHere that contains a frame label
    > another MC tells the main timeline to play a frame called 'changeFrame'
    > there's one action in changeFrame: Go To and Play(goHere)

    shouldn't the variable resolve as the label name? i've tried everything but it t'ain't be workin', it just passes over the script. i've put a trace in there and it resolves the variable correctly, so wazzaaaaahh?

    any help great appreciated. i can provide the .fla if need be.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    263
    spaceGhost,

    With what you said, it should work. So I
    am going to have to make a guess.

    The targeting to the variable is probably wrong.
    Was it set on level0 or in the second mc.

    If set on level0 and accessed from a frame on
    level0 it should work. But if set on the second mc
    it needs to be

    Go To and Play(/another mc:goHere)

    or if you are trying to have the second mc
    go to (goHere) you would have to use a tell target

    Begin Tell Target ("/another mc")
    Go to and Play (goHere)
    End Tell Target



    Hope this helps.
    MA

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Posts
    7

    take a look at the FLA

    MA,

    hm, tried a buncha things and i think if you take a look at the .fla you'll see what's up here.

    http://www.quantumlight.com/flashkit/fk.zip

    there's a dynamically built menu that's trying to tell the main timeline to play the frame that creates the News submenu.

    on(release) of the button sets the goHere variable in the main timeline, then says to the main timeline (_level0) to go and play "changeFrame"

    changeFrame is supposed to pick up the goHere variable and send the movie in the right direction.

    in changeFrame, the traces are resolving the expression 'goHere' but the goto and play(goHere) won't function.

    i'm beside myself. if you could work your magic in this case i'd be most grateful.

    thanks in advance!

    ~Ian

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Posts
    2,235
    Seemingly (correct me if I'm wrong) you are Tell Targeting from 'Button' as if it was a mc in a mc, but it seems to only involve going from the button mc straight to the main timeline so ..: and ../ should be : and /

    No?

  5. #5
    Junior Member
    Join Date
    Oct 2000
    Posts
    7
    well, the button is in a MC... all the buttons are built dynamically with 'duplicate movie', so i'm wondering if there's some weird stuff going on with levels, etc.

    take a look at the .fla, any ideas would be appreciated. i've been going nuts with it...

    thx

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Posts
    2,235
    I don't think duplicated movies carry over actions...I'm nearly sure they don't...

  7. #7
    Junior Member
    Join Date
    Oct 2000
    Posts
    7
    the button is passing a variable to the main timeline, like this:

    on(release)
    set variable "../:goHere" = theURL //from text
    begin tell target (../) //main timeline
    go to an play ("changeFrame")
    end tell target
    end on

    changeFrame, picks up the variable OK, because i've traced it. but the goto and play right after the trace isn't resolving the variable.

    if you check out the .fla you'll see what i mean

  8. #8
    Senior Member
    Join Date
    Aug 2000
    Posts
    2,235
    Ok a few questions. The goHere var is displaying a javasctipt function: launchwindow...I understood that the change frame is supposed to read the var and go to another part of the movie based on the expression in the goHere variable? Where are you supposed to go from the changeFrame action? Another part of the movie? I don't see how this can be if the variable is displaying a url.

  9. #9
    Junior Member
    Join Date
    Oct 2000
    Posts
    7
    oh, sorry about that... ignore the javascript: stuff, that's from something else. i'm working with the News button (i hadn't changed the other items in the list, my apologies)

    this is a work in progress. i'm changing things around so that the locations are kept within Flash, rather than launching new windows...

    i've been testing the scripts with the news button, building the news submenu dynamically.

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