Make a button open a scene when you click

Im guessing this is related to actionscript,
Ive made 2 buttons and a house named another way out.
When you click Home I want to open a certain scene in this case called the House S
And when you click on exit I want to open the scene S out,
How to do this?
I'll explain my problem more if needed,
Maybe we could call what connects a button.
Only he opens a new scene rather than .html or Web site

You create a handler for the button click.

So:

Select the button on the stage and give it an instance name in the property Panel

Create a new layer for actionscript, select the first image (or create a keyframe in the frame, in which the button is)

In the Panel shares: (where myButton is the instance name used)

myButton.addEventListener (MouseEvent.CLICK, doClickButton);

function doClickButton(e:MouseEvent):void {}

gotoAndPlay (1,'s Home');

}

Tags: Adobe Animate

Similar Questions

  • Quiz question buttons don't 'deselect' when you click off of (see photo)

    Quiz question buttons don't 'deselect' when you click off of my multiple choice quiz (always view as in a selected state, even when I click on a choice). I have feedback works, but the button (I used the buttons-sample group of three) and copied an additional. I use InDesign version 11 on a Windows 7 machine and export to PDF. All other features buttons / interactive seem to work great.

    2016-06-09_10-47-49.png

    To be clear, you have box behavior (more than one may be selected), when you want to the behavior of the Button Radio (alone in the game can be selected at one time by selecting another unselects the first).

    To get the option button behavior, in Acrobat, rename fields and give them all the exact same name:

    Then differentiate them using the Options > Radio button choice property:

    Here's how the game will look in domain:

  • My button remains as 'up' when you click it.

    Hello world

    Sorry for such a stupid question, but I feel a little ridiculous wrong in my script: I created a button in my library and changed the value of its saturation in its timeline, under 'up' (essentially the button is b & w and gets color when the user will fly over it). When you click on it, the whole page (button included) Faints, the button is removed from the scene and a new scene appears.

    The problem is that the rest of my site is everything in actionscript, and it seems to hinder this motiontween thing a bit... The button actually works very well, but when I come back to this category of my Web site, the button color until I have the mouse on the mouse AND all over again! So, basically, the fact that the button disappears seems to block the button back to its original state. Is there a way to solve this problem, possibly by restarting (or update) the State of a button via actionscript? The strange thing is that my container (which contains the button and the other who has the same problem) is removed from the scene at the end of the fade on, and yet it reappears in the 'up' State.

    Someone has an idea?

    Thank you much in advance.

    Julien.

    You can use:

    var newButton:MovieClip

    var newButtonOverState:DisplayObject;

    {if(!newButton)}

    newButton = new Button();

    newButton.addEventListener (MouseEvent.CLICK, fadeOut);

    newButtonOverState = newButton.overState;

    }

    newButton.overState = newButtonOverState;

    ButtonA.addEventListener (MouseEvent.CLICK, has). button leading to the next category.

    (...)

    function A(e:Event):void {}

    this.addChild (newButton);

    newButton.overState = newButton.upState;

    }

    function fadeOut(e:Event):void {}

    (...) the function makes the objects fade out, "newButton" included.

    this.removeChild (newButton); the button is deleted once dimmed.

    }

    p.s. Please check the useful/correct

  • How to open an image when you click in a Word.

    Im working in a demo for an interactive book for ipad with the Digital Publishing Suite > Folio Builder and I need to be able to open a specific image when you click in a Word. I have not found a tutorial which shows how to do this can point me to it someone in the right direction please?  THX so much

    Simply put a box above the word. Then convert the box to a button with the action "go State" that points to a specific State in MSO with your image. While an invisible button (no fill and no stroke). Probably the ASM must be first vacuum State.

  • I've just updated to Firefox 17.0.1 and now I can't click a bookmark to open it or open new tab when you click New tab.

    I have several bugs mentioned in FF 17.0.1. I'm only able to open bookmarks by clicking on them and selecting open in a new tab in the menu dropdown. I can't open a new tab by clicking the new tab or by clicking Open a new tab in the menu at the top of the browser drop-FF. In addition, no buttons work in FF, such as home, previous, next or update. It is so aggravating!

    Once I posted this, I restarted with Add ons disabled and it worked... deleted a cpl of addons for the verification of the compatibility and fixed it.

  • Can you have a different action when you open your browser when you click the home button in the browser?

    I have two specific pages set as my home page (s) for when I open Firefox; one is a Digital Radio streaming page, and the other is Google. With the browser open, I would like to be able to click on the home and JUST go to Google, not to reopen the two pages. Is this possible?

    You can change your shortcut on the desktop Firefox with two starting URLS. To try:

    • Shortcut on the desktop: right-click on the icon, choose Properties
    • Icon taskbar pinned: clic click right on the icon, right click in Mozilla Firefox, click on properties

    Windows normally selects the shortcut tab. If this is not the case, go ahead and click on the shortcut tab.

    You will see the target highlighted. On 64-bit Windows, which is usually either not less the following:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    

    For the specific shortcut launch pages, you can add them to the end, for example:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -url "http://www.dilbert.com/" -url "http://www.gocomics.com/pearlsbeforeswine"

    After OK'ing the Properties dialog box, you can test everything right now to confirm that Firefox is now launching a window with tabs. Either:

    • Double-click the shortcut on the desktop
    • right click on taskbar icon pinned, click Mozilla Firefox

    Who do you want?

  • Cannot open google automatically when you click on the button new tab since the last update of Firefox.

    I was able to do so until the last update... I spent through the process several times since, but without success... including adding the complete URL, etc.. The only suggestion so far is that 1 of my modules could be the cause, but I have still the same as before (they are edge Adblock, S3. Google Translator and yet another Smooth Scrolling)... it's frustrating!... and I'd love some help please... Thank you.

    Hi, for reasons of security, 41 of Firefox, you must use an add-on like tab override (browser.newtab.url replacement), to make changes to the page tab.

    Once installed, open the Add-ons (Ctrl + Shift + A) Manager > Extensions, and then look for the new tab override and click Options to set your preference.

    Note, if you want only the new tab to be the same as your home page, you can use the Add on new tab homepage instead.

    You will then need to restart Firefox for all changes to take effect.

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • Forcing a file DOWNLOAD vs open a file when you click on a link... What is the best way to do it?

    Hi all

    What is the best way to ensure that when a user clicks a download link on a web page that the file is actually downloaded rather than the file open in any program can read? For my case, this includes two types of files, video files (.wmv, mainly) and .pdf files. I want my users to browse I provide for them, then they choose a link, click and the file downloads, NOT to have them play/open.

    I started researching on this last night, and the best I could come up with was the suggestion to add "& action = 3Dsave" file as a query string name. So, me being curious, I tried without success to find out whether A) the right way to do it or B) If this query string is the code appropriate to today's standards.

    I looked on the Web site of w3c.org not knowing if it was something that was of their Kingdom, but their website has been revamped and is now so cinfusing to navigate that one must become a software engineer to understand.

    Any help on this would be most appreciated. Thank you!

    Sincerely,

    wordman

    Create a file with the same name as the video/pdf file but with the extension .php. Insert the following code at the beginning (NO space before that in the file):

    <>

    Header ('Content-disposition: attachment; filename = yourfilename.xyz');

    Header ('Content-type: abc');

    ReadFile ('sourcefilename.xyz');

    ?>

    Replace with the file name to "yourfilename" above. sourceFileName may be the same. This gives you just the ability to change names.

    You can find a list of the types mime here: http://en.wikipedia.org/wiki/Mime_type

    If you know php, you have a lot of files, it would probably be easier to have all the links go on one page with the filename and mime type as parameters. You would then use the simple substitution to do the rest.

  • How to make a text field is empty when you click on to.

    I have an input text box, if the user clicks "submit" and the box is empty, it returns "Please enter here response" in the input box. Is there a way to make sure when the user clicks in the box, it will turn back to white and be ready to type rather than having to select existing text, to delete?

    Thanks :)

    Yep, use the onSetFocus method.

    my_text_field_instance_name.OnSetFocus = function() {}
    my_text_field_instance_name. Text = "";
    }

    but be careful here, because if the user fills in that information, then click on the text field and then on again, the text will disappear, you will need to use a combo with onKillFocus or if increased... play with him. its real simple

    Corey

  • Express Outlook XP email opens automatically even if they are spam. How to open emails only when you click it?

    Hello
    I use Windows XP. At the opening of the e-mail messages by using outlook express, e-mail open automatically, including spam emails. How can I put it as well as the emails I click Open and power safely delete spam emails?
    Thank you

    View | Page layout. Turn off the preview pane.

  • want to open a mail when you click

    Years if I clicked on an email it would open in a new tab. Now, he goes to the new tab but does not open unless I click on the new tab.

    How to bring back this feature?

    try restarting in the Help menu (Alt + H) with Add-ons disabled. This looks like a bad Add on for me as I get automatically passed to the new tab.

  • How to open 2 sites on start and 1 Web site when you click the home button?

    How to open 2 sites on start and 1 Web site when you click the home button?

    You can change your shortcut on the desktop Firefox with two starting URLS. To try:

    • Shortcut on the desktop: right-click on the icon, choose Properties
    • Icon taskbar pinned: clic click right on the icon, right click in Mozilla Firefox, click on properties

    Windows normally selects the shortcut tab. If this is not the case, go ahead and click on the shortcut tab.

    You will see the target highlighted. On 64-bit Windows, which is usually either not less the following:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    

    For the specific shortcut launch pages, you can add them to the end, for example:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -url "http://www.dilbert.com/" -url "http://www.gocomics.com/pearlsbeforeswine"

    After OK'ing the Properties dialog box, you can test everything right now to confirm that Firefox is now launching a window with tabs. Either:

    • Double-click the shortcut on the desktop
    • right click on taskbar icon pinned, click Mozilla Firefox

    Who do you want?

  • How can I make Firefox automatically show my homepage when you open a new tab (instead of a blank page now)?

    How can I make Firefox automatically show my homepage when you open a new tab (instead of a blank page now)?
    (version 3.6.6 on Windows7 64-bit platform)

    New tab homepage extension:
    https://addons.Mozilla.org/en-us/Firefox/addon/777

  • How can I make a specific page open in a new window when you click on a menu?

    Don't know if its possible, but I have a specific page, I want to open in a new window in the browser when you click on to leave a menu widget.  I know not how to go and mount the coding, but it would be nice if there is an option in Muse for this already.  Any suggestions? Thanks for any help.

    ryanj4799 You'll need to change the Menu Type of manual in the options of the widget and add you links. Then go in the hyperlinks Panel. Check the option open in a new tab/window.

    David

  • How can I make an availability calendar as they use in the touroperater Web sites. A calendar when you click a button, it displays the dates available for booking? Or do I need a database for that?

    I m busy doing a site for a touroperater. I'm trying to figure out how to do an availability calendar. When you click a button, it will display a calendar where you can choose a date where you wish to arrive and when you leave. When you´ve does this, it will show you whether or not your choisen dates are available.

    I hope I have made myself clear with this question.

    Hello

    Take a look at this topic, discussing the same stuff,

    Appointments available for a site of Muse?

    Please let us know if yous until cases of doubt.

Maybe you are looking for