FLVplayback contentPath control by html links



  • 1. placing buttons
    hi, I have say n number of buttons and I want to place them dynamically.The placement is bit peculiar ie) the even no. of buttons are placed at x = 562 . And odd no at x = 648. so if I am looping say 21 times then when i=0&& i = 2 && i=4&& i=6 etc.... their x coordinate is 562. when i=1 &&i=3 x = 648 how do I write my code ? thanks
  • 2. Can Variable Containing Command Be Executed?
    I need to push values into an array, and the simplest idea I could come up with to solve some complex requirements (involving XML and data importing), is to create a string variable that contains all the text of a valid command, e.g.: pushVar = "my_array.push({name: "Bob", city: "Kansas City", zip: 72345});"; How can I then "execute" the pushVar variable? In other words, how do I tell Flash to execute the contents of the variable as opposed to treating it as a typical static value? I remember in another software program being able to type, e.g., &pushVar at the command prompt in order to do this. Doesn't work in Flash, though. Thx for help!
  • 3. getUrl stops gif animation
    I have a website with 10 gif animation banners. I now would like to include also a flash webover banner (a layer in front of the content in my homepage). I have a getUrl in flash that executes a javascript function in HTML. The problem now is that when this javascript function is called, the banners stops animating. Flash 7 actionscript 2: getURL("javascript:hideDivWebover();"); HTML javascript: function hideDivWebover(){ //code here... } How can I fix this problem. Thanks.
  • 4. MC or component parameters that are being interpolated between keyframes in flash timeline
    Hi, My aim is to give the user (in authoring time) the ability to set some extra movieclip parameters. Then, I want Flash to calculate the values of these parameters between keyframes, much like its being done for the MC alpha value, for instance. For example, I'd like the user to be able to set values for a new parameter - 'Z' which will represent the height of the MC. If the user sets 'Z' to 50 at frame 1, sets 'Z' to 100 at frame 5, sets "Tween - motion" between those 2 keyframes, I want Flash to calculate that the 'Z' value at frame 3 is 70. Thnx, EZ

FLVplayback contentPath control by html links

Postby oneczech » Wed, 14 Dec 2005 17:59:06 GMT

Hi there, 

 I have a simple thing to do, so I hope it is also simple thing to make (for a 
programmer which Im NOT .. and thats why i ask)

 Im looking for a way to control the FLVplayback component contentPath from 
HTML which would allow me to make classic html links which would assign new FLV 
video file to swf flash file when clicked on. The flash file, which would 
contain only the video component, would be embeded into the same html page. 

 So just to control flash component from outside of flash ... ? 

 what should I do to make that happen? I though of the same principle as with 
opening popup windows from withing flash file using javaScript functions .. yet 
my problem is reversed, right ... ? 

 Thank you

Re: FLVplayback contentPath control by html links

Postby LB Back » Wed, 14 Dec 2005 20:53:36 GMT

You could link to a html-page that has something like site.swf?foo=bar in both object and embed tags.
That way the name-value pair foo=bar is accesible in the swf.

Re: FLVplayback contentPath control by html links

Postby ElliotJuice » Thu, 13 Apr 2006 06:41:04 GMT

What is the syntax for putting the variables in both the object and the embed 

 Also, what code has to be used in Flash itself to call on these variables and 
where does this code need to be placed in Flash.

 The reason I ask is because I am having a similar problem integrating URLs 
which have variables in them and the flash player. Basically I want to be able 
to use a SWF flash player that I create to play a variety of FLV files (which 
are located in various folders on a web server) based on the variables in the 
URL of a particular HTML page.

 Any help would be greatly appreciated.

 Thank you.


Re: FLVplayback contentPath control by html links

Postby LB Back » Fri, 14 Apr 2006 06:58:14 GMT

In both the Object and Embed tag there's a part that contains the name of the swf. Add the url to the end of the swf name and the value will be stored in the _root of the swf.

Similar Threads:

1.flash video wrong contentPath - FLVPlayback pro's please help...

Hi Forum

 This one is for FLVPlayback experts.  I am using flash 8 actionscript 2.  

 I am getting a connection error (Error 1000) from the FLVPlayback when the 
contentPath of a Video does'nt exist.  Once I try to stop and close the 
videoplayer (FLVPlayback .closeVideoPlayer())  the whole site freezes and I get 
this message in the output:

 "1000: Unable to make connection to server or to find FLV on server"

 I have added a listener for this error.  The listener seems to read the state 
changes but in the end the system again freezes....  is this a bug ?  does 
anyone know of a workaround?  or am I doing something wrong?

 Any leads or insight is much appreciated.

 Thank you


 //this is the core of my AudioPlayer class


 private function init(){
 		bhsModel = BhsModel(getModel());
 		bhsController = new BhsController(bhsModel);
 		root = InstanceManager.ROOT;
 		root.audioUI._x = ConfigData.STORYPLAYER_AUDIOPLAYER_TOP;
 		root.audioUI._y = ConfigData.STORYPLAYER_AUDIOPLAYER_LEFT;
 		root.audioUI._visible = false;
,{width:310, height:40});
 		audioPlayer = root.audioUI.playback.audioPlayer;

 		InstanceManager.AUDIOPLAYER = audioPlayer;
 	private function destroy(){}

 	private function initAsset(_pers:Number,_cat:Number,_clip:Number){
 		root.audioUI._visible = true;
 	private function destroyAsset(){
 		trace("destroy Video Player Asset");
 		root.audioUI._visible = false;
 	private function loadAudio(_pers:Number,_cat:Number,_clip:Number){
 		var aPath:String = StoriesData.getAudioClipFile(_pers,_cat,_clip);
 		audioPlayer.skin = PLAYER_SKIN;
 		audioPlayer.contentPath = aPath;
 	private function addListeners(){
 		playerListener = new Object();
 		playerListener.stateChange = function(eventObject:Object):Void {
 			if(eventObject.state == FLVPlayback.CONNECTION_ERROR){
 				trace("State: " + FLVPlayback.CONNECTION_ERROR);
 				trace("New audio state: "+eventObject.state)
 		audioPlayer.addEventListener("stateChange", playerListener);
 	private function removeListers(){
 		audioPlayer.removeEventListener("stateChange", playerListener);


2.HTML link from external html page to link to a frame in swf

3.contentPath not relative to HTML

OK, this is my problem:
 I have my flv video player at this location: /scripts/mediaplayer.swf.
 My HTML that embeds the player is here: /courses/english1/page.html as well as 
my .flv file.
 I use swfobject.js to embed the swf and I use addVariable to pass the path to 
the .flv file but it is a relative path, let's say: images/video.flv.  I have 
many courses so I need one place for my mediaplayer.swf file but many different 
.flv files & html files that embed it.  For instance, imagine there being many 
course directories: /courses/english2, /courses/math1, etc...  trust me there 
are a lot and each one has many videos.  Unfortunately, when I set 
videoplayer.contentPath in my actionscript and pass it "images/video.flv" I get 
a 404 error on my server that says it can't find "/scripts/images/video.flv".  
Somehow the contentPath gets set relative to the .swf file and not the HTML the 
.swf file was embedded in.  How can I change it so that it always looks 
relative to the HTML location?  In my opinion, it should always be relative to 
the html the .swf was embedded in and not the .swf's actual location.

4.using HTML links to control a Flash movie in another window

Has anyone tried using an HTML link or a JavaScript to control a Flash movie that is opened in another window? Suppose this JavaScript is in a separate window and you want to control the Flash movie from another window.

5.Html links that control .swf

I have a website that is set in tables using dreamweaver. How can i get text 
links in a separate cell  to tell my .swf file to go to a certain frame in the 
timeline. I have read about using javascript to do this, but it is so vague and 

 your help is appreciated.

6. Controlling Flash with HTML Link

7. Controlling a Movie with HTML Links from Another

8. Using html links with javascript to control Flash movie

Return to FLASH


Who is online

Users browsing this forum: No registered users and 30 guest