Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-17-2008, 01:55 PM   #1
charlieD
Registered User
 
Join Date: Feb 2006
Posts: 7
Angry Problems loading FLVPlaybackComponent

I'm having some frustrating problems trying to get an FLV to play with the FLVPlaybackComponent.

It works if I set the contentPath in the parameters of Flash (CS3) and preview or use the generated HTML file.

However, when I put this into a page and access it through the webserver (even my local machine server) the file is rarely loading. I say rarely because it has randomly worked once within many many page reloads, even though I had changed nothing.

I have checked file permissions, and the SWF itself is loading. However, the video or play controls don't appear. I have also disabled my browser cache and set the Flash cache amount for my local server to none...

I'm using the following embed code to pass the URL of the video file to load, then using the Actionscript below to load the movie. Can anyone help with this?

Embed Code
Code:
<script type="text/javascript">
	var so = new SWFObject("/flash/video.swf", "flashObj", "453", "319", "8", "#fff");

	so.addParam("allowScriptAccess", "sameDomain");
	so.addParam("quality", "best");
	so.addParam("scale", "scale");
	
	so.addVariable("videoUrl", "<?php echo $MainVideo; ?>");

	so.write("mainVideoPlayer");
</script>
Actionscript
Code:
var videoUrl:String = _level0.videoUrl;

if (videoUrl != undefined)
{
	import mx.video.*;
	videoplayer.contentPath = videoUrl;
	videoplayer.play();
}
charlieD is offline   Reply With Quote
Old 07-17-2008, 02:49 PM   #2
xxneon
Super Moderator
 
xxneon's Avatar
 
Join Date: Dec 2006
Location: Amish Country, PA
Posts: 8,570
Send a message via ICQ to xxneon Send a message via AIM to xxneon Send a message via MSN to xxneon Send a message via Skype™ to xxneon
Default

i am assuming that videoplayer is the instance name that is assigned to the FLVPlayback component that is on the stage??

also what is the full value of '$MainVideo', I only ask cause i notice the swf is in a different location then the html.. 'flash/video.swf'.. so that means that the swf url path would be relative to the html page and not the swf location itself. so depending on where the video is located at .. and depending on how your viewing the swf .. will depend on if the video is found or not.
__________________
Always optimizing...

Last edited by xxneon; 07-17-2008 at 02:51 PM.
xxneon is offline   Reply With Quote
Old 07-17-2008, 06:09 PM   #3
charlieD
Registered User
 
Join Date: Feb 2006
Posts: 7
Default

Yeah, the instance of the component is called videoplayer.

In the HTML I refer to both the SWF file and the FLV in absolute terms, and they are both in the same directory:

/flash/video.swf
/flash/test.flv

So, $MainVideo = "/flash/test.flv"
charlieD is offline   Reply With Quote
Old 07-17-2008, 06:15 PM   #4
atomic
Banned by AS.org Staff
 
Join Date: Jan 2007
Location: Montréal, Québec
Posts: 14,073
Default

A link to this online?
atomic is offline   Reply With Quote
Old 07-17-2008, 07:42 PM   #5
charlieD
Registered User
 
Join Date: Feb 2006
Posts: 7
Default

http://guminteractive.com/videotest/

Moving this here produced a different result - it now loads the movie, but doesn't show the overlay controls. I've tried playing with the settings, having autoHide true or false, changing the overlay etc. to no avail...
charlieD is offline   Reply With Quote
Old 07-17-2008, 07:45 PM   #6
xxneon
Super Moderator
 
xxneon's Avatar
 
Join Date: Dec 2006
Location: Amish Country, PA
Posts: 8,570
Send a message via ICQ to xxneon Send a message via AIM to xxneon Send a message via MSN to xxneon Send a message via Skype™ to xxneon
Default

you need to make sure that you copy over the skin swf file that is created when you publish too.. and it probably will need to be in the folder where the html is too.. if i had a guess.
__________________
Always optimizing...
xxneon is offline   Reply With Quote
Old 07-17-2008, 07:51 PM   #7
xxneon
Super Moderator
 
xxneon's Avatar
 
Join Date: Dec 2006
Location: Amish Country, PA
Posts: 8,570
Send a message via ICQ to xxneon Send a message via AIM to xxneon Send a message via MSN to xxneon Send a message via Skype™ to xxneon
Default

you can also use the skin property to set the path to the skin swf if you want to keep it in the same location as the swf..

videoplayer.skin = '/flash/skin.swf';
__________________
Always optimizing...
xxneon is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Text Loading Problems coho75 ActionScript 2.0 8 01-11-2007 10:48 AM
problems loading from one swf into another caesar103 ActionScript 2.0 0 11-01-2006 12:13 PM
ComboBox Cell Rendering, Problems loading values into it mwiley43 Components 2 10-30-2006 06:46 PM
Flash loading problems with Firefox holdenmayo ActionScript 2.0 5 09-20-2006 04:33 PM
ASP > Flash variable loading problems only on Mac. Jessica lucidiastudios ActionScript 1.0 (and below) 1 08-29-2002 01:32 PM


All times are GMT. The time now is 07:26 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.