Buttons within attached movie

I'm trying to do very simple, i'm attaching a map using
attachMovie, then I have two buttons one to print it and one to
close the movie. The code is contained within the timeline of the
attached movie not the root timeline.
attachMovie("mcmap", "map_mc", 200, {_x:100, _y:100});
close_btn.onRelease = function ()
{unloadMovie (map_mc)};
I hope I've set the linkage elements correctly and my movie
sits on the main stage and is not exported in the first frame.
Attaching the movie is fine, I just can't close or print the
map - I'm incorrectly targeting somehow but I just can't work out
why?
Can anyone help?

I worked it out - every post I make is because I still forget
about using paths properly - I know it's something to do with this,
but I always forget - sorry!
_parent.map_mc.unloadMovie ()};
was the correct choice!!!!!!!!!!!!

Similar Messages

  • Button within a movie clip not working

    Hiya,
    I have a movie clip within my swf website that is basically
    an icon that you roll over to produce the menu. The movie clip has
    coding inside it to produce the rollover effect. This is as
    follows:
    stop();
    this.onEnterFrame = function(){
    if(rewind == true){
    prevFrame();
    this.onRollOver = function(){
    rewind = false;
    play();
    this.onRollOut = function(){
    rewind = true;
    Whilst this coding works fine for this movie clip, for some
    reason the buttons within the movie clip that appear as you
    rollover them will not work when pressed. I am trying to get them
    to navigate the main timeline, i.e. coding as follows:
    on (release) {
    _parent.gotoAndPlay("home")
    _parent should be correct, I've tried it without and with
    _parent._parent however still it has no effect. From what I can see
    everything should be working fine.
    Is there some reason why buttons will not work within this
    sort of roll over effect movie clip?
    Thanks for your help.

    you can't assign mouse handlers to a parent movieclip and
    expect a child movieclip to respond to mouse events: the parent
    will intercept those events.
    to remedy, either assign all your mouse handlers on the child
    generation movieclips or use a hitTest() for one of the
    generations.

  • Controlling the main time line of a movie via a button within a movie on a different level.

    Hi there!
    I have two movie is two different levels,
    Level 5 is my base movie and I am loading another movie on
    top of this into level 10.
    Once the user clicks onto a button within the movie on level
    10, I would like the animation in level 5 to stop (the animation
    runs on the main root timeline of level 5).
    Once the user clicks on a different button within the movie
    on level 10, I would like the animation on the main timeline of the
    movie in level 5 to start again from the point where it previously
    left off.
    Is this possible?
    It would be great if someone could help me out with this.
    Thanks, midi_ie

    midi_ie wrote:
    > Hi there!
    > I have two movie is two different levels,
    > Level 5 is my base movie and I am loading another movie
    on top of this into
    > level 10.
    > Once the user clicks onto a button within the movie on
    level 10, I would like
    > the animation in level 5 to stop (the animation runs on
    the main root timeline
    > of level 5).
    >
    > Once the user clicks on a different button within the
    movie on level 10, I
    > would like the animation on the main timeline of the
    movie in level 5 to start
    > again from the point where it previously left off.
    > Is this possible?
    _level5.gotoAndPlay("someLabelframe");
    Use your regular action to target timeline or movie clips,
    just define the level number at the beginning of the path.
    Pretty much it :)
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Problems coding a button within a movie clip to navigate scenes

    Hello there! I've got another probably noobish question to ask about CS6.
    My goal is very similar to the one mentioned in this previously discussed forum question: http://forums.adobe.com/message/837995#837995 and also in this question http://forums.adobe.com/message/4172919#4172919
    I am attempting to make a button inside a movie clip in my first scene go when clicked to the first frame of my second scene. I named the button's instance menu_button_1 and I believe Scene 1 and Scene 2 are the names of the scenes. (If they should have special names or instance names, I did not see where to type them.) Because of the similarities, I attempted to follow the suggestions on those pages. However I probably did some small thing wrong, (Or heck, maybe a huge thing.) which I what I'd like help with to find.
    stop();
    myButton.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(evt:MouseEvent):void {
    gotoAndStop(1, "Scene 1");
    This seemed to be what was suggested to enter. I attempted to modify it to work for me as well. This is what I typed for the button's action.
    menu_button_1.addEventListener(MouseEvent.CLICK, clickHandler);
    function clickHandler(evt:MouseEvent):void {
    gotoAndPlay(1, "Scene 2");
    (I removed the stop function because I have music looping in the movie clip that I want to play until the mouse is clicked.) (Also, I picked gotoandplay because I wanted scene 2 to start playing immediately when clicked rather than stopping.)
    I tried variations, including "2" instead of "scene 2" and whatnot. I also tried linking it to differnet places just to see if that would work. It seems like it could link if I only asked for a frame within the movie clip itself, but it couldn't go to any other frames in scene 1 or scene 2. When I attempt, this message is displayed in the output:
    ArgumentError: Error #2108: Scene 2 was not found.
        at flash.display::MovieClip/gotoAndPlay()
        at interactivestgermant_fla::menu_1/clickHandler()
    It seems it cannot find my Scene 2. (It also cannot seem to find Scene 1 when I prompt it to do that.) I'm afraid I'm not sure of what I've entered incorrectly, though I'd imagine it involves how I typed the scene navigation. Should it have an instance name or something? I'd very muchappreciate a push in the right direction. If you need any more info I'll be happy to provide it. Thanks for the help! I very much appreciate it.

    I bet you're absolutely right. However I am not sure how I am misnaming it, as to my ametuer eyes, it seems to be entered properly into the properties box? It does show up as "menu" written in white over the keyframes and also in the properties slot. I can include some images here to help out in correcting me.
    http://girlfoxgirl.deviantart.com/art/Flash-Help-1-395704638   This image shows my movie clip. This seems to be the problem it's having, identifying "menu." Did I do that incorrectly? It looks to be in order.
    http://girlfoxgirl.deviantart.com/art/Flash-Help-2-395704633 This is inside of the movie clip named menu. You can see I did the same to name the button menu_button_1.
    http://girlfoxgirl.deviantart.com/art/Flash-Help-3-395704627   This shows the action I gave to menu_button_1 in which I attempt to have it naviagte to Scene 1 frame 493.
    http://girlfoxgirl.deviantart.com/art/Flash-Help-4-395704623  This shows where I'd like the button to go to. (It is hard to tell if that's frame 493 or 492. I figured that it should be ok either way and if this frame is 492 then it's easily changed once I get the darn thing working in general) (Also, I named the layer "peanuts." I tired entering the name "peanuts" as well but it didn't seem to work either, so I figured "493" is easier since I know that you can go to a specific frame by doing gotoandplay("scene 1" , #) and I'm not sure if it requires any additional stuff to go to a name.
    http://girlfoxgirl.deviantart.com/art/Flash-Help-5-395704687    These are the errors I get. I totally agree with you- It seems very much to be an issue of getting it to recognize the "menu." However I am unsure where I named something wrong. Is this enough info to help you perhaps point out where that is?

  • Overlapping buttons within a movie clip

    I am using Flash CS3. Within a movie clip, I have a button
    symbol on one
    layer and an invisible button, which covers the whole canvas,
    on another
    layer. Regardless of top-down order, the big invisible button
    works and the
    button symbol (simple text rollover with link) will not work.
    If I put the
    button on the main timeline it works fine.
    What's the solution or what is a good way to have canvas
    coverage, plus
    individual links?
    Thanks for the help.

    See, I thought of that. It only works on the main timeline,
    not within the
    movie clips.
    If you look at
    http://www.graceweb.us/flash/precepts_090310.swf
    and mouse
    over the right-hand rectangle you'll see the top "blog" link
    is on the main
    timeline, the second blog link is two MCs deep, and the
    bottom two links are
    in the same clip as the invisible button.
    The actual FLA is at
    http://www.graceweb.us/flash/precepts_090310.fla
    Thanks again for the help
    "NedWebs" <[email protected]> wrote in
    message
    news:gpqvok$d45$[email protected]..
    > Place all of you individual links/buttons on a layer
    above the stage one

  • Start/Pause Display buttons within videos/movies removeable for beamer-use?

    Hi erverybody!
    I´m new here and I think this "problem" is also new to you guys.
    I want to use the iPod as a source for beamer-projections within our shows on stage.
    It works quite good, the only problem (killing argument if I don´t find a solution) is that I don not know how to disable the "buttons" blended in the movie whenever you press a command on the iPod...
    Any ideas? Solutions? I would be so happy!!!
    Thanx in advance for YOUR support!
    Toni

    Hi,
    I'm from germany so no 'best buy' but I think I will lock around sleeve/bag for a different product with same measures. Any tip?
    The clear plastic case is not what I want. I would like to use the player without such protections. I just want a sleeve to protect the player while its in my jacket/pants.
    Btw, i have bought this version: Creative Zen (maybe european version?). I also doesn't seem to have your mentioned sleeve. I also couldn't find it on the website.
    Anyway, thank you,
    Chris

  • Making Button links within a movie clip

    I am attempting to learn more Flash in general and
    actionscript in particular. I have created a flash piece that
    consists of 4 buttons within a movie clip that is being masked by
    another movie clip. One movie is the set of 4 buttons. The other
    movie is a "spotlight" that moves with the cursor. As the spotlight
    shines on each button, the button's text changes color and is "lit
    up".The Over state of each button is set to cause the button to
    change color. When I put a keyframe in the Down state of each
    button in order to add actionscript to create the action that makes
    the button clickable to take the viewer to a web page, it tells me
    that no actions can be given to this Down state. If I try using
    Behaviors to accomplish the same thing, it tells me that Behaviors
    are not supported. If I put actionscript into the actions layer of
    the timeline, it does not do the required action, i.e. clicking on
    the buttons leads nowhere. I have tried moving the actionscript
    before, between, and after the setInterval and setMasker
    actionscript that controls the interaction between the two movie
    clips (which work perfectly). I have tried inserting an actions
    layer into the button movie clip--same result--nothing. I have
    tried putting the actionscript in the second frame of the actions
    layer (both in the main timeline and in the movie clip), all to no
    avail. I did give each button an instance name and used them in the
    actionscript.
    Here is the actionscript I am using for one of the buttons:
    book.onPress = function(){
    book.getURL("http.//www.bainbridge.wednet.edu");
    I do not get an error message with this actionscript. I just
    don't get sent to the web page. I am using Flash 8.
    What else I should be doing? Is this a problem because the
    cursor is already attached to an action? I am sure that this must
    be possible, if only I knew more.
    Thanks for helping.

    do you have the actual mc identified as ( book ) on the root
    as well as the code i posted above? if so, are the code and the mc
    on the same frame? also you should note that the code posted above
    is meant to be placed on your root time line, not directly on the
    mc identified as ( book ). one more thing: you must target your mc
    ( book ) correctly.
    target like this:
    IF YOU ARE ON THE MAIN TIME LINE ( _root ):
    // if ( book ) is setting on the _root already then your
    target path is simply book.onRelease.
    // if ( book ) is setting inside another movieclip on the
    _root, find out what movieclip ( book )
    // resides in. that will now be the first part of your target
    path.
    // next find out if ( book ) resides in yet another
    movieclip. if so, that will be the next part of
    // your target path.
    // continue this until you reach ( book ). the entire path
    you took to reach ( book ) is your
    // target path.
    // you can also click on the target icon in your actionscript
    pane to insert a target path for
    // your movieclip.
    here is an example in which ( book ) resides inside another
    movie clip ( yourMovieClip ) on your _root:
    yourMovieClip.book.onRelease = function () {
    getURL("
    http://www.cnn.com/");

  • Attach movie - broken buttons - targeting

    Let's say i have a simple movie clip called "navBar" and in
    that movie clip I have nested another movie clip called
    "green_btn". I have assigned linkage to both clips the first as
    "navBar" and the second "green_btn". It is removed from the stage
    and saved in the library with proper linkage.
    Now let's say I return to the stage and create a "holder" for
    my attached movie. I leave it blank, I call it "myHolder_mc" and
    assign it linkageand give it a instance name of "myHolder_mc" and
    move the cross hairs to the upper right hand corner.
    Then I create a red button movie clip on the stage of a red
    circle called "red_btn", and give it a instance name of "red_btn".
    I will use red_btn.onRelease to load up the attachedMovie. When I
    press the red_btn, the "navBar" movie attaches fine.
    OK, thanks for sticking with me this far - HERE IS THE
    PROBLEM - I want to be able to target the "green_btn" that is
    located in the original navBar and assign it a onRelease function.
    I can't seem to be able to target it, and have tried to find the
    right target path, but can't seem to do it correctly.
    So here is the code so far that isn't working
    red_btn.onRelease = function(){
    myHolder_mc.attachMovie("navBar","navBar", 0)
    // the green_btn is nested inside of the navBar movieClip
    myHolder_mc.navBar.green_btn.onRelease = function(){
    trace("hello")
    What should I do?

    If you are importing the swf into the library it will lose all its actionscript.  You need to either copy that file from its original fla and create it as a movieclip in your other file (copy its timeline into a movieclip) or load that swf dynamically when the file is running using actionscript.

  • Attach movie (not using a button)

    I'm trying to attach movie on frame 1 on timeline. I'm using
    the following script and nothing happens:
    myMovieClip.attachMovie("graphic", "g", 1);
    g._x = 260;
    g._y = 250;
    When I use this script attached to a button it's working:
    on (press) {
    attachMovie("graphic", "g", 1);
    g._x = 260;
    g._y = 250;
    any idea what can be wrong?

    >>myMovieClip.attachMovie("graphic", "g", 1);
    This code assumes there is a movieclip with instance name
    'myMovieClip' on level0.
    >>do i have to give the movie clip an instant name
    No.
    >>i gave the name -graphic- in the linkage under
    identifier
    That's correct.

  • Buttons in an attached movie from library

    I used the tutorial posted at
    http://www.layersmagazine.com/flash-attaching-movieclips-actionscript.html
    Now I have a button on my stage that attaches a movie from the
    library.
    on (release) {
    this.holder.attachMovie(“contents”,”contentslinks”,1);
    It works fine but I also have buttons inside the attached
    movie clip that need to control a movie that is already on the
    stage.
    contentslinks.contents_link_1.onRelease = function() {
    content_mc._visible = false; book_mc.directGotoPage(4);
    If I just place the attached movie on the stage the buttons
    work but I when I proceed to use attachMovie, they do not work. How
    do I get the buttons in the attached movie to address the movie
    that is already on the stage?

    you can use the enabled property of movieclips to
    enable/disable them.

  • Movie Clip Button not working within an Movie Clip

    Hi,
    I'm trying to create a movie clip on my my main timeline that has a movie clip button within it that pops up a box in the middle of the site that contains text and links. On Frame 1 I have the Up state, frame 2 the roll over state, and frame 3 my Down State (where Box appears).
    on (rollOut) {
        this.gotoAndStop("1");
    on (rollOver) {
        this.gotoAndStop("2");
    on (release) {
        this.gotoAndStop("3");
    I have stop(); on each of the 3 keyframes
    The problem is that on the main time line, the button is clickable but doesnt do anything
    Any suggestions, what am i missing?
    Cheers

    Ok, i have this assigned to a movieclip, is this wrong? Especially for MovieClip Buttons. Anyway, just tried this and it works!
    on (rollOut) {
        this._parent.gotoAndPlay(1);
    on (rollOver) {
        this._parent.gotoAndPlay(2);
    on (release) {
        this._parent.gotoAndPlay(3);

  • TellTarget to play a movie clip within a movie clip

    I currently have two movie clips in my scene with a button
    that lies inside one of the movie clips. We will call this movie
    clip for the sake of this post "ph." The button inside of ph has a
    rollOver/rollOut movie clip called "Buick_rollOut" attached to it
    as a parked movie clip through tellTarget. Currently Buick_rollOut
    only works if I put the parked movie clip on the same level as ph.
    I want Buick_rollOut to be within the movie clip, ph, that contains
    the button. I want that button be able to tellTarget the location
    of Buick_rollOut within ph. I hope this makes sense. Here is my
    code for the button that lies within ph. (this code only works when
    Buick_rollOut is located outside of ph on the same level).

    Is this code running on the button? What's the name of the
    button?
    Things would be a little clearer if you replaced tellTarget
    with dot notation:
    Buick_rollOut.gotoAndPlay("rollOver");

  • AS3 air project.. nested button in a movie clip .. trying to use a class script

    I have been tring to have a button in a nested movie clip move the timeline along using a class script attached to the nested movie. I can get the buttons to work on the main timeline with another similar class script, but when I have a button within a nested movie and attach similar code to the movie, it doesn't seem to want to work. This is the class code attached to the nested clip.... I guess can an active listener be called if the button isn't yet being visible yet, and should this be done on the Main class script page for the main timeline? Any help would be great!! Thanks
    package  {
        import flash.display.MovieClip;
        import flash.events.MouseEvent;
        public class Animation extends MovieClip {
            public function Animation() {
                gotoAndStop(1);
                negBackground_btn.addEventListener(MouseEvent.MOUSE_UP, buttonPressedNegBackground);
            private function buttonPressedNegBackground(e:MouseEvent):void {
                negBackground_btn.visible = false;
                gotoAndStop("negChar");

    Hi,
    Your question is bit confusing, try to explain it. According to what I unsrestand you should use the particular movieClip name with the code to make it happen properly.
    Like :
    (movieClip_Instance).gotoAndStop("negChar");

  • Button within a movieclip

    Hi all,
    I am relatively new to Flash and am looking for help with a
    file I am working on.
    I have created a movieclip of an area which is placed so that
    only the outer right edge is on the stage. When the mouse hovers
    over the area, it moves onto the stage and reveals menu options. It
    works beautifully as an animation, and the menu options (which have
    over, down, and hit states) work when not part of this movieclip,
    but when I place instances of the buttons within the tweened
    movieclip, they no longer work.
    I have been scouring the web for answers and most people say
    that you cannot have a rollover within a rollover as the first
    rollover (in my case, the movieclip) is still active.
    I have seen this work with various files in flashden for
    example where the menu slides out from the side and then slides
    back in when you 'roll off' but while you are 'rolled on' you have
    access to menu options which all perform their own roll on/off
    movies.
    Hopefully there is a simple answer!
    Thanks in advance.
    J.

    I had to step out for awhile too.
    Well, I'll give you a jump start on the AS version of Tweens.
    Taking this approach will give you a better bit of sliding. With
    your gotoAndPlay(label), you'd end up having things probably still
    jumping around when it moves from the background to a button and
    vice-versa which would end up complicating the coding to avoid it.
    Below is a link to a small sample file I made for you that
    you can study/utilize... it was easier than trying to explain it in
    this forum. It shows you a better way of coding mouse interaction
    stuff as well (using on(...) attached to objects is bad practice...
    now outlawed in AS3).
    The way I did it has all of the code visible in the main
    timeline so you don't have to go digging and clicking on things to
    find code.
    The menu's background is a movieclip and the menu's button is
    a button. I only have one button, but the more the merrier as long
    as they all have their own code and instance names. Though for the
    rollOver you could assign them all as follows:
    btn1.onrollOver = btn2.onrollOver = btn3.onrollOver =
    function(){...}
    I forget during this edit (some hours later) if I have a
    rollOut for the button, but since/if the background surrounds it on
    all sides, you can probably eliminate it... only the background
    would need to have that aspect covered.
    There are two versions of the file linked below... a CS3
    version and a Flash 8 version.
    Sample Fla
    File - CS3
    Sample Fla
    File - Flash 8
    PS - my host's server is acting up today, so be
    patient.

  • Simple Button to Control Movie Clip

    Hello,
    I was relatively comfortable with AS 2.0, but am having a
    hard time warming up to 3.0. I feel that this should be something
    simple to find help online with, yet I'm finding it difficult to
    get a simple answer.
    I have a button that is inside a movie clip within another
    movie clip:
    mainMenu_mc > whoBtn_mc > whoButton
    This button appears to work fine controlling a movie clip on
    the same timeline. This is the code so far (on an Actions frame in
    WhoBtn_mc):
    whoButton.addEventListener(
    MouseEvent.CLICK,
    function(evt:MouseEvent):void {
    whoGlow.gotoAndStop("click");
    I have another movie clip on the main timeline that I would
    like to control with this button:
    blackFadeBottom_mc
    What would the code look like for this?
    Any help is appreciated - Thank you.

    Thanks, I was able to place the code on the main timeline and
    get a trace when I clicked on the movie clip instance itself. I
    probably didn't explain what I was trying to do very well, so I
    apologize.
    What I need to do is to control this movie clip that is
    physically placed on the main timeline (fadeBlackBottom) with the
    button that is buried under two other movie clips
    (mainMenu_mc>whoBtn_mc>whoBtn).
    I would like the whoBtn to tell the fadeBlackBottom movie
    clip to (what used to be)
    _root.fadeBlackBottom.gotoAndPlay("play"); This will drop down a
    box that will contain the content of my 'Who' link.
    How can I accomplish this?
    Thanks again,
    Chuck

Maybe you are looking for

  • XML File download through an iview

    Hi All, I've written an iview that builds up the data for an xml file and tableview report. The should be able to click a link on the iview and a window pops up and they can save the XML data to a local file. I have two problems, the first is I am un

  • Uploading and sending a PDF document from document management

    Hello to all, does anybody know a function module which is able to upload a pdf document stored within the document managemenent system of ERP and then send it via e-mail? Thanks to all Jörg

  • Method Not Found Invoke Node error 1316 using Solid Works IEdm

    Hi Forum members, I have been having a problem with calling a function in a dll file.  I have attached the VI as example.  When I use the GetFile method I get a reference to that.  I then use the Invoke node and recieve a list of methods, the first o

  • Crystal runs sql command of first sub report in the second sub report ?

    Hi, I have report that contains 3 sub reports. Each subreport is running his own sql command to retrieve it's data. When moving from the first subreport to the 2nd subreport, we see on the oracle that the crystal runs the sql command of the 1st subre

  • Real-Time Sequencer Feedback and Questions

    Post your questions and feedback to the Real-Time Sequencer Architecture and Real-Time Sequencer Architecture Example here. Brian K.