Hope someone could help,
The code in "Example1" work fine if the video symbol is located on the stage. But what I'm trying to do is load the video symbol from the library dynamically and that doesn't work as illustrated in "Example2".
My question is why does Example1 work and Example2 not work?
Example1:
var youtube = $("<iframe/>");
sym.$("video").append(youtube);
youtube.attr('type', 'text/html');
youtube.attr('width', '560');
youtube.attr('height', '315');
youtube.attr('src', 'https://www.youtube.com/embed/A3PDXmYoF5U');
youtube.attr('frameborder','0');
youtube.attr('allowfullscreen', '0');
Example2:
sym.myVideo;
sym.myVideo = sym.createChildSymbol("video", "Stage");
var youtube = $("<iframe/>");
sym.$("myVideo").append(youtube);
youtube.attr('type', 'text/html');
youtube.attr('width', '560');
youtube.attr('height', '315');
youtube.attr('src', 'https://www.youtube.com/embed/A3PDXmYoF5U');
youtube.attr('frameborder','0');
youtube.attr('allowfullscreen', '0');
Thanks in advanced,
-Angel