• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding Video(.M4V) and calling it using buttons

Explorer ,
Jun 07, 2017 Jun 07, 2017

Copy link to clipboard

Copied

Hi Animatites,

Scenario:

I have three buttons on the stage and on click of each button a video will load and play. Can anyone suggest how can this can be achieved?

I have to eventually put all the files and ensure it can be played via a DVD. So the format I assume will remain as .swf. Is my assumption correct or can some other format recognize the button interaction as well?

The current video format is M4V. Do I have to change the video to some other format for animate to recognize it?

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 08, 2017 Jun 08, 2017

Votes

Translate

Translate
Community Expert ,
Jun 08, 2017 Jun 08, 2017

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 11, 2017 Jun 11, 2017

Copy link to clipboard

Copied

I created the stuff and it works perfectly fine from a Flash Player. However, the videos don't load, if I open it in IE or the Chrome Browser.

Code:

--------------------------------------------------------------------
import flash.events.MouseEvent;

import fl.controls.Button;

stop();

txtTitle.text = "";

btnPres1.addEventListener(MouseEvent.CLICK, buttonClick);

btnPres2.addEventListener(MouseEvent.CLICK, buttonClick);

btnPres3.addEventListener(MouseEvent.CLICK, buttonClick);

function buttonClick(e:MouseEvent)

{

  var buttonIndex = e.target.name.substr(7);

  movieHolder.source = "Presentation1_part" + buttonIndex + ".mp4";

  switch (buttonIndex)

  {

  case "1": txtTitle.text = "XYZ1";

  break;

  case "2": txtTitle.text = "XYZ2";

  break;

  case "3": txtTitle.text = "XYZ3";

  break;

  }

}

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 11, 2017 Jun 11, 2017

Copy link to clipboard

Copied

attach a screenshot showing the directory that contains your fla and mp4s.

also, you can debug using the developer console in chrome or ie.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 11, 2017 Jun 11, 2017

Copy link to clipboard

Copied

Ok. I have attached the Image.
test1.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2017 Jun 12, 2017

Copy link to clipboard

Copied

Hi,

I was able to resolve the issue in IE by adding C:\ to the trusted locations. But it still doesn't work for Chrome Browser. I even tried it in Incognito Mode. It gives me the Flash Player logo and asks me to allow the file to Run Flash. When I say ok, nothing happens after that.

I am really not sure what's going on with Chrome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 12, 2017 Jun 12, 2017

Copy link to clipboard

Copied

chrome has its own embedded flash player so it's not unusual for it to behave differently than browsers that use adobe's plugin.

you should post on one of the chrome forums. they discuss lots of issues related to their flash player.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 12, 2017 Jun 12, 2017

Copy link to clipboard

Copied

LATEST

Sure. Let me try that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines