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

Change Video Component SRC within MC

Explorer ,
Apr 06, 2018 Apr 06, 2018

Hi - In Adobe Animate CC (CreateJS)  I have a video component nested within a movieclip. This movieclip is then added from the library via script. That works.

I now want to dynamically add or remove the video file path/src to it in CreateJS, This doesn't work no matter what I try. How do you change the source of a video once the component is loaded? Please help!

e.g.,

this.mc.videocompinside_mc.src="videopath.mp4";

755
Translate
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 , Apr 10, 2018 Apr 10, 2018

have you tried using the code snippet??

Under Window>Code Snippets>HTML5 Canvas>Components>Load a Video

/* Load a Video

Change the URL below.

*/

var videoURL = "https://MYwebsite.com/My-Video.mp4";

this.instanceName.on("added", function() {

    $("#instanceName")[0].src = videoURL;

}, this, true);

Hope that works! Or a possible work around is to have each of your videos in a MC, and then just swap out the MC's from the library.

Cheers,

mark

Translate
Community Expert ,
Apr 10, 2018 Apr 10, 2018

have you tried using the code snippet??

Under Window>Code Snippets>HTML5 Canvas>Components>Load a Video

/* Load a Video

Change the URL below.

*/

var videoURL = "https://MYwebsite.com/My-Video.mp4";

this.instanceName.on("added", function() {

    $("#instanceName")[0].src = videoURL;

}, this, true);

Hope that works! Or a possible work around is to have each of your videos in a MC, and then just swap out the MC's from the library.

Cheers,

mark

headTrix, Inc. | Adobe Certified Training & Consulting
Translate
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 ,
Apr 12, 2018 Apr 12, 2018
LATEST

haven't gotten a cahnce to try yet, but thank you for the swift reply! I'll let you know.

Translate
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