FORUMS: list search recent posts

Externally loaded SWF - audio but no video

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Eva Irmbach
Externally loaded SWF - audio but no video
on Apr 11, 2011 at 11:51:01 pm

Hi everyone,

sorry if this question has been answered before (no luck with a search, though), and sorry if it is, as I suspect, a complete noob question.

In CS4 I have a video player (player.swf, AS3) into which I load an SWF that contains the video controls (skin.swf, AS2), which in turn has an FLV embedded into it using contentPath in the FLVPlayback feature.

When I built this I used a placeholder FLV, and had it all working just fine - it still is working fine. But I've duplicated the project and replaced the link to the FLV to the movie I actually want to play, and that seems to mess things up.
The skin.swf still plays the FLV, and everything works as expected. But when I load the skin.swf into the player.swf, it only loads the audio, not the video.

I haven't changed anything about the code or anything else about the whole setup - the only thing that's different from the working test is the path to the FLV. I've tried different FLVs, including the one that I originally had the player working with, put them into different folders to change the path, on the web server and local, all with the same result.

This is the code for the player.swf (although I'm pretty sure this isn't code-related).
var my_loader:Loader = new Loader();
button1.enabled = true;
button1.alpha = 1;
image1.alpha = 1;


stop();
thumb1.addEventListener(MouseEvent.MOUSE_OVER,play1);
function play1(event:MouseEvent):void{
button1.enabled = true;
button1.alpha = 1;
image1.alpha = 1;
}


button1.addEventListener(MouseEvent.CLICK,play4);
function play4(event:MouseEvent):void{
my_loader.unloadAndStop();
my_loader.load(new URLRequest("skin.swf"));
loader_mc.addChild(my_loader);
button1.enabled = false;
button1.alpha = 0;
image1.alpha = 0;
}


The skin.swf only contains a little code to make the playback controls work, which I'd say is unrelated, but let me know if you'd like me to post that too.

I'd be forever grateful if somebody could help me out with this.

Thanks heaps!


Return to posts index

Justin Giovanetti
Re: Externally loaded SWF - audio but no video
on Apr 12, 2011 at 5:23:12 pm

Hi Eva,

You cannot mix AS2 with AS3.


-Justin

Tempolates™   |   http://www.tempolates.com


Return to posts index

Eva Irmbach
Re: Externally loaded SWF - audio but no video
on Apr 12, 2011 at 9:45:05 pm

Hi Justin,

thanks for that. But then why was the test project working perfectly?

Eva


Return to posts index


Justin Giovanetti
Re: Externally loaded SWF - audio but no video
on Apr 13, 2011 at 2:46:09 pm

Eva,

Good question. Though, I'm not sure what's going on.

Could it be a difference in the encoding of the FLV? What do you mean by "all with the same result", meaning all of your tests worked or that only your placeholder test worked?

It could be a cue-point issue, where one FLV is triggering an action that another FLV is not. I doubt this is the case though.

Maybe it's an environmental variable issue. Instead of duping the folder that is working, try just using the folder that is working.

Tempolates™   |   http://www.tempolates.com


Return to posts index

Eva Irmbach
Re: Externally loaded SWF - audio but no video
on Apr 14, 2011 at 5:52:06 am

Hi Justin,

I don't think it's got anything to do with the FLV, because linking back to the placeholder FLV that is working in the test file doesn't work either (once I've changed the path, that is).

Only my placeholder test worked. As long as I don't change the contentPath, everything is fine - as soon as I touch that, it stops working. I have tried using the project that's working (saved a back-up, which still works).

You're probably right and it is because of mixing AS2 and AS3 - I did know this wasn't a good idea, but because the test worked I thought I'll go ahead with it... Very peculiar, this. I'll try to figure out how to upgrade the custom skin to AS3, then.

Thanks for all your help :)


Return to posts index

Eva Irmbach
Re: Externally loaded SWF - audio but no video
on Apr 14, 2011 at 6:29:08 am

Ok, I just did a test and loaded an SFW that was created in AS3 into the player.swf - it's exactly the same deal: The new skin.swf (AS3 this time) plays the FLV just fine, but when I load it into the player.swf it only plays the audio. I've also tried loading a random SWF that doesn't have an FLV embedded in it, and with that it's the same.
I guess that narrows it down at least: It's got nothing to do with AS2 and AS3, and it also doesn't seem to be directly caused by changing the contentPath in the FLVPlayback instance, or in fact by the FLV at all.

So I'm going to have to rephrase my question: Why does the above code suddenly only load audio, but not video?
Could it be that I have somehow unknowingly turned the visibility of the loader_mc off or something stupid like that?


Return to posts index


Justin Giovanetti
Re: Externally loaded SWF - audio but no video
on Apr 14, 2011 at 3:36:02 pm

Eva,

Have you checked if all SWFs are publishing for the same Flash player? Also, if you're publishing for Flash 10 try making sure all SWFs are using the CPU versus the GPU. It's in your publish settings.

To be honest, it sounds like it could still be any number of things. From a simple oversight, to a larger issue.


-Justin

Tempolates™   |   http://www.tempolates.com


Return to posts index

Eva Irmbach
Re: Externally loaded SWF - audio but no video
on Apr 16, 2011 at 6:35:45 am

Hi Justin

it wasn't either of that, but I've sat down today and rebuilt the whole thing from scratch, and now it works. No idea why - everything seems to be exactly the same as in the offending file - but I'm going to just ignore that :)

Thanks heaps for all your help, I really appreciate it!


Return to posts index

Justin Giovanetti
Re: Externally loaded SWF - audio but no video
on Apr 18, 2011 at 4:27:45 pm

You're welcome :-)

Tempolates™   |   http://www.tempolates.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]