How do I create a play button for movie clip using AS3

Hello.
Bit new to this and have been searching the adobe forums and google. I am trying to create a button that will play an imported MovieClip.
I have a movie clip that I've imported into it's own layer (Layer1) Frame 1.  I've given the MovieClip an instance name of foundationMovie.
I've created a button and have that on its own layer(Layer2) above layer1, it is also in Frame 1.
I've added a
stop (); action to layer2
The video is not set to autoplay.
I want the video to start playing when the viewer clicks the button.  I know I've got to put some kind of event listener using AS3 in my timeline somewhere.
I've found some code and I've been trying to work with it.  I'm sure I've mutilated it beyond usability but this is what I've got.
stop ();
player.addEventListener(MouseEvent.CLICK,play);
function play(event:MouseEvent)
gotoAndPlay("foundationMovie");
If someone could point me the right direction or help me with my code I would really appreciate it.  Thanks.

First, you need to clear up what you are working with... a movieclip and a video are usually entirely different things.
Next, your code may get you started on your way with some changes.   You shouldn't use "play" as a function name due to there already being a play() method/function in Flash.
If the movieclip is a movieclip and has an instance name of "foundationMovie", and your button has an instance name of "player" then the following adjusted code would normally work...
stop ();
player.addEventListener(MouseEvent.CLICK,playMovie);
function playMovie(event:MouseEvent)
     foundationMovie.play();

Similar Messages

  • How do I create an 'upload facility" for my website using Muse.

    How do I create an 'upload facility" for my website using Muse.  We are a print company and is how we receive most of our work.
    Iain

    Hey Iggy,
    These might help:
    Muse
    http://tv.adobe.com/watch/introducing-business-catalyst/getting-started-with-business-cata lyst-and-muse-what-is-business-catalyst
    http://tv.adobe.com/watch/introducing-business-catalyst/getting-started-with-business-cata lyst-and-muse-creating-and-publishing-sites
    -Dave

  • How can we create a OCA button for Overview page?

    Hi Experts,
       Please help me with all the steps for creating an OCA button for Overview page. I have already tried it for table view in Viewset and it is working fine but how to do that in Overview page.
    Thanks and Regard,
    Pranoy Kumar

    Hi Pranoy,
    You need to redefine two methods of OVP view's _IMPL class and paste this code:
    METHOD if_bsp_wd_toolbar_callback~get_buttons.
      DATA:  ls_button    TYPE  crmt_thtmlb_button_ext.
    Ls_button-on_click = 'EDIT'.
         ls_button-type = cl_thtmlb_util=>gc_icon_edit.
         ls_button-page_id = me->component_id.
         ls_button-enabled = abap_true.
        APPEND ls_button TO rt_buttons.
      ENDMETHOD.                    "if_bsp_wd_toolbar_callbacku2014get_buttons
    method IF_BSP_WD_TOOLBAR_CALLBACK~GET_NUMBER_OF_VISIBLE_BUTTONS.
    *CALL METHOD SUPER->IF_BSP_WD_TOOLBAR_CALLBACK~GET_NUMBER_OF_VISIBLE_BUTTONS
    *  RECEIVING
        RV_RESULT = 6.
    endmethod.
    And write the event handler method for here in my case EDIT, or you can write depending on your requirement.
    Regards,
    Vishal.

  • How do I create a submit button for my form? I would like it to send the completed PDF to an email address

    Hi everyone,
    I recently upgraded to Adobe XI and I can't find a "submit by email" button for my form. I created a button and tried to set up some actions but, I can only get the button to direct the user to a URL. How do I make it send the completed PDF to our designated company email address? I'm not too familiar with JAVASCRIPTS so I haven't tried that plus I heard it may not work with users with adobe reader.
    Any help would be appreciated.
    Thanks,
    Matt

    Thanks for the input. I think you might have a different version of LiveCycle than the copy I have since it looks a little different. However, I found the answer in Adobe help. I had to type "mailto:" before the email address to indicate it's an email and not a URL. See below.
    To collect form data as attachments to email, type mailto: followed by the email address. For example, mailto:[email protected]

  • How can I create a custom button for opening a form?

    I have a parent form having child forms. In my main form I want to create custom buttons for opening child forms. I want to use master-detail form but there are more than one child forms, and in master-detail form I can only create one detail form. So I will create a form based on a table and in that form I will call the child forms by custom buttons. Can I do that?
    Thanx,
    Gulsah.

    This can be easily done. First open up two instances of your Portal. In one window, you will need to go into your component you wish to link FROM. In the other window you will need to go into your component you wish to link TO. In the component you wish to link TO there will be a moduleid. Note this somewhere. Then, you will see an area that says: "Call Interface: Show". Click on this. (In the window you are linking to.). In this window, you will see a bunch of stuff. At the bottom you will see a URL call. This is the call you need to use. At the top, it explains each piece of the URL call. Just subsitute YOUR appropriate information into the URL call. In the form you wish to link FROM, create a button. Once you create this button, it will appear at the bottom, click on it and you will see an area to insert a Javascript. Click the onClick and insert:
    //this is the variable you want to pass from one form to the other
    get_field_name = getField(this.form,'COLUMN_NAME_IN_DATABASE');
    //this is so you can open the "child" form
    window.open('/pls/cc_prod/DAD_NAME.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=MOD_ID_HERE&p_arg_names=_sessionid&p_arg_values=&p_arg_names=COLUMN_NAME_IN_DATABASE&p_arg values='+GETFIELD_NAME+'&p_arg_names=_COLUMN_NAME_IN_DATABASE_cond&p_arg_values=%3D');
    In the fourth tab, where it says, "....before displaying form" insert the following: (This will tell the form how to handle the getField function.)
    htp.p('<script language="JavaScript1.3">
    < !--
    function getField(form,fieldName)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    for (var i = 0; i < form.length; i++)
    slicedName = form.elements.name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName)
    return form.elements[i].value;
    //-->
    </script>');
    I hope this helps.
    null

  • How do I create a disk image for windows 7, using a windows computer for USB bootcamp for mac?

    Hi There, I have just bought a new 2013 iMac.
    Spec: 3.4 GHz intel core i5, 16GB 1600 MHz DDR3 Memory , NVIDIA GeForce GTX 775M 2048 MB Graphics with OS X 10.9.4.
    How can I create a 'disk image' from a windows 7 professional 64bit installation DVD using a windows laptop with windows 7 Operating system on? I want to transfer this 'disk image' (ISO?) to a USB ready for installing windows onto my 2013 iMac using bootcamp?  I want to use bootcamp from a USB as I have no disk drive for the installation DVD on my iMac. I hope all this is clear.
    Thank you. Joe

    Yes, that's correct, at least not directly. You can create a blank disk image, copy the file to the mounted disk image, then burn the image to a CD/DVD.
    Open Disk Utility and select Blank Disk Image from the New menu. Provide a name, Save location, and select the image size from the drop down menu. Leave Encryptions at None and Format as read/write. Click on the Create button.
    After the image file appears the "removable" disk should be automatically mounted. If not double-click on it to mount it. A "removable" disk icon will appear. Drag the file you want to place on the disk image to the "removable" disk icon. The eject the "removable" disk icon. Now select the disk image file in the DU left side list and click on the Burn icon in the DU toolbar. Be sure to have a blank disc ready.
    The above is actually the "long" way to do this. A much easier way is to simply insert a blank CD or DVD into the optical drive. The Finder will pop up a dialog asking what to do. Select the option to mount on the Desktop. You will now see a disc icon on the Desktop. Drag the file you want to burn to the CD/DVD, right-click or CTRL-click on the disc icon and select Burn from the contextual menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • How Can I Create a Print Button on a PDF Using Acrobat Pro That Will Also Work on iOS?

    I created a Print Button on a PDF document using Adobe Acrobat Pro on my Mac.  The Print button works perfectly on different browsers on my Mac and on Windows (running under Parallels Desktop) as well.
    When I open the document on my iPad the Print button doesn't even appear.  I am guessing that this is a Flash issue but it may be more related to the fact the the action for the button is to access the Print menu item, which doesn't exist under iOS.
    Is there any way to create a Print button using Acrobat Pro that will work on a Mac and Windows but also on iOS?

    In order to initiate printing by clicking a button, the button has to have either an "execute menu item" type action or use the "print" JavaScript method. As you guessed, the former won't work since there are no menu items to execute, and the latter can only work if the particular PDF viewer you're using supports it. I'm not aware of any that do on iOS.
    The button doesn't appear because you're probably opening it in the default PDF viewer, which doesn't support forms at all. If you were to open the form in Adobe Reader, you'd see the button but it wouldn't work.

  • Formats for movie clip used in PSE 4 slide show

    Still finding it difficult to find documentation of what formats are supported for using digital camera movie clips in PSE 4 slide show.
    The movie file from my Canon camera is 640 x 480, 30 fps Motion JPEG and has a .AVI extension. I am able to use it "as is" in a PSE 4 slide show. However, sometimes I need to trim the movie clip in Windows Movie Maker 2 in order to keep only the best part.
    My question is what parameters can I specify to save my movie clip in Movie Maker 2 so that I can use it as a movie clip in a Photoshop Elements 4 slide show that will be saved as a WMV file?
    Barb O

    Karin Sue,
    >Also, are the projects saved in a folder somewhere, or only as part of the Catalog?"
    The definition of the "project", which is the "Creation" in Organizer terms is saved only in the Catalog.
    >If you publish your creation as a pdf or wmv they are saved in the folder you designate. Once published, I don't believe there is any way to edit. If you save the creation, you can go back and edit and republish if you like.
    Yes, the WMV or PDF file is saved in the folder that you designate. You are correct that if you save the Creation, you can go back and re-edit. When you Save the Creation gets a thumbnail within the Organizer photo well and you can click on the thumbnail to go back in to the Creation process make modifications and save a new WMV or PDF file.
    Note: that the Save window documents that the PDF choice does not support some options such as Pan and zoom, videos, and certain transitiions.
    Barb O

  • How do I create a print button for use in Interactive PDF?

    I have a document created in InDesign CS4 which I will be converting into an interactive PDF (which has various links added on a master page so they appear on every page), one of which I would like to be a "Print" button.
    I know how to do this in Acrobat Pro, but I don't want to have to create a button in Acrobat and then copy/paste it onto all pages in my document. Surely there must be a way to create a button of this type in InDesign CS4. Any help would be greatly appreciated.

    Sorry, no. Print button functionality must be added in Acrobat.

  • How do i mute the sound in a movie clip using action script?

    assuming my movie clip is named "movie"

    You should use SoundTranfrom object and soundTransform property of your movieClip.
    At first you have to instantiate soundTransform object and assign value of 1 to it's volume property:
    var soundTr:SoundTransform = new SoundTransform();
    soundTr.volume = 1;
    Than a simple toggle function, which changes volume property of soundTr and assigns the object soundTr to your movie's soundTransform property.
    function toggleMute():void
        if(soundTr.volume == 1)
            soundTr.volume = 0;
        }else{
            soundTr.volume = 1;
        movie.soundTransform = soundTr;
    Regards,
    gc

  • How to create a flash button, for mobile phones?

    i want to know the way how i can create a flash button for mobile in flash CS4.

    Create a button of type "button",set the destination url property to the place u have kept the file.But ur file should be anywhere in Common_top.If this file is stored as blob u can use messagedownload bean.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How To Create On Submit Button For Master_detail Page ?

    I have adf page that is master And detail view.
    i want to have one submit button for master and detail block

    Duplicate of  How To Create On Submit Button For Master_detail Page ?
    Please don'r post your question multiple times.
    Timo

  • How to create a help button for downloading a help file in OA Framework

    Hi all
    I want to create a help button for downloading a help document.Plz suggest me how to do it.
    Thanks
    Bhupendra

    Create a button of type "button",set the destination url property to the place u have kept the file.But ur file should be anywhere in Common_top.If this file is stored as blob u can use messagedownload bean.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • HT204370 I cant fined the play button for a movie ive already rented... How do you restart a movie???

    I cant fined the play button for a movie ive already rented... How do you restart a movie???

    Once you rent it it will tell you when its 'ready to watch' and you can then hit play. You can also access it by going to the movies tab, and the poster image for the rented title will appear in the top left. You can also go to settings - general - itunes store - check for rentals.
    Note: a 6mbps connection is required for instant HD rentals. If you are much lower it may take some time before you can watch. Accessing other content during this time or turning off the device will flush the rental, requiring a reload.

Maybe you are looking for

  • Noob needs help with site creation -- interactive?

    I want to make a site where people can post and/or reply to other posts. I've used iWeb for a couple years so I'm good with "static" sites but how can I make one where people can post to the site themselves? For example, I write ::"what is your favor

  • "java.lang.NullPointerException" while assigning Organization

    Hi, Recently we have upgraded our IDM environment from version 7 to 7.1.1.6. After that we get the "java.lang.NullPointerException" while assigning an Organization during the creation of the user through from Idm Admin Interface. Is there any file i

  • Tablet pc ideatab a1000-t flashing

    sir/madam i need flashfile and tool for tablet pc ideatab a1000-t . i get a1000f flash done success but there is no calling facility. so please send tablet pc ideatab a1000-t  flashing files and tools.... its urgent  i went to outsation thats y.

  • Post Payment not Clarify but on Account for payment batch

    Hi, this is FI-CA account current. My customer processes distribution batches. The Clearing control finds the account but not an open item with same due date. Now the payment is posted for clarification. In clarification we can set a flag to post it

  • How to open "word" document

    I had some old Word documents on a Dell laptop that I wanted to view on my iMac.  Using a USB drive, I successfully transferred the files from the Dell to the iMac.  Some of the documents open up normally for viewing, etc.  Others do not.  A Pages bo