Hey guys,
i am creating a "library" script where I have a bunch of swf videos. And I am having problem with the load function. If I load a video, it plays, everything is cool, but if I try to load another, it wont load over the old one. So now I have a bunch of videos overlapping and have to hide all the rest when I want to load a new one. But something is causing the script time from time to stop working. When I get rid of the flash player, everything works ok, so I guess the problem is with the videos playing over and over and just being hidden.
Here is the code:
var win = (obj instanceof Panel) ? obj : new Window("palette", "Toolkit", undefined, {resizeable: false});
var previewList= win.add("listbox", undefined, undefined);
for(var o = 0; o < options.length; o++){
previewList.add("item", "");
previewList.items[o].image = File("imagePNG");
previewList.items[o].id = o;
}
var mainGroup = win.add("group", undefined, undefined);
mainGroup.orientation = "column";
var flashGroup = mainGroup.add("group", undefined, undefined);
flashGroup.alignChildren = ['fill', 'fill']
flashGroup.orientation = "stack";
var players = []
for(var p = 0; p < options.length; p++){
var player = flashGroup.add("flashplayer", undefined, undefined);
player.minimumSize = [400, 300];
player.loadMovie(File("movieSWF"));
player.hide();
players.push(player);
}
players[0].show();
previewList.onChange = function(){ try{
for(var p = 0; p <players.length; p++){
players[p].hide();
}
players[previewList.selection.id].show();
}catch(err){
alert(err.toString());
}
};
Also, as i have read, Adobe is no longer continuing support of Flash Player in AE from CC 2017, so any other ideas how can i load videos in AE without using flash player? I didn't find any other way for this.
Thanks.