Buttons inside the MC and another layer

I have 4 buttons within a movieclip on another layer. Output, map and buttons front and rear.

My buttons worked until I put them in the clip. but now they don't work at all.

This allows my menu to slide in and out of the page

menutrace.addEventListener (MouseEvent.ROLL_OVER, menuenter)

test out of my buttons with just the front and back keys it now.

MenuTry.Nxt_btn.addEventListener (MouseEvent.CLICK, ButtonClicked)

MenuTry.Prev_btn.addEventListener (MouseEvent.CLICK, ButtonClicked)

function ButtonClicked(event:MouseEvent)

{

If you press the next button

If (event.target.name == "MenuTry.Nxt_btn")

{

if(currentFrame == totalFrames)

{

gotoAndPlay (10)

} else {}

trace (currentFrame);

nextFrame();

}

}

If you press the back button

If (event.target.name == "MenuTry.Prev_btn")

{

if(currentFrame ==10)

{

gotoAndPlay (totalFrames)

} else {}

prevFrame();

}

}

move the clip (MenuTry) film with all the buttons in and out of the screen.

}

function menuenter(event:MouseEvent)

{

MenuTry.y = 643.15

menutrace.removeEventListener (MouseEvent.ROLL_OVER, menuenter)

menutrace.addEventListener (MouseEvent.ROLL_OUT, menuexit)

Stop();

}

function menuexit(event:MouseEvent)

{

MenuTry.y = 7531.15

menutrace.removeEventListener (MouseEvent.ROLL_OUT, menuexit)

menutrace.addEventListener (MouseEvent.ROLL_OVER, menuenter)

Stop();

}

yYou have a problem with your scope:

put the buttons in a MovieClip doesn't change their name:

for example, instead of writing

If (event.target.name == "MenuTry.Nxt_btn")

To write

If (event.currentTarget.name == "Nxt_btn")

Tags: Adobe Animate

Similar Questions

  • Several events (button inside the Panel)

    Hello
    I have a button inside the Panel and the button and dishes and accessories Panel have "click" event What I need to do, is when the user clicks the button, only the event assigned to the button get fire, NOT the Panel ' click on ' event.

    Help, please
    Thank you

    I found that it only works if you create an array for the columns, edit, and then assign to the data grid:
    CGI Columns = aColumnsNew; reassign the array to the dtaGrid

    This: 'dg.columns.push (dgc);"does not work.

    Tracy

  • Check the status of MSO 2 by a button inside the OSM 1

    Hello world

    This is my problem:

    1. I have two objects of State Multi (I'll call her MSO 1 and 2 of the WHO)

    2. I need a button inside the OSM 1 States to control 2 MSO

    the problem is when I create the button inside the OSM 1 and choose "go to State" action, I can't choose the 2 MSO (MSO 2 name is not displayed)

    is there a limitation of dps for that kind of interaction? If this is the case, is there a solution for this?

    Thanks in advance

    F.

    This is actually a limitation of InDesign. You cannot add a button to a MSO that points to a different MSO.

  • So how do you REALLY just toolbar buttons show the icons (and not text)?

    On my bookmarks toolbar, my favorites 'buttons' display the icon AND text. I want to just display the icon, no text. When I right click, customize, the "Customize toolbar" window opens. Down in the lower left corner the drop of the "show" option is already set to "icons" (and only the icons). But it's just not so. The toolbar buttons display icons AND text. If I scroll through the drop-down list just for fun, it doesn't change. I choose "icons (only)" all day, but the toolbar buttons always display text.

    Hello dotdot, try the other, right-click on a bookmark and select Properties, and then clear the name of the bookmark and save it.

    Thank you

  • With GarageBand music itself inside the material and sound materials makes new music

    With GarageBand music itself inside the material and sound materials makes new music

    This kind of music can be put in the game when the background music

    I don't know about this

    Y at - it friends who know say me thank you very much

  • a pc that is sharing the printer and another pc does not accept the same network printer on xp pro sp3

    a pc that is sharing the printer and another pc does not accept the same network printer on xp pro sp3
    What is the solution?

    Check out these links

    http://TechNet.Microsoft.com/en-us/library/bb457001.aspx

    http://UIs.Georgetown.edu/software/documentation/WinXP/WinXP.network.printer.html

  • Command button inside the column heading in the table of the ADF

    Hi all
    I want to insert two command buttons inside the column header of a table of the ADF.
    In my mind these buttons should replace the buttons two default (triangles) to sort the column in ascending or descending order.
    You know a solution? Because it's 2 days I'm trying, but no way.

    Thanks in advance
    Stefano

    have you tried facet the af pane header: column?

    
      
        
        
          
            
            
          
        
      
    ...
    
  • How empy and replace the buttons inside the Manager of horizontal management.

    Hello! So basically, I have 2 buttons at the top of the screen and a set of buttons inside a HorizontalFieldManager (let's call is Set 1 and 2). Now, when I click on the first button it should appear a Set 1 and then appear Set 2 and remove the Set1 on screen. How can I do this? Thank you!

    -Ryan

    The details in the referenced thread, you should get going.

    Basically, you add and remove fields.

    I suggest that you have a Manager to Set 1 and a Manager for value 2.  Add the two managers to the screen, with nothing in it,

    Make sure that Manager 2 is empty (deleteAll) and add fields associated with the value 1 to the Manager for the value 1, when they should be displayed - i.e. trigger it by pressing button 1.

    Remove the fields in Manager 1 and add the fields associated with the value 2 to the Manager for Set 2, when they should be displayed - i.e. trigger this by pressing button 2.

    I hope this helps.

  • Layer of scale automatically according to the proximity of another layer

    Hello!

    I am trying to write an expression that will scale a layer down as another layer gets closer (simulating a UI jumping off the page as a the mouse cursor is on it). That's what I have so far (a term applied to the scale property of the target layer):

    x = Math.abs ((effect ('Mouse Layer') (1)).transform.position [0] - transform.position [0]);           distance from the target layer and the mouse on the x-axis

    y = Math.abs ((effect ('Mouse Layer') (1)).transform.position [1] - transform.position [1]);           distance between the target layer and right-click the axis y

    t = Math.sqrt ((Math.pow (x, 2)) + (Math.pow(y,2)));                                                                   the actual distance of mouse layer in the center of the target layer

    fadeDist = effect ("Fade Dist") (1);                                                                                             distance to which layer begins the scaling

    sMin = ("sMin") effect (1);                                                                                                           minimum scale

    sMax = ("sMax") effect (1);                                                                                                        full scale

    s ease = (t, 0, fadeDist, sMax, sMin);

    [s,];

    It works fairly well, but it is based on the distance between the Center of the target layer and the mouse, not the limits/edges of it. For this reason, scale the target layer becomes as the mouse moves around the area of the layer itself.

    Is it possible for me to write this expression which 1) allow me to refer to the distance between the mouse and the edges of the target layer (a rectangle) the factor affecting the scale of the layer and 2) maintains the balance of the rectangle while the mouse moves that it contains?

    Thank you!!

    This is probably not exactly what you are looking for, but it may give you some ideas. It seems to work for a rectangular solid. It evolves as the mouse layer approaches, but remains at the top of the scale, once the mouse is inside the solid:

    sMax = 150; Max scale

    sMin = 50;  scale min

    dMax = 100; When the scale starts to distance

    dMin = 0; When the scaling of the remote ends

    M = thisComp.layer ("Layer mouse");

    PM = M.toComp (M.anchorPoint);

    x = h [0];

    y = h [1];

    p = toComp (anchorPoint);

    xMin = p [0] - width * sMax/200;

    xMax = p [0] + width * sMax/200;

    yMin = p [1] - height * sMax/200;

    yMax = p [1] + height * sMax/200;

    If (x<>

    If (y<>

    d = length (pm, [xMin, yMin]);

    } ElseIf (y<>

    d = xMin - MP [0];

    } else {}

    d = length (pm, [xMin, yMax]);

    }

    } ElseIf (x<>

    If (y<>

    d = yMin - MP [1];

    } ElseIf (y<>

    d = dMin;

    } else {}

    d = h [1] - yMax;

    }

    } else {}

    If (y<>

    d = length (pm, [xMax, yMin]);

    } ElseIf (y<>

    d = h [0] - xMax;

    } else {}

    d = length (pm, [xMax, yMax]);

    }

    }

    s = linear (d, dMin, dMax, sMax, sMin);

    [s]

    Dan

  • How to select a range of colors as in Photoshop or copy/move a layer in the mask of another layer?

    Hello

    I'm experimenting Photoshop Elements and wanting to use a layer of black and white (gray scale) I did as a mask of a another layer and do not know how to do in elements.  In Photoshop, I could do it (there may be a better way to do it in PS, but I've not yet discovered)...

    Click on the layer, I created that I intend to use as a mask

    Select all

    Copy

    Select the layer that I want the mask to be applied to the

    Click on the button Add a mask layer (bottom layer)

    Click on the mask icon so it is highlighted (and is not the image)

    switch to the channel display

    highlith the layer mask in the R, G, B of the layers and make it visible

    Dough

    invisible again

    Switch to layers.

    This works and retains the full range of transparency for the semi transparent and soft contours of mask etc.

    Otherwise, I can choose a range of colors, but this doesn't seem to be available in PS Elements.

    So, how do I get the same result in PS Elements?

    Thanks for your help

    Jonno

    After you have added your layer mask, Alt (Option) click on the thumbnail of the mask layer in the layers panel, and then edit > paste.

  • AS3 putting the buttons inside the Movie Clip

    I'm practicing AS3 (after years of AS2) and can't have a button inside of a clip speaks to another clip on the main timeline. Here is the code:

    OneButton.addEventListener (MouseEvent.CLICK, OneButtonClicked);

    function OneButtonClicked(event:MouseEvent):void

    {

    MovieTarget.gotoAndStop (1);

    MovieDescription.gotoAndStop ("One");

    }

    TwoButton.addEventListener (MouseEvent.CLICK, TwoButtonClicked);

    function TwoButtonClicked(event:MouseEvent):void

    {

    MovieTarget.gotoAndStop (2);

    MovieDescription.gotoAndStop ("Two");

    }

    The code above works, but if I put OneButton and channels within a clip, I know can target the MovieTarget and MovieDescription. The reason that I want to put OneButton and strings inside it's own MC is so I can dim each hit after top by switching the playhead within this MC help. ? Thank you!

    Start from the beginning

    Press f8 and choose movieClip, then draw your button movie untoggled call then create another movie and create your button toggled or grayed button and call it greyedButton.  Go to the main stage add 2 instances of button and 2 greyedButton (just drag the library).  you have 4 instances on stage.  give the name of the instances of appeal and place them one over the other so you can see 2 buttons on the stage.  put the button greyed under the button.

    now with action script

    Button1.addEventListener (MouseEvent.CLICK, OneButtonClicked);

    function OneButtonClicked(event:MouseEvent):void

    {

    MovieTarget.gotoAndStop (1);

    MovieDescription.gotoAndStop ("One");

    Button1.visible = false; Here the button greyed will show

    }

    Button2.addEventListener (MouseEvent.CLICK, TwoButtonClicked);

    function TwoButtonClicked(event:MouseEvent):void

    {

    MovieTarget.gotoAndStop (2);

    MovieDescription.gotoAndStop ("Two");

    Button1.Visible = true; Here button1 will return to its orignal State

    Button2.visible = false / / here will show the button greyed

    }

  • With the help of the buttons inside the Scrollpane

    I have the following code to my (not in a scrollpane) buttons, but when I try to add additional channels (addEventListener) to correspond with the buttons in a scrollpane I get these error messages (1120: access of undefined property smith. 1120: access of undefined property thomas.). I tried using the script in a layer actions within the MC inside the scrollpane does not. Is someone can you please tell me what is wrong and (a simple code example) how to correct? Thank you.

    home.addEventListener (MouseEvent.CLICK, clickSection);
    about.addEventListener (MouseEvent.CLICK, clickSection);
    staff.addEventListener (MouseEvent.CLICK, clickSection);
    whyus.addEventListener (MouseEvent.CLICK, clickSection);
    services.addEventListener (MouseEvent.CLICK, clickSection);

    function clickSection(evtObj:MouseEvent) {}
    gotoAndPlay (evtObj.target.name);

    }

    and once again, in answer to your question.  attached is a file that shows exactly what I have been explained - how to add headphones borders on objects in a scrollpane.

  • events of button inside the popup does not close popup

    Hi all

    I have a requirement to create the popup to enter some lines. So I created integrated popup and I placed the table advanced inside the popup. Also, I placed a button (AddNewRow) with the partial action of fire in table advanced table actions. in the basic PFR page, I wrote for the event AddNewRow event action. Once I click on this button, its perfectly calling event written in base page. But the window closed. How to avoid close the pop up window because I have to do the creation of multiple line inside the popup.

    version: R12.1.3

    Please guide to achieve this.

    Thank you

    SAN

    I achieved this goal by creating a button with partialFireAction event and event action written inside the window popup controller.

  • Problem using a button inside a movieclip and make change a button what it does based diffferent.

    First question is that I can't get any coding inside my movieclip to affect the main storyline.

    Go as simple as possible, I reduced to

    "

    parent.nextFrame ();

    "

    I thought less coding means less room for mistakes, but there is nothing at all.

    Next issue is my button ignore my IF statement.

    "

    If (this ._currentframe! = 4 | 10 | 16 | 22: 28: 34 | 40 | 46 | 52 | 58 | 64 | 70) {}

    prevFrame();

    } else {}

    gotoAndStop (3);

    }

    "

    This button makes prevFrame no matter what chassis it is on.

    I have read the tutorials and maintained using code people offered as solutions, but nothing did. Quick response appreciated, I have a deadline for this. Thank you

    You may NOT use any encoding in this movieclip as the goto, play() and stop().

    but, if you CAN use a coding in this movieclip to control the parent movieclip. for example,.

    _parent.nextFrame ();

    and that the code of the button must be:

    If (this ._currentframe! = 4 |) This ._currentframe! = 10 | This ._currentframe! = 16 | This ._currentframe! = 22 | This ._currentframe! = 28 | This ._currentframe! = 34 | This ._currentframe! = 40 | This ._currentframe! = 46 | This ._currentframe! = 52 | This ._currentframe! = 58 | This ._currentframe! = 64 | This ._currentframe! = 70) {}

    prevFrame();

    } else {}

    gotoAndStop (3);

    }

  • Creating a button that highlights himself and another object

    Hi all

    I have a specific function, I am applying for my InDesign document for export to interactive PDF and SWF/html format.
    The function that I am creating is:
    I have a picture of a typical WYSIWYG toolbar. I created highlight buttons that sit on top of each icon in the image. When the reader hovers over this image of an icon (with the cursor) I want it highlight and also a piece of text lower on the page to highlight as well (which is a definition and an explanation of the icon). So I want the reversal of my first button action to also trigger another action, which is to highlight a piece of text somewhere else on the page. I managed to get so I put the cursor on the first button (icon image), it highlights, and the text below the page. But this isn't quite what I want. I want the text already exists, then highlight. Basically I want the two buttons to be connected. So that whenever I have fly over a part of the image of a created button, it will highlight, and a piece of exploratory text highlight simultaneously elsewhere on the page. A bit like an infographic. It is surely possible?

    Thanks in advance for your help.

    Generally, the animations as this is to export a SWF file are better be done in Adobe Flash.

    In Indesign that kind of market, too. Only for export as SWF, you can assign to the action "go to the State." For a text block, you can assign different status, where the 1st State would be 'normal' and the 2nd status would be "highlighted". Highlighted applies to the object "text frame", so that you can assign a contour or background. Better than nothing.

    Example: Dropbox - test_highlight.indd

Maybe you are looking for

  • ThinkPad E530: Windows 8 COA sticker missing

    Recently, I bought Thinkpad E530 mobile computer with Windows 8 Pro installed. However, I did not receive installation disc and there was no COA sticker anywhere. I also checked under the battery. The seller says something like "it's something new wi

  • HP PAVILION model # 15 - n067ca: forgot password tried 3 times received the hell code 55103051

    Tried to turn on computer wants (forgotten) administrator password I tried 3 times received the hell code 55103051. Help, please. Thanks Dave

  • Laptop HP windows 8.1: startup screen apps not wanting to open.

    I just bought this laptop and when I first used apps in the menu start up has worked well.  I did a files yesterday and since then when I try to use an application, it opens and says that it cannot open for sending me to the windows store where she t

  • How to set the printer in VBscript

    I have a folder that contains 20 pdf files, I want to print only 2nd page with 2 copies of all files PDF 20. I have VBscript --------- TargetFolder = "path of file."Set objShell = CreateObjectSet objFolder = objShell.Namespace (TargetFolder)Set colIt

  • my email dissappearwed of windows live mail.

    I've been watching, closed, reopened a few seconds later, and they were gone. Thios happened first when I created livemail, but it was only a few emails, so I'm on board, but this time I lost all. I still have links to them, but not the actual mails.