Help with coding button

I do dress up games in ActionScript 2 and I have a problem.

I want to find a button all elements of movieclip with, say, "shirt" in the name of the Instance and move them to the frame 2.  I know how to do this with a single element, (on (release) {}

_root.shirt1.gotoAndStop (1);

}

and on the previous games, I just copied and pasted that several dozen times for each item.  However, on this game, I try to reduce code and learned how to use

for (var i: String in _root) {}

If (i.IndexOf ("_drag") >-1) {}

_root [i] .onPress = function() {}

(put in the code)

(put the closing} s)

on the stage to make items drag and snap into place.  I learned that this code does not have the buttons, which need static commands, I think?  I'm still very novice.

Any help would be appreciated!

You must remove all code objects.  so, no matter what button has code attached there an instance name (for example, btn) so you can use:

btn.onRelease = function() {}

for (var i: String in _root) {}

If (i.IndexOf ("shirt") >-1) {}

_root [i] .gotoAndStop (2);

}

}

};

}

Tags: Adobe Animate

Similar Questions

  • Need help with coding for HTML5 with emergency Flash video

    Hello, need help with my coding in Dreamweaver CS5.5 for HTML5 with emergency Flash video. Not sure if the coding is correct. Do I need any other JavaScript etc.?

    code.jpg

    Another thing is that you don't have to include SWF as aid manual if you provide all 3 ogv, webm & mp4 video formats as one of these formats will certainly be played in any browser that is fully compatible HTML5.

    Still one thing you could do if you don't mind hosting your video on Youtube is to get an embed code for Youtube - in this way, you don't have to convert all the files. YouTube will do it for you and it will play on devices of HTML5 as well as supports Flash player of relief for devices that cannot play HTML5.

  • help with framework button

    I have create a button (b1) can I double clicked and to "over" frame change color, so whene I'm above this button, I saw the color where I choose to "over" frame.

    I also have a (b2) button more and I want when I clicked on that the b1 button go to the color of the frame 'more' up to what I called the b2.

    any help with this?

    Thank you antony

    If b1 and b2 are movieclips and you label their mounts up and clicked with what is obvious, you can use something like:

    B1.onRelease = function() {}

    B2.gotoAndStop ("up");

    this.gotoAndStop ("clicked");

    };

    B2.onRelease = function() {}

    B1.gotoAndStop ("up");

    this.gotoAndStop ("clicked");

    };

  • Need help with the button mute on my helmet XL-3000 of Microsoft Chat, please!

    Hi all!  Hope everyone is having a good TGIF!  If you use my helmet even, I need help understanding the region button mute in the middle of the rope.  The red light is on or off?  I suppose that if I hit the curve button with the microphone on this subject, and the red light, I'm turn off my mike?

    I did some tests with others on the phone calls.  Sometimes, some other hear me, sometimes they do not have.  BUT I NEVER HEAR THEM!  FOR MY WORK, IT IS IMPERATIVE THAT I MAKE CALLS TO OTHERS!  HELP PLZ!  Thank you very much and have a great wkend!

    Hello
     
    Please follow the links below to troubleshoot the computer.
     
    Method 1
     
    Connect one microphone, music player or other audio device to your computer

    Method 2

    Step 1

    Troubleshooting: headsets

    Step 2

    Open the troubleshooting of Audio recording

    Method 3

    How to adjust the microphone volume

    a. click Start, type mmsys.cpl in the search box and press ENTER.
    b.
    in the sound dialog box, click the recording tab.
    c. click Microphone, and then click Properties.
    Note Make sure that the work appears under Microphone. If the job does not appear, click Microphone, and then click on set as default.
    d. the Microphone Properties dialog box, click the custom tab.
    e. select or clear the box amp Microphone.
    f. click the levels tab.
    g. set the volume to the desired level, and then click OK.
    h. click OK to close the sound dialog box.
     
    How to adjust the setting of the voice
     
    a. start the game.
    b. connect to LIVE (the Guide).
    c. click personal settings.
    d. click on voice.
    e. make sure that the recording volume level indicator records at a bar when you talk.
    f. click done.

    If you are still facing problems then, I would say that you contact support for Microsoft hardware for more direct intervention.


    I hope this helps.

     
  • Help with 2 buttons, 2 entertainment and 2 audio clips

    Hey everybody,

    On board, I just animated in After Effects so bear with me here... I'm on a DPS project help for a friend and it left me speechless.

    I have a project to animate with 2 animations, 2 audio clips and 2 buttons. Let's call them Animation1 Audio1 and Button1. Animation2, Audio2 and Button2. I want to have the charge of the composition and wait for the user to click a button, the easy part. Now, I want to have Animation1 play with Audio1 when the user clicks Button1, but I don't want the other elements (Animation2 etc.) to play or be visible. Then vice versa when Button2 is clicked. I was able to get the elements of Button1 to work but then I still see items of Button2. The animations are sync'd to the audio files so they need to play in time with each other. I searched some tutorials on the web, but I'm probably not the right thing.

    Any help is very appreciated.

    RA

    You can bind a callback with the 'complete' event function of the audio tag and you can toggle the display property key to the function call back from events.

    IN the case of composition ready, add the code below

    {sym.$("YourAudioElementId").bind ("ended", Function ()}

    code to display the button here

    });

  • I need help with my button to post a link to my Web site! EMERGENCY AID!

    Hello everyone. Recently, I tried to link a button on my site with Action Script 3, however, whenever I try to load my film, I get an error! The error that says: scene 1, Layer 'Button', frame 1, line 5 1071: syntax error: produce a keyword of the definition (for example, the function) after attribute fuction, no PSE.


    That's what I wrote...


    Stop();


    peshp_btn.addEventListener (MouseEvent.CLICK, PSE);


    Fuction pes(e:MouseEvent):void {}

    var pesLink:URLRequest = new URLRequest ("http://www.penguinentertainmentstudios.com");

    navigateToURL(pesLink,"_blank");

    }



    PLEASE HELP ME I HAVE IVE SUMMER TRYING NOW FOR ALMOST 2 HOURS!

    Use the following syntax:

    peshp_btn.addEventListener (MouseEvent.CLICK, PSE);

    function pes(event: MouseEvent) {}
    var pesLink:URLRequest = new URLRequest ("http://www.penguinentertainmentstudios.com");

    navigateToURL (pesLink, "_blank");
    }

  • Help with active buttons

    I'm looking for a way toggle all buttons in a swf file. I found this search here, but I do not understand and am looking for some in many ways, as shown.

    http://www.Adobe.com/cfusion/webforums/Forum/MessageView.cfm?forumid=15 & catid = 288 & ThreadID = 1240137 & highlight_key = y & keyword1 = active

    I'm playing with having things to load in what I call 'windows' and when you close a window, basically he just collapses the .swf. The problem I have is that the cursor reacts to roll overs and I can still rollover buttons in the same swf if its collapsed. To see this prob go to:
    www.Custom-Differentials.com

    Open the Gallery, then drag the Gallery until the middle of the screen, close the Gallery, then move the mouse around the outside of the "title bar" and watch the change in mouse colors even if there is nothing there. I put a trace in working capital management, so I know the buttons that are the cause. I would like to just a disable a broad view, all of the buttons, then the window is closed.

    Thanks in advance for any help.

    Well, you really want to disable each button/movieclip in your swf file. But if you did you can use:

  • Help with Radio buttons in form

    Hello. I inherited a site that has a simple form. Asked me to change the form of 4 radio buttons added to collect the consumer satisfaction with the content of the Web site. I added radio buttons using Dreamweaver MX, however, they do not work as I planned to do. I was under the impression that option buttons did not allow the user to select several options because when the user has selected a different option, the first option is deselected. My form is currently allowing all four options to choose from at the same time. The code for the form is below. I changed the @ in the email address of the form to avoid possible spam. Any help would be greatly appreciated.

    Looks like you need to change the name = the same on each radio button, if they all have the same name, you can go only one. Then, click the shape in the behaviors panel and don't forget that the name of the radio button is the insertion in the appropriate column db.

  • Help with coding - MouseEnter/leave, then click orders for animation Panel tabs

    Hello!

    I have asked a question similar to this one but unfortunately could not understand!  I hope someone may be able to help now that I am much clearer on what I need...!

    Here is my project of edge animate - http://we.tl/JEOuvnK4SX it's going to be shipped on a site of Muse.

    For now, it works well, with animations that past as the mouse is rolled up on each icon at the top.  I want to achieve is something very similar but with click actions - when icon above is wound on her cheek and reverseplays but the Panel below is played only when you click the icon, in fact - and it maintains until the other is clicked (so the mouse can wonder about the screen without the dissappearing information), it should then playreverse before not to appear a new.

    I also want to start by 'Concept' so that users can see the first round table was screened.  At the present time, there is a big empty space that makes it look like he actually has something missing.

    So I'd like something like that (I hope that makes sense!):

    - ICON (Concept) and PANEL (Concept_1) already active (CLICK) (see image).  It would also be nice if this started as the user scrolled to the bottom of the page that I have some effects of scrolling on the Project Muse.

    MOUSE INPUT:

    sym.getSymbol("ICON").play ('Over');

    LEAVE THE MOUSE:

    sym.getSymbol("ICON").playReverse ();

    CLICK ON:

    < find now enabled "ICON" . playReverse(); >

    < find currently active 'PANEL' . playReverse(); >

    sym.getSymbol("PANEL").play ('Over');

    I've been racking my brain on this but I think that I know enough code!  Any help would be MASSIVELY appreciated!  Thank you

    Screen Shot 2015-02-13 at 2.08.34 pm.png

    An update: icons do not move from respect for the current Panel ==> Website_CDMVD_SymbolsV11.zip - Box

  • Need help with JavaScript button to save as an event.

    Hello

    I use Adobe Acrobat X Pro and am totally new to scripting of forms in Adobe (completely new to Adobe Acrobat as well!).  There is a backup on a form button that opens the Save dialog box under using a trigger (the mouse upward) and action (execute a menu item - file > save under... > PDF...) and it works fine, however, I want to now use javascript to change the behavior of the button so that it uses a trigger (the mouse upward) and action (run a JavaScript script) , and I want that JavaScript to combine the text values in two form fields (a location drop down and a date text field) and use this string concateneated + ".pdf" as the file name when he opens the Save as dialog box.  Make sense?

    This is what I added to the button as a JavaScript so far I use a test at this time string ("NewFile.pdf") and add the string that is concatenated to the script after that I know that the script works as it should.

    var NouveauNomFichier = "NewFile.pdf";

    var pathArray = this.path.split("/"); "

    pathArray.pop ();

    pathArray.push (newFileName);

    this.saveAs(pathArray.join("/")); "

    Up to present two questions:

    1. when I click the button nothing happens, no dialog Save as or whatever it is.

    2 when I check the properties of the button depending on the Actions tab shows property to select Action "Performing a menu item", even if I chose previously 'run a JavaScript '.

    Thanks for any help!

    The saveAs method will not work if the code is placed in a key event. It would need to be in a JavaScript file to the folder level, inside a function of confidence, inside a block of app.beginPriv/app.endPriv. Each user must have the JavaScript file to the folder level. The button can then call the code in the file. It will be possible for users of the form?

  • Help with basic button

    Hello

    I created a button to achieve one thing: mouse over the button to play the music and the mouse to stop the music.

    I have six buttons on the same page. I tried to use the snippet of script, but was not enough knowledge to cusotmize it. Anyone can share code, or point me to resources?

    Thank you very much!

    that would be ok but for flash point has a very special meaning, then you must NOT use it in a class name, name of the variable etc.

    If you have used, instead of using a class sound.mp3, sound_mp3 or soundMP3 or soundmp3, you'd be ok.  convention class names start with a capital letter, so you can as well use the correct convention: SoundMP3, Sound_mp3 or Soundmp3 etc.

  • help with condensation button code

    Hello

    I have a grid composed of 16 rows, seven columns. So there are 7 buttons in each row. on the buttons, I have a name instance for example ButtonClick1_1, ButtonClick1_2, ButtonClick1_3, ButtonClick1_4 etc and for the second row, ButtonClick2_1, ButtonClick2_2 etc.

    my code AS the action is the same for each button. I currently have a ton of code such as the following.

    ButtonClick1_1.addEventListener (MouseEvent.CLICK, clickHandler1);
    function clickHandler1(event:MouseEvent):void {}
    ButtonClick1_1.alpha = 0; 50% alpha
    Stop();
    }

    ButtonClick1_2.addEventListener (MouseEvent.CLICK, clickHandler2);
    function clickHandler2(event:MouseEvent):void {}
    ButtonClick1_2.alpha = 0; 50% alpha
    Stop();
    }


    ButtonClick1_3.addEventListener (MouseEvent.CLICK, clickHandler3);
    function clickHandler3(event:MouseEvent):void {}
    ButtonClick1_3.alpha = 0; 50% alpha
    Stop();
    }

    I'm doing this for 112 buttons! I know there is a way to simplify this with a loop for, but do not know how to code. Any ideas?

    Mark this thread as answered, is it.

  • Help with radio buttons

    I have a group of radio as follows STATIC2:; Yes; No.; NO.

    default value is no.

    the name is P1_MSD1 and the label is BUILT from MSD LEVEL 1.
    I just want to change this to Yes after a process is running.

    I use

    Select 'Yes' in: double P1_MSD1;

    But it does not work, please help.
    Thank you
    Doug

    Hi Doug,.

    Do your radiogroup source:

    STATIC:Yes,No
    

    Make your process to be an anonymous PL/SQL block with the code as follows:
    : P1_MSD1: = 'yes ';

    The value of the conditions of this process running at however desired.

    Edit: Oh I misread... place this statement at the end of your process... this way you can be sure it happens every time the process runs :)

    Mike

    Published by: Gerd 23 November 2009 14:30

  • Help with close buttons



    I have read forums and scouring the internet to find a way to write a flash button or create one in captivate 3 using the click on run javascript:self.close() javascript function and I tried the ActionScript on (release) {}
    getURL ("javascript:window.close ()" "");
    }
    Please help me.

    Thank you

    Alex

    Hi Alex

    Is it possible that you are overthinking?

    Try to set the end action of your project to close the project. Then insert a button object or area click simply jumps to the last slide. What is happening is that the user clicks on the button, the last slide appears and the project closes (if possible).

    See you soon... Rick

  • Need help with coding!

    Hi friends,

    I have a script that I need to implement forms of oracle 10g on windows XP.

    (1) I have two blocks
    (a) employees
    (b) departments

    When the last item is filled in by the user must be the order of the day on the first item in the package of services. In what trigger can fire go_block builtin for that to happen in most of the triggers I tried that it says it's a limited builtin.

    (2) I need a coding of oracle forms to give me all the possible combinations of the number if I give the combinations. for example if I give 5 numbers, should give me all combinations of the 5 numbers that I gave.

    Kind regards
    Manoj Chakravarthy

    Hello
    Try this

    Employees-> Property Palette block-> Style of Navigation-> do like change DataBlock

Maybe you are looking for