dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Go to and play scene 1

  1. #1
    Senior Member
    Join Date
    Aug 2000
    Posts
    343

    Go to and play scene 1

    Hi
    I have a movie (call it "B") within a movie (call it A)... I would like a button within movie "B" to go and play frame 1 of movie "A"...

    I tried this

    Code:
    on(release) {
    	gotoAndPlay(1);
    }
    but that plays frame 1 from movie "B"... anyway to modify that code so that instead of playing frame 1 of movie "B" it plays frame 1 of movie "A"

    Thanks
    Losse

  2. #2
    Junior Member
    Join Date
    Feb 2009
    Location
    Perth, Australia
    Posts
    10
    wow so close or that was wrong is you have to put a _root in front of it

    on(release) {
    _root.gotoAndPlay(1);
    }

    that should work now if not reply back

  3. #3
    |-'|-'|
    Join Date
    Jan 2006
    Posts
    273
    well, first you need to know where "A" is. If it is not on _root but on the same level, then
    Code:
    _parent.A.gotoAndStop(1);
    but if it is on _root, then
    Code:
    _root.A.gotoAndStop(1);
    or if "A" is within "B" then
    Code:
    A.gotoAndStop(1);
    should suffice.

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Posts
    343
    Sorry... I should have mentioned that movie A is actually the main timeline... I think that makes a difference?
    Losse

  5. #5
    |-'|-'|
    Join Date
    Jan 2006
    Posts
    273
    in that case just do what Codable wrote.

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