I am not sure why the videos are not play in my web app.
I added f4v mime type to the server
I triple checked the paths and viewed the videos online.
url: http://appesl.englishfreeonline.com/ videos are is assets/ ... check source below
When I clear the cache and load the userL.f4v first, it plays.
If I try to load any other video first it doesn't work.
Also if I load any video after first loading userL.f4v...well they still don't play.
Any ideas? Here is the source code:
import flash.display.MovieClip;
import flash.events.MouseEvent;
import fl.video.VideoEvent;
import fl.video.FLVPlayback;
public class mcInfo extends MovieClip {
public function mcInfo() {
flashCards.addEventListener(MouseEvent.CLICK, cards)
training.addEventListener(MouseEvent.CLICK, trainingL)
user.addEventListener(MouseEvent.CLICK, userL)
}
private function cards(e:MouseEvent):void
{
player.stop();
player.source = "assets/flashCards.f4v";
player.play()
}
private function trainingL(e:MouseEvent):void
{
player.stop();
player.source = "assets/trainingL.f4v";
player.play()
}
private function userL(e:MouseEvent):void
{
player.stop();
player.source = "assets/userL.f4v";
player.play()
}
}
update LE.swf on your server. you're not using those paths in your uploaded swf:
http://appesl.englishfreeonline.com/LE.swf cannot access local resource file:///C:/Users/Smuga/Business/HDD/Business/AFiA%20Design/Language%2 0Brain%20Train/Windows%20Desktop/LE%20Desktop/assets/trainingL.f4v.
I checked all the settings in flash and there doesn't seem to be anything that is conflicting. I even tried using multiple player code:
package src.LE.utls {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import fl.video.VideoEvent;
import fl.video.FLVPlayback;
public class mcInfo extends MovieClip {
public function mcInfo() {
my_FLVPlybk.addEventListener(VideoEvent.READY, ready_listener);
flashCards.addEventListener(MouseEvent.CLICK, cards)
training.addEventListener(MouseEvent.CLICK, trainingL)
user.addEventListener(MouseEvent.CLICK, userL)
}
function ready_listener(eventObject:VideoEvent):void
{
player.autoRewind = true;
player.activeVideoPlayerIndex = 0;
player.source = "http://appesl.englishfreeonline.com/assets/flashCards.f4v";
player.activeVideoPlayerIndex = 1;
player.source = "http://appesl.englishfreeonline.com/assets/trainingL.f4v";
player.activeVideoPlayerIndex = 2;
player.source = "http://appesl.englishfreeonline.com/assets/userL.f4v";
};
private function cards(e:MouseEvent):void
{
if(player.playing == true){player.stop()};
player.activeVideoPlayerIndex = 0;
player.visibleVideoPlayerIndex = 0;
player.play();
}
private function trainingL(e:MouseEvent):void
{
if(player.playing == true){player.stop()};
player.activeVideoPlayerIndex = 1;
player.visibleVideoPlayerIndex = 1;
player.play();
}
private function userL(e:MouseEvent):void
{
if(player.playing == true){player.stop()};
player.activeVideoPlayerIndex = 2;
player.visibleVideoPlayerIndex = 2;
player.play();
}
}
}
After I cleared the cache I clicked on the first video and it worked as it should. If I clicked the others they didn't. Just like the code I used in the primary post and if I tried to play the first one agian..it didn't work.
I have to reload the page to view only the first video and only if I click on the first video first.
How can I check what url is being called? I am using "fiddler2" to watch the session.
kglad did get this one. Not sure why this was happening still but I explain what happened.
I have an external actionscript file that had all my code, which I was changing while active on the server.
I had a the same file locally during testing. The local external actionscript file had the source set file:///C:/Users/Smuga/Business/HDD/Business/AFiA%20Design/Language%2 0Brain%20Train/Windows%20Desktop/LE%20Desktop/assets/trainingL.f4v, while the same actionscript file online had it set to assest/training.f4v.
I had to change my local file source to assets/trainingL.f4v and the re-publish the swf.\
then i changed the source to:
"http://appesl.englishfreeonline.com/assets/trainingL.f4v"
on my online actionscript file.
Everthing works fine and I think If I changed the source to assets/training.f4v in the online actionscript file it should of worked to.
My question is: why did the local actionscript file change the published swf? I thought that the swf read the actionscript file and the changes to the file didn't matter so much.
swf's don't read any code. .as files are not loaded and they are not read when a swf executes. they are compiled and added to a swf when the swf is published.
your class files and other .as files do not need to be (and should not be) uploaded to your server.
when you publish your swf, Flash compiles your code and adds the compiled code to your swf. if you then change an .as file and (without publishing - ie, outside the test environment) run your swf, the old code will execute. the swf is using the code existing when it was last published.
p.s. please mark helpful/correct responses.
North America
Europe, Middle East and Africa
Asia Pacific