Help with button code please?

I am a novice and have completed my first animated film. I need help with action script.

The film is currently in a loop and I created and invisible button the size of the frame with the intention that a user can click on the picture of the movie to stop it and the second click continue the film from where it stopped.

I used AS event handler method to stop the sequence. I tested it and it works. But I can't understand the appropriate code to restart the movie.

Two questions;

1. I go to the task the right way? (should I use two buttons, a stop, a tenure)?

2. If my approach is possible, can someone give me the right to re - start the movie and put me out of my misery please?

You can use the following after having changed 'yourbutton' and 'yourmovieclip' to use appropriate instance names:

{yourbutton.onRelease = function ()}

{if(!this.) Toggle)}

yourmovieclip. Stop();

} else {}

yourmovieclip. Play();

}

This.Toggle =! This.Toggle;

}

Tags: Adobe Animate

Similar Questions

  • Help with this code please...

    Hi all

    I have a repeating line in a table (+ \-bouton on each line to add / remove). On each line, the user selects a value in a list drop-down down (drop-down list is filled with a literal JavaScript object if it has no chance)

    What I have to do is to check the duplicate drop-down selections on different lines and warn the user that they have selected a value twice.

    I currently have this code in the change event of the ComboBox that works very well, but for the first line only -how to twist it works for all instances of the repeated line "FullRowSubForm"?

    If (xfa.event.newText is form1. WorkforceDepSubForm.WorkforceLineSubform.FullRowSubForm.RepeatableRow.WorkforceRow1. WorkforceNameTextField.rawValue)

    {

    xfa.host.messageBox ("BEWARE you have already selected" + xfa.event.newText + "\n" + "\n" + "that one instance of dependencies should be chosen - please choose another addiction or delete.");

    }


    Thanks in advance

    Ellis

    Hello

    Your repetitive element is FullRowSubForm, don't know if that's right... it maybe too .parent is in the code to add

    In any case, it should work.

    If (form1. WorkforceDepSubForm.WorkforceLineSubform.resolveNodes ("FullRowSubForm. [RepeatableR OE. WorkforceRow1.WorkforceNameTextField ==------"" + xfa.event.newText + "\"]").length > 0) {}

    Concerning

    Bruce

  • Please, help with this code

    Hello

    I use this line for dynamic create menu. I use XML and then I call the attritbutes in Flash. I want each button to call its own function. It works if I use

    = new curr_item.onRelease; News is the name of the function

    but it does not work if I use

    curr_item.onRelease = this.labelA; labelA is an attribute from XML, its value is a new

    I used the trace and the value is not indefinite.

    If you need more code, please let me know. Thanks for any help you can provide.

    this.labelA? This is probably undefined. Most likely, you will need to use:
    Switch (curr_item.labelA) {}
    case "news":
    curr_item.onRelease = News;

  • Need help with the composer please?

    I am very new to view and work my way through the implementation in our society. I get two different messages when the composer fails.

    "Could not perform the operation active directory. COM 2147016654 "error code

    "the partial distinguished name of the ad container specified is not valid.

    I would appreciate help with this. Thank you very much in advance!

    -Brandon

    Please consider awarding points by scoring responses as 'correct' or 'useful '.

  • Need help with buttons!

    Hello someone!

    The thing that I would need help with is the buttons that moves... Say there are 2 buttons on the stage, when someone clicks the button, the button from left to right movement and opens something when it stops there. So long it's fine for me, but now the peal problem.

    The thing is I want the button now on the right rear to place there where appropriate when I click on a button of the second (and it goes right to the place). When I do now the first button remains in place right... Do someone know what to type in Actionscript?

    Please help me... [email protected]

    what you use now which causes your keys for you move?

  • Help with date code

    SRY about that amount of lines of code... but I really need help...

    I have to insert into a table, the date as 12/10/2009 and time, like 22:34:12... but, when I select a date picker date and insert into a text field... the time I got this result:

    If the inserted date was 12/12/2009 time 22:34:12
    The result is... 12/12/0922 34:12:00 < < < < < s get just the number two last year and by inserting the two number first time in the year, as the year 0922...

    I m using a javascript source to create a date picker...

    and this is the procedure to insert in the table...



    PROCEDURE set_atendimento)
    p_id_chamado_atendimento IN chamado_atendimento.id_chamado_atendimento%TYPE,
    p_id_chamado IN chamado_atendimento.id_chamado%TYPE,
    p_informacao IN chamado_atendimento.informacao%TYPE,
    p_datahora_inicio IN chamado_atendimento.datahora_inicio%TYPE,
    p_datahora_fim IN chamado_atendimento.datahora_fim%TYPE,
    p_hora_inicio IN VARCHAR2,
    p_hora_fim in VARCHAR2
    )
    IS

    v_inicio DATE;
    v_fim DATE;

    BEGIN
    --
    v_inicio: = TO_DATE (TO_CHAR(p_datahora_inicio || p_hora_inicio), "DD/MM/YYYY HH24:MI:SS");
    v_fim: = TO_DATE (TO_CHAR(p_datahora_fim || p_hora_fim), "DD/MM/YYYY HH24:MI:SS");
    --
    UPDATE
    chamado_atendimento
    SET
    Informação = UPPER (p_informacao)
    WHERE
    id_chamado_atendimento = p_id_chamado_atendimento;
    IF SQL % NOTFOUND THEN
    INSERT INTO
    chamado_atendimento
    (id_chamado_atendimento, id_chamado, id_operador, datahora_inicio, datahora_fim, Informação)
    VALUES
    (SEQ_CHAMADO_ATENDIMENTO.nextval, p_id_chamado, pkg_operador.get_id_operador, v_inicio, v_fim, UPPER (p_informacao));
    END IF;
    --
    END;

    -------------


    Here's the JAVASCRIPT
    ------------


    < script language = "JavaScript" type = "text/JavaScript" >
    $(function() {})
    $. datepicker.setDefaults({)
    showOn: 'button ',.
    ButtonImageGadget: ' / i/themes/fwsac/includes/jquery/images/calendario.gif',
    buttonImageOnly: true,
    closeText: 'can ', he said.
    prevText: "< previous ',"
    nextText: ' Pr & oacute; ximo > ',
    currentText: "Hoje,"
    monthNames: ['Janeiro', 'February', 'March & eacute; o', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
    monthNamesShort: ['Jan', 'Feb', 'Mar', 'Abr', 'May', 'June', 'July', 'There are', 'Set', 'Out', 'November', 'December'],
    dayNames: ["Domingo","Segunda-feira ',' Ter & ccedil;"] [' a - feira ","Quarta-feira","Quinta-feira","Sexta-feira","Saturday"],
    dayNamesShort: ["Dom", "Seg", "Ter", 'Quality', 'Who', 'Sex', 'Sab'],
    dayNamesMin: ["Dom", "Seg", "Ter", 'Quality', 'Who', 'Sex', 'Sab'],
    dateFormat: dd/mm/yy"."
    firstDay: 0,
    isRTL: false,
    showAnim: "creep".
    });
    $('#P5004_DATAHORA_INICIO,_#P5004_DATAHORA_FIM').datepicker ({beforeShow: fdateRange});
    });
    function fdateRange (input) {}
    return {}
    minDate: (input.id == 'P5004_DATAHORA_FIM'? $("#P5004_DATAHORA_INICIO").datepicker ("getDate"): null);
    maxDate: (input.id == 'P5004_DATAHORA_INICIO'? $("#P5004_DATAHORA_FIM").datepicker ("getDate"): null)
    }
    };
    < /script >


    what I need to change to get the 4 digits of the year and all the numbers of the hour and the conca "|" with the date?

    can anyone help with this, pls?

    Hello again,

    Yes, maybe you need to change them all to varchar2. You work with 2 different types of data, trying to concatenate them and then convert them. I would start with them all the same.

    Don.

  • Help with button over the button (OnHover questions)

    I have a sat button A button B.  B button navigates to another point on timeline onmouseOut. A re acts as the B button onhover when hung on even though its only function is to go to a Web site when you click the button.  How to not to do so.  (it has something to do with the key a session over the B button that acts as a navigation panel.

    To illustrate, I have a circle (a ring) nagiavtion menu which is hover button B animtes, which actually look like the commuter ring to the Viewer.  When they mouse over button B he then times the next section of the scenario that seems to do the menu tilt back to normal.  So currently it is supposed to work like this:

    They hover over button B that comes alive to sign 10.  On board 10 the tilted wheel now has buttons of towing.  one to read a video and the other to go to the site for the link they flew over.

    When a person is placed on one of the buttons the tilting animation replays and retitls the wheels before the link becomes active to click which makes navigation uptight or bugged.  IWant the animation to play the 10 Panel and stay here, then they choose a button to click and only tilt back to normal when the user mouseout/mouseouthandler() the big underlying under button.

    Legitly evolves from the development of the object from one display to the other. Flash is required to send the MOUSE_OUT event as soon as your mouse cursor enters a new object because it is more on the previous object. This does not mean that you however he can only prevent.

    This is a pretty easy thing to manage with the code, but I need to know more about how to configure the button.

    Is the circle rotating a clip or a button? If it is a button that will take more work. If you have coded a MovieClip, then it will be easier.

    After that I know the answers to the above question, that the answer will result by setting just a few flags to know a condition. Once you have lost your drive in place and pop buttons on the screen, the MOUSE_OUT code will need to check that if you rode on all objects you do not want the drive to respond to the. I'll provide more code once you let me know how put you up.

  • Help with required fields please

    I tried to get help with a required field and of forum aid said he's got to work for me but I can't and I have not been able to get answers more of him to help me more.

    I try to have a radio box when YES is selected to demand another field to fill.  The script I got is:

    getField("Location").required = (getField("Group1").value == 'Yes');

    Location is the area I need to be filled if the Group 1 is Yes.  The previous programme of assistance forum said I had to have this script in the two fields in Group 1 and when I do that, nothing else happens.

    What I am doing wrong?

    Please, I need to fix this immediately and I'll use this java script on many other forms that I have so I need to get there soon.

    Thank you in advance.

    This works.  It's perfect.  Thank you very much. You're my hero!

  • Need help with buttons of reminder - highlights

    Hi all

    I'm looking for help with Encoder CS5. I have a project works very well except that I have not made salient for the buttons, at least, I think it's what his name. So when the mouse or the remote control navigates to the up/down button toa it changes color.

    In the properties of my button, the highlight is dimmed.

    How can I request highlights?

    Thank you very much

    Chris Anderson

    Now its just the text.

    You define a prefix for the subpicture.

    http://help.Adobe.com/en_US/Encore/CS/using/WS2C3F3ABD-6457-4ca0-898F-720B7E3D0C10.html

  • Help with buttons in AS3

    OK, so I tried different tutorials for a gallery of photos all day and nothing works. I have everything copied exactly, and they still do not work.

    http://Tuts.flashmint.com/how-to-create-a-simple-image-gallery-in-Flash-CS4/

    This is the tutorial I'm trying right now. When I get to step 5 in it, the Actioscript always comes up with errors.

    Now every tutorial I tried today always come with the same mistakes. I use AS3 in the Panel actions, but for some reason when I try to check the code he always tells me its wrong.vI even downloaded tutorials that give you the FLA and I made sure everything was the same, and corresponds to our code, but mine will give me errors.

    The errors I get are:

    Line 3: description: ' {' planned / source: function play1(event:MouseEvent):void {}}

    {Line 5: description: unexpected '}' encountered / source :}

    I'm ready to pull my hair!

    Here is the ActionScript code that I use:

    Stop();
    Btn1.addEventListener (MouseEvent.Click, play1);
    function play1(event:MouseEvent):void {}
    Stop ('Youth')
    }
    btn2.addEventListener (MouseEvent.Click, play2);
    function play2(event:MouseEvent):void {}
    Stop ('thoughtful')
    }
    btn3.addEventListener (MouseEvent.Click, play3);
    function play3(event:MouseEvent):void {}
    Stop ("dance")
    }
    btn4.addEventListener (MouseEvent.Click, PLAY4);
    function play4(event:MouseEvent):void {}
    Stop ('old')
    }

    Don't know what else you need to know, but if you need anything else, please let me know and I will let you know.

    Thank you very much!!!

    Jen

    There is nothing wrong with the code that you show.  You can check your publishing settings to make sure you're ready upi for the version of code you are trying to use (AS3).

  • need help with the code "meter."

    Hi I had this form of testing that executes_query on the new block instance.
    See the image below:

    http://i95.photobucket.com/albums/l133/element81/screenies.jpg
    [http://i95.photobucket.com/albums/l133/element81/screenies.jpg]

    I have this code on the button (next question) that captures the selected answer and compare it to the correct answer and then move to the next record:

    "If: blk_exam.radio_group76 =: blk_exam.answer_id then.
    -message('correct');
    -other
    -message('wrong');
    : blk_exam.score: =: blk_exam.score + 1;
    end if;
    next_record;
    "

    the problem is I want to create a score counter, but I do not know how to display it in the text (circled in blue) element.

    p.s. I'll hide the score counter, hurt later use it to record the score in the database.


    Ty in advance

    Hello
    No, there are no gaps. In fact, there is error in your code.

    Scenario 1:
    If the blk_exam is on the top of blk_score when I run the blk_exam form works with execute_query but the text of the note element is a bit turn off so I have to click on to a grey, she and her show '0' because of its first value 0 then walla pressing "next question" with my codes work... it increments...

    For this scenario, you use NVL then it will work as...

    :NON_DB_BLOCK.SCORE_FLD:=NVL(:NON_DB_BLOCK.SCORE_FLD,0)+1;
    

    Scenario 2:
    If I make blk_score on top of my blk_exam the text of the note element contains the value 0, but the test module does not work still... I had to click on any text element or anywhere on the form first seized execute_query and shows the question and choices... but then after that, it works well...

    So now don't need to keep the DB NO BLOCK on top just keep the issue/block on top. Normal then run query which is now to work it will work.

    hope you can imagine the two scenario hehe...

    Hope you can imagine the fault encoding ;)

    -Clément

  • Help with multitasking it please?

    Since I got my phone (Moto G 8 GB), multitasking has been terrible. I love the phone, but it's his left out major. Switching between the 2 applications at the same time generally involves having to reload the entire application, even some of the lighter applications such as contacts. I looked in the settings and everything is OK, as the apos as the default background. Also, I don't seem to have any heavy applications running in the background. Facebook is the heaviest app I have on my phone. I wonder if there is anything I can do to remedy to this or if anyone else has this problem?

    When you switch between applications, they restart because the system runs on the RAM. You see the message to reboot on some of these processes because the system killed these processes in order to keep others running and to free some RAM when its need is why you always have a bit of free RAM.

    Even the Air iPad with 1 GB of RAM, even that bike G, has problems, keeping applications running in the background. I'm afraid that this problem is quite normal if you have applications that run in the background taking up RAM. The system kills just the process relatively little important, as Google play music and display of WiFi, to keep others running and have at least a little memory available when it is needed.

    So you're an Android user average above that you have several applications that won't install average consumers, so I recommend going with a phone in the future who has at least 2 GB of RAM.

    P.S. I read in places that Motorola is aggressive with background applications to help with the battery, so maybe that is why the system cannot even keep apps simple people in memory, even if you have still a few available RAM.

  • Help with rotator code

    OK, I've been going through the code in this tutorial:
    http://www.Flash-DB.com/tutorials/loadingAS3/loadingData.php?page=1

    I have a problem with the code below. I need to know how to access the properties of the loaded clip so I can tell when it's over and load another

    one of the table.

    It's the output of the script banner.php (shortened for readability):
    image0 = http://www.listinventory.com/file_uploads/banners/Banner.swf &
    Image1 = http://www.listinventory.com/file_uploads/banners/crimp.swf & cant = 2

    Import fl.containers.UILoader;

    var ar_movies:Array = new Array();
    var ar_links:Array = new Array();

    Create the instance of URLLoader
    var xLoader:URLLoader = new URLLoader();
    var aLoader: UILoader = new UILoader;

    addChild (aLoader);
    aLoader.scaleContent = false;
    aLoader.height = 90;
    aLoader.width = 715;

    the data will come as URL-encoded variables
    xLoader.dataFormat = pouvez

    Load using a URLRequest
    xLoader.load (new URLRequest ("http://www.listinventory.com/libs/class/banner.php"));

    listener onLoad handler
    xLoader.addEventListener (Event.COMPLETE, onDataLoad)

    Add a listener for the complete event
    function onDataLoad(evt:Event) {}
    for (var i: uint = 0; i < evt.target.data.cant; i ++) {}
    Push the values in the tables
    This.ar_movies.push (evt. Target.Data ["image" + i]);
    This.ar_links.push (evt. Target.Data ["Link" + i]);
    }
    Now load the first film in the charger
    aLoader.source = ar_movies [0]; film poster now!

    }
    Now, how can I set up an event listener to wait for the
    movie at the end and then load the following into the UILoader?

    Looks like the film loaded AS2/AS1. AS2 and AS3 are completely incompatible. This means that you cannot read all properties or call all the methods in AS2 (load) clip of AS3 wrapper.

  • Need help with the code for drop-down selection, please!

    I'm falling out of scope with a drop of water in my form. My form is long, and certain areas are in Page 2. When I click on the "Customer hospitality event" drop-down list selection, the fields of P2 do not hide. Here is the code that I have on the menu drop-down:

    -form1. P1.meetDetails.meetType::exit :-(JavaScript, client).

    switch

    (this.rawValue)

    {

    " case" " Customer home ' :

    Header.PRESENCE = "visible";

    meetDetails.presence = "visible";

    meetDetailsaddl.presence = "visible";

    Form1. P2.rstatus.presence = 'hidden '.

    Form1. P2. Status.Presence = 'hidden '.

    breaking ;

    }

    Help, please!

    Thank you!

    I see that references to the P2 have no end of line separators (-).

    Form1. P2.rstatus.presence = 'hidden '.

    Form1. P2. Status.Presence = 'hidden '.

    The JavaScript runtime engine is perhaps unfortunate. Try to add them.

    Steve

  • Please help with simple code. Photo and text formatted.

    Hello
    I want to design a HBox. I want to put the image on the left and the text on the right and the bootom. I have 2 problems.

    1. I want to start the text when the image finishes leaving 10 pix in between.
    2. I want the text under the picture too.

    Here is my code.

    Help, please.

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >
    < mx:HBox id = "LowerLeft" width = "30%" height = "80%" borderStyle = "solid" borderColor = "#fffffc" borderThickness = "2" >
    < mx:Image id = "image1" source = "1.jpg" height = "100" width = "150" / > "
    < mx:TextArea height = "172" width = "288" horizontalScrollPolicy = "off" verticalScrollPolicy = "off" letterSpacing = "1" backgroundAlpha = BorderThickness upper "0" = "0" fontSize = "12" fontFamily = "Times New Roman" wordWrap = "true" textAlign = "left" backgroundColor = "#869 ca 7" color = "#ffffff" >
    < mx:htmlText >
    <! [CDATA [it comes to cardiovascular medicine.translate the extraordinary progress to promote cardiovascular health.] At the level of the core of SCVI is a richl as he iscardiovascular medicine

    It comes to cardiovascular medicine.translate the extraordinary progress of science and the rich thing.

    Cardiovascular MedicineThis is cardiovascular medicine.translate the extraordinary progress. []] > < / mx:htmlText >
    < / mx:TextArea >
    < / mx:HBox >

    < / mx:Application >

    You could add the image inline with the html text and the text to wrap around the image.

    TS

Maybe you are looking for

  • [Feature request] Make a horizontally split firefox window as in provide a single window to the multiple tabs in the IDE.

    Thus, the main window looks like this: |--|--|--|--| <-tabs| || || | <-reviews| |_____________ The idea is to make it look like this: |---|---|---|---|---|| | || 1 | 2 || | || | |____________________ This feature would be nice because many people may

  • Installation of the enclosure OR USB - 6259 Visual C++ Runtime Library Runtime Error

    Hello I am trying to install the NI USB-6259 DAQ card but I get a runtime error that says Microsoft Visual C++ Runtime Library Runtime error! Program E:\setup.exe This application has requested the execution to terminate in an unusual way. For more i

  • I need my monitor to stay on.

    I have a model 780 monitor connected to a COMPAQ Presario S4200NX PC MAG.  My monitor used to stay all the time until I turned it off.  Now, windows seems to be control everything and when I restart my computer my monitor is in sleep mode as soon as

  • ASDM on ASA5510 problem

    Hello I try to access Cisco ASA5510 using ASDM but without success. The running configuration file is attached. I tried to debug ASDM and HTTP and got the following error... HTTP: treatment given to the legacy server admin / [admin]HTTP session: chec

  • No sound after installing windows 7 ultimate.

    I bought a new HARD drive, installed windows 7 ultimate, there is no sound after installing windows7 ultimate. When I attach my old HARD drive, windows XP, I get the sound. Device Manager shows no error. Pls correct me or direct me to over come this