Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member DesignBox's Avatar
    Join Date
    Apr 2004
    Posts
    340
    Member #
    5659
    I have created a movie clip where all my buttons are, now, I want to click on one of the buttons and go outside the movie clip and play a frame that is on the main scene, how do i do this using ActionScript? Is it something with _parent or _root? What command should i use?


    I tried this:
    on (release) {
    gotoAndPlay("Scene 1", 15);
    }

    but it doesn't work, and i also tried

    on (release) {
    gotoAndPlay("Scene 1", "frame label");
    }

    but it still didn't work

  2.  

  3. #2
    Senior Member DesignBox's Avatar
    Join Date
    Apr 2004
    Posts
    340
    Member #
    5659
    Never mind, after many hours of searching and thinking about giving up flash I found it

    on (release) {
    _parent.gotoAndPlay( "frame_label");
    }

  4. #3
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    Welcome to the forums. Thanks for posting your answer.

  5. #4
    Member alingham's Avatar
    Join Date
    Apr 2004
    Posts
    32
    Member #
    5673
    Nothing Much to it. It's called programming, you have a problem, you do a bit of thinking, you search for otherways to do it, you post questions on forums and then you work it out by yourself anyway. Mind you - you thought about giving up Flash??? Thats a scary thought. After all the hours you've spent learning this stuff???

  6. #5
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    I think we've all been frustrtated and thought about moving on at some point or another. Luckily he didn't, found the answer, and even came back here to share it with us.

  7. #6
    Senior Member DesignBox's Avatar
    Join Date
    Apr 2004
    Posts
    340
    Member #
    5659
    Actually I'm a she

    I didn't really think of giving up Flash, just thought of throwing the computer out of the window hehe

    I just knew it was something simple and thats why I got so frustrated!!!! Oh well, it happens now and then!!

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    DB,

    You could also use:
    Code:
    _root.gotoAndPlay();
    "_parent" will not work in all situations (for instance, if you call it from within a movieClip within a movieClie, then you'll have to say _parent._parent). However, _root will always reference the root timeline.

  9. #8
    Junior Member
    Join Date
    Sep 2003
    Posts
    5
    Member #
    3151
    Hey, i kinda have a question thats relates to this one, and im not sure if The answer posted, fits my needs

    Im pretty new to flash, So i dont know much, But
    I want to make a type of iframe on my flash website.
    I want to beable to make it where if i click "Button A"
    A scene, or swf opens in A frame on the page, but nothing else will change but that target frame o_o , lol..

    Any help will be greatly appreciated =)

    (b = where i want the file to open)
    http://www.binaryunleashed.com/site.jpg

  10. #9
    Senior Member DesignBox's Avatar
    Join Date
    Apr 2004
    Posts
    340
    Member #
    5659
    Quote Originally Posted by transio
    DB,

    You could also use:
    Code:
    _root.gotoAndPlay();
    "_parent" will not work in all situations (for instance, if you call it from within a movieClip within a movieClie, then you'll have to say _parent._parent). However, _root will always reference the root timeline.
    Thanks, I always get _root and _parent confused :ermm:

  11. #10
    Senior Member
    Join Date
    Mar 2004
    Posts
    241
    Member #
    5465
    Quote Originally Posted by Binary
    Hey, i kinda have a question thats relates to this one, and im not sure if The answer posted, fits my needs

    Im pretty new to flash, So i dont know much, But
    I want to make a type of iframe on my flash website.
    I want to beable to make it where if i click "Button A"
    A scene, or swf opens in A frame on the page, but nothing else will change but that target frame o_o , lol..

    Any help will be greatly appreciated =)

    (b = where i want the file to open)
    http://www.binaryunleashed.com/site.jpg
    I'm pretty new to this forum, but I've been around Flashkit for a while and am pretty decent with flash.

    What you'll need to do is make your movie, make sure to make an area where you'll want to load the external .swf file. Then, you will create an empty movie clip. Place it in the upper-left corner of where you want to load the movie into. Also make sure to name that instance whatever....say emptymc . Then create a button with some code that looks something like this:

    on(release) {
    unloadMovie ("_root.emptymc");
    loadMovie("flashfile.swf",_root.emptymc);
    }

    Then, for each different button, you will just change the flashfile.swf where that file is located in the same directory as your parent file. What the script does when the button is released, it will unload whatever movie is loaded into the movie clip. Then, it loads the movie into it. Very important to unload the first movie before you load another. There may be some errors in what I said, been awhile since ive actually done it, but it should be for the most part right.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:49 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com