How to create a play button to the video clip using AS3

Hello.

This new bit and searched the forums adobe and google. I am trying to create a button that will play an any MovieClip.

I have a clip that I imported into its own layer of rebar (layer1) 1.  I gave the MovieClip an instance name of foundationMovie.

I created a button and that on its own layer (Layer2) above layer1, is also in the picture 1.

I added a

Stop (); action of layer2

The video is not set to AutoPlay.

I want the video to start playing when the viewer clicks the button.  I know I have to put some sort of event using AS3 listener in my calendar somewhere.

I found a code and I tried to work with her.  I'm sure I've mutilated it beyond usability, but it's what I have.

Stop ();

player.addEventListener (MouseEvent.CLICK, play);

function play(event:MouseEvent)

{

gotoAndPlay ("foundationMovie");

}

If someone could point me in the right direction or help me with my code I would really appreciate it.  Thank you.

If you use the FLVPlayback instance it should be on your scene, or you should have the code added to the scene. If you use the FLVPlayback instance, you don't need to import the video file, you have to have the component dynamically load by assigning the file to its source property.

That said, the code that I showed earlier would continue to operate if the component FLVPlayback instance name of the instance 'foundationMovie '.  It's because the component has a play() and stop() supporting method.  What you need to do probably, is looking for the FLVPlayback class in the help documentation of Flash to see all that is avialable for her regarding the properties, methods and events.  You will probably find there examples as well to help you configure things.

Tags: Adobe Animate

Similar Questions

  • How to create a play button to start video?

    I embedded a video in a slide and I would like to create a 'play' button that triggers the playback of this video.

    Is that possible through the unique actions on captivate 9?

    Thanks in advance for your answer.

    You insert video as video multi Slide? Only then can it be controlled by Captivate. Use a button (form) with a stopping point just before the beginning of the video timeline:

  • Smartphones blackBerry how to create a new folder in the video folder in the media

    Hi, I'm trying to figure out how to create a new folder in the video folder in the media. I can easily create new folders in the pictures folder, but not in the videos... Why? Thanks in advance for your help.

    well I'm sorry, I think that I have not read your emails correctly.

    The media application doesn't care about records at all. It will read the files, the tags when they are available, playlists, but it will not show the files. with the exception of the pictures.

  • How can I Center the play button on the video?

    http://www.VideoJS.com/

    Thank you

    Hello

    Seems that you have already set up and left for the ' play' button in the class that you are using, but somehow, I'm not able to understand this.

    I tried to define:

    left: 450px! important;

    top: 150px! important;

    In the class = "vjs-large-button play, so that it overrides the previous value, and the button comes in the middle of the video image.»

    You will need to set the top and left side so that the button must be placed in the middle.

    Thank you

    Sanjit

  • How can access a button inside the video clip

    I have a button named a_btn. This button is located in a clip name a_mc passage. This button is on the first frame. then when you write the code for that:

    function submit(event:MouseEvent):void

    {

    trace ("hii")

    }

    a_mc.a_btn.addEventListener (MouseEvent.Click, Submit);

    his work. but when I keep this button on 2nd chassis or anywhere not in 1 frame inside that movie clip, then I get error runtime as:
    TypeError: Error #1009: cannot access a property or method of a null object reference.
    to NewFlashDocument_fla::MainTimeline / NewFlashDocument_fla::frame1 ().
    How can I access this button on the second picture...

    You cannot reference an object until there are.  Thus, if a_btn is on the 2nd frame of a_mc, you must wait until this 2nd frame plays before trying to refer to a_mc.a_btn.

    If not, put a_btn on the first image and set its visible property to false in the first frame and true as part of the 2nd.  Then you can use your current code and duplicate the design you are trying to achieve by moving the button on the 2nd frame.

  • How to create a help button on the Panel before the VI?

    Hello

    I want to create a button for example a help button on the front of the VI so pressing that any new user can open folder in which I store some guidance assistance.

    Means do I have a folder on my desktop that I save all data which should prove useful for new user so if some new user want to run the program, and he has no idea how to run the program then he can simply press the help button and after pressing this issue of aid will be open then read then user instruction may start the program.

    Hope you get my point.

    Thank you very much.

    I think the problem is now resolved...

    Here I attached screenshot of the solved problem that might be of help.

    I thank very you much for your help and your time.

  • How can deselect an option button in the group 'Size', using Applescript to print several pages at 100%

    I hit a serious problem to update my application to use Adobe Acrobat DC 2015.

    I try to use the graphical interface to print multi-page documents but do not uncheck an option "Shrink oversized pages"button, checking a different 'Real size'button, in the same group. The two buttons are checked, and printing is by default the Junk button, print several pages on a sheet, instead of 100%.

    Anyone know of a different way to uncheck that darn button, or better yet, how to direct print the document. I can't find any online documentation of printing direct formatting.

    I need to print all pages, to 100%, with a particular printer, the "theLargePagePrinter". In addition, we use Pitstop Pro 13.

    TIA,

    Concerning

    Santa

    say application "Adobe Acrobat" to Activate

    the shell script ("sleep 0.2")

    say application 'System events' to say process "AdobeAcrobat.

    the shell script ("sleep 0.2")

    try

    with keys 'p' command down

    end try

    the shell script ("sleep 0.2")

    try

    click 1 of the Group pop up button 1 of the 'Print' window

    end try

    the value x to 0

    Repeat until there are menu 1 of popup button 1 of the Group 1 of window 'print '.

    the shell script ('sleep 0.1')

    the value x to x + 1

    if x ≥ 20 then exit repeat # wait 2 seconds

    end Repeat

    the shell script ("sleep 0.2")

    try

    click menu item (my theLargePagePrinter) of 1 of 1 of Group pop up button menu 1 of the 'Print' window

    end try

    the shell script ("sleep 0.2")

    try

    click on radio button "All" of the Group 2 of window 'print '.

    end try

    try

    click on CheckBox 'Size' of the Group 3 of window 'print '.

    end try

    the shell script ("sleep 0.2")

    try

    try

    say 1

    say (there are (box option "Shrink oversized pages" of the Group 3 of window ' print')) as text -< 'true'

    end try

    try

    2 say

    say application 'System events' to display the dialog box ()get each attribute of option button of the Group 3 of 3 window 'Print') as text -< fails

    say 3

    end try

    Repeat while value of radio button "Shrink oversized pages" of the Group 3 of window 'Print' is 1

    the shell script ("sleep 0.2")

    click on radio button 'Real size' of the Group 3 of the window 'Print '.

    # the value value of radio button "Shrink oversized pages" of the Group 3 of window 'Print' to 0 -< cannot set the value

    the shell script ("sleep 0.2")

    end repeat -< maintains a loop

    end try

    the shell script ("sleep 0.2")

    try

    click on radio button 'Real size' of the Group 3 of the window 'Print '.

    end try

    -more than < code >

    tell the end

    tell the end

    In the Acrobat SDK kit, locate in the JavaScript section and at the IAC-> section AppleScript to learn how to run a JavaScript via AppleScript. You have the Acrobat SDK kit?

  • How to create a done button on the bottom in the center of the screen

    Hello

    I encode a preference window for my application, which is a normal screen. I have several controls text and choices on the page and I would like to add a button called 'Complete' on the bottow of the screen Center. Please advise,

    Thank you

    Henry

    Not tested, but I think it should work.

    Create a ButtonField done, using style Field.FIELD_HCENTER.  Add to a VerticalFieldmanager.  Change you to be a display screen and add the VerticalFieldManager to the screen using setStatus, i.e.

    .setStatus ();

    Let us know if it does not work.

  • Add the video clip in AS3

    I want to have a future clip on a specific pixel coordinate. How could end this code?

    If pro already exists and has been added to the display list:

  • How and where to use Java script to create a new button in the page of detail of the object

    Hi all

    I want to create "New/Add button" in the page of detail of the object. If I'm not mistaken I need to use the java script for this, but could you please let me know how and where to use Java script to create a new button in the page of detail of the CRMOD object.

    Thanks in advance.

    Kind regards
    Manish

    Any related object on the details of the page should have an 'Add' or 'New' or the two default buttons - it of a vanilla feature and will do the required action.

    If you want to change this behavior and do something delicate you will potentially have to to go for javascript. You must add the javascript code in a web custom tab on this object.

    Admin--> Application Customization--> Contact--> Applet Web Contact

    Now add your javascript in the code box, after selecting the type = HTML for this web applet, expose this web applet on the Contact details page layout and your javascript will be called every time this page is loaded.

    Check this document online to see how javascript can be integrated into the CRM on demand http://helponmyproject.com/TTOCOD/

    See you soon!
    Royston

  • How to create our own button to print the dashboard to PDF

    Hi Experts,

    Someone can tell me how to create our own button to print in PDF dashboards, and similarly to save, we create a button more. The one facing this type of requirement can.

    Thank you
    Malli

    CheminPortail = / shared, KeyBank, _portal, Test AND page = name1
    In your code below shud be the same portal path of your dashboard and page shud exactly equals name of the page you want to view in pdf format. It was just an example I gave you. Replace the 2 values and you are done

  • I would like to know how to create a slide show on the pictures I imported on my computer.

    I have vista and found library in my programs. I was able to import pictures from my digital camera, but can't see how to create a slide show. Please instruct me how to do this. Also, I have several clips video and panoramas. How can I include these? Thank you in advance. Shoshana

    I have vista and found library in my programs. I was able to import pictures from my digital camera, but can't see how to create a slide show. Please instruct me how to do this. Also, I have several clips video and panoramas. How can I include these? Thank you in advance. Shoshana

    =============================================
    Perhaps the following links will propose a few ideas:

    Windows Vista-
    See the photos as a slide show
    http://Windows.Microsoft.com/en-us/Windows-Vista/see-pictures-as-a-slide-show

    Windows Vista-
    Choose a theme for your slide show
    http://Windows.Microsoft.com/en-us/Windows-Vista/choose-a-theme-for-your-slide-show

    Windows Vista-
    Use pictures as a screen saver
    http://Windows.Microsoft.com/en-us/Windows-Vista/use-pictures-as-your-screen-saver

    If you want to create a slide show, you can save and share with others
    Movie Maker, ay be worth a try:

    Windows Vista-
    Demo: Create a slide show with music in Windows Movie Maker
    http://Windows.Microsoft.com/en-us/Windows-Vista/demo-create-a-slide-show-with-music-in-Windows-Movie-Maker

    How to easily create and edit slide shows/videos
    Windows Movie Maker (Vista)
    http://www.YouTube.com/watch?v=0Lz046qcBk4

    In regards to your panoramas... free Photo Story 3 can a pan
    side to side... just set a start and an end point. However... Photo
    History cannot import videos... just photos.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    PhotoStory 3 for Windows
    http://www.Microsoft.com/download/en/details.aspx?ID=11132
    (works on XP, Vista and?) Win7?)

    This is not a full tutorial, but should be enough to help you started...

    First be sure that the photo is less than 7200 x 7200 pixels pixels.

    Import a panoramic photo in Photo Story 3 and move on
    the screen "tell your photos and customize the animation."
    (do not remove the black borders)

    On the left, click Custom animation...

    Check the box on the screen to customize the animation...... "specify
    Start and end Position of the movement "." Resize and reposition the
    Start management Position and final Position you prefer and
    on the left, click the Preview button to see the result.

    Also you can import multiple instances of a photo and
    Pan from point A to point B in the first instance,... then point B
    point c on the second instance and so on.

    When the effects of movement are completed you can add music if
    you want and go to the screen "Save Your Story."

    You can left click on the 'Settings' button for several choices of
    resolution... the profile of 1024 x 768 is perhaps a good choice.

    Also... Choose a backup location and a name for your video.

    To save the project as a. WMV video file... click Next
    last time.

    Then you can import that video as well as other photos and
    video clips in DVD Maker to create your DVD. If you have
    problems with the video clips you may need to convert to MP4
    paste them into WMV format before importing in creation of DVD.

    More info...

    Create a story from a single
    Another Photo with Photo Story 3

  • Try to play a movie but I have WMP cannot play the file how to get to play or delete the Xvid codec to play?

    How to get to play or delete the Xvid codec to play? Movies in AVI format, I converted it to WMP, but he won't play again

    No guarantee but maybe you need the XviD Codec.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    XviD Codec
    http://www.xvidmovies.com/codec/

  • How to create a menu button of 3 lines for navigation on a mobile site?

    How to create a menu button of 3 lines for navigation on a mobile site and do trigger the Accordion Panel? I created my first sites on Muse and can't seem to understand.

    Download icons FontAwesome and install it manually.
    https://fortawesome.github.IO/font-awesome/

    Add web fonts self-hosted | Adobe Muse CC tutorials

  • Remove the play button in the center of the image

    Hello

    Excuse me for my English, English French by Bing translation.

    Captivate 5.5

    I created a project:

    Playback bar: I changed the colors.

    Project > Preferences: not AutoPlay, but I put an image.

    Beginning and end > stop.

    When you run the project, there is a "play" button in the center of the image. Is it possible to delete or hide this button and start to read only the button of the PlayBar?

    If necessary I would put screenshots

    Thank you very much for your answers.

    Hello to all and good night to the time difference
    Thank you for your answers and I examined my project.
    Captiv8r made me think to click on areas. I have inserted a visible click box, and then select pause. She is more beautiful with the image, but the main thing is the demonstration in which the first slide has 4 click boxes that refer to the chapters.
    Why make it complicated it was simple, I'm
    Captivate is a great tool, but I am a beginner.
    I consider that my topic as solved.

Maybe you are looking for