Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Insert player into another Flash SWF

183 replies [Last post]

After some hours of fiddling around with the action script code I finally managed to load files into the player after initialization.

@Benny; Here is how it worked for me:
1. Open mediaplayer.fla and copy the player instance
2. Open a blank document and paste it to the stage.
3. Publish and save it as customPlayer.swf.
4. Open the target document, that is pupposed to load the external swf. Insert the following lines of code:

// Set the flashvars
var width = "300";
var height = "240";
var autostart = "true";

var test:Test = new Test(this);

5. Write a new class "Test" that handles the loading:

import com.jeroenwijering.players.*;
class Test {
var mc:MovieClip;
var mpl:MediaPlayer;
var mcLoader:MovieClipLoader;
public function Test(mc:MovieClip) {
this.mc = mc;
mcLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip("customPlayer.swf", mc.container_mc);
}
public function onLoadInit():Void {
loadFile();
}
private function loadFile():Void {
mpl.controller.getEvent("stop");
mc.file = "song.mp3";
mpl = new MediaPlayer(mc.container_mc.player);
}
}

6. Save and publish!

Hi! This is the greatest player so far, but I'm struggling with one issue. I don't have the com directory, because I don't need it. I used the following file:
------
This is a way to load the player in a swf. Download the file and see whats inside and how it works!

http://fifthrealmstudios.com/swf_loaded%20player/swf_loaded%20player.zip
-------

-this works well, but I cannot find the as files, so I could rename the height & width variables.. How can I get a hold of them?
Otherwise everything is cool, but I have the components in use aswell,, thanks in advance!

hello guy's i am in proplem i used the
http://www.stephenstudios.com/flash/flvplayer.fla
and still when the another flash load this file the flvplayer expanded to full size sorry guy's i am biggner JeroenW i like you player so much you are a good man please everyone
try to help me

hi guy's this me again
after somethings i do when i read the topic carefull
it's working now
but there's two proplem's
first
the control panel is soo small
and i need to make it large
secand the flash site didn't load a playlist

this code i put in my flash site in the loader movie clip
to didn't stretch
ihope to help me

// Set the flashvars
var file="playlist.xml";
var width = 320;
var height = 400;
var showdigits = "true";
var displayheight = 200;
var lightcolor = 0xEEEEEE;
var backcolor = 0x000000;
var frontcolor = 0x666666;
var file="playlist.xml";

// Start the player
var fpl = new com.jeroenwijering.players.FLVPlayer(this.player);

please guy's help me
and thanks soo much

hey sorry for "var file="playlist.xml";"
it's not in the code it's an mistake when i wrote this reaction
thanks

Hi Everyone,

The Mp3 Player Embedding works well - You can test/use example by Pique
http://fifthrealmstudios.com/swf_loaded%20player/swf_loaded%20player.zip

Now, can someone upload an example of embedding the FLV player, so we got that one too.

Its so much easier working out from an example, than starting from top of the forum and working ur way down, eliminating one error after the other.

Anyone that got it working, please upload it and share your wisdom.

/yours wex69

@wex69
please have a try with the configuration [url=http://www.jeroenwijering.com/extras/wizard.html]wizard[/url]

Hi andersen,

Dont know if you read the topic,
Its about embedding the FLV player into an existing FLA projekt. ;)

@wex69
ah - sorry, didnt connect the dots *)

Hi all, actually a brain burning thread...
Been trying to include the flvplayer to my flash site for couple of hours.
I'm quite a newbie in web designing, but "Pique" solution :

http://fifthrealmstudios.com/swf_loaded%20player/swf_loaded%20player.zip

though it is for the mp3player, helped me quite a lot.
Actually, Isuppressed nearly everything in the player (hence controllers and activity viewer) because I don't need it, but after a few adaptation, Pique's solution was the working one... :)

Just be sure to adapt the script

loadMovie("mp3player.swf", "/mp3player");

to:

loadMovie("flvplayer.swf", "display");

-and of course, copy-paste the player clip in your .fla ;)

I AM SOOO glad to have been told about your player, I am deeply grateful to you Jeroen, and Pique..

how much work do you reckon there is in making the player actually universal? or in adding enough ugly hacks to the mediaPlayer to make it also work as an imageRotator? i've got the first part of this issue (loading/killing/restarting) players worked out, but giving the mpl a list of images doesn't allow for fades... i'm thinking of just poking around and working in what i *need* along thge lines of dumping both player and rotator in the loaded mc, hiding player if fvar playertype is imageRotator, hiding rotator if it's anything else...

am i just overlooking a more elegant solution?

ps: thanks for the pointers last time

-- subreply -- fullscreen switch would not behave unless i reset the player position when it toggled -- so if the player was at 300,50 when i toggled fullscreen, i had to move it over into the corner of the visible stage area (like -400,-300, whatever) when it switched, and then move it back to its ox,oy when it switched out. also the toggle OUT of fullscreen seems not to use same block of code as the toggle IN, so m y current nudge out is a really ugly listener for stage resizes (which i had anyway, so no biggie)

I a complete amateur at Flash scripting and can't work out why embedding the mp3 player works offline but when I upload it online it doesn't even appear? I have tried the original script:

loadMovie("mp3player.swf", "/mp3player");

as well as other variations with the url link included:

loadMovie("http://patrick9480.freehostingnow.com/mp3player.swf", "/mp3player");

and alternatively

loadMovieNum("http://patrick9480.freehostingnow.com/mp3player.swf", 0);

but still no joy, can someone please help? Thank you in advance, Patrick

This had to have been the most exhausting and fruitless post! NO one seems to have a decent, solid, workable solution!! I've gone over all of the examples that everyone posted and reworked, read page 5 of the README, and yes, I can embed the video and all that, but the flashvars don't seem to control the width & height! Jeroen, it would be awesome if you can post actual workable FLA example of this, I as well as others would be eternally grateful. :) This seems to be something many people are trying to do.

Thanks;
John

Wanted to add an addendum. Last night, after a full day of messing with this, I came upon the last useful post, by Shiva. So I downloaded the file by Pique, and finally deciphered what needed to be done. So yay, it worked in that file. Excited, thinking I had nailed the solution, I duplicated EXACTLY what I had in that file in my own FLA. Did it work, NO! :| The player is not sizing properly. I almost had it! So something in my FLA is messing up the dimensions of the player. The width/height/displayheight property is ignored once I move it into my own FLA. A quick rundown of what that file provided me:

- The "player", "activity" movieclips were copied from the original flvplayer file into the library. This also included the "player clips"
folder.

- You place an empty movieclip on the stage and load "flvplayer.swf" into it.

- You set the flashvar variables and instantiate the player:
// Set the flashvars
var width = "240";
var height = "180";
var file = "playlist.xml";
var autostart = "true";
var repeat = "false";
var bufferlength = "5";
var showdigits = "false";
var displayheight = "180";
var lightcolor = "0xfdea85";
var backcolor = "0x9e8d31";
var frontcolor = "0xFFFFFF";

// Start the player
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player);
stop();

So, this is fine and dandy. But when implementing the same procedure above in my own FLA, its a no go. Hope someone has managed to get past this obstacle. If so, please feel free to contact me here: john.ghadimi@bnw.com

J.

For anyone that is reading this massive thread all the way to the end, the morale of the story is to not use any built-in components with FLV Player, since that will lead to the size problem described above! After deleting my component (I was using a progress bar component), the problem was resolved. ;)

i am trying to get my videos to stop playing when another page is clicked but i cant seem to get it to work.

I kno that JeroenW had explained how to do it in this thread on (15.03.2007), but i guess it doesnt seem to work.

Where exactly do i insert the command mpl.controller.getEvent("stop"); ??

Hi Jeroen, and hello everybody ;O)

First of all, congratulation for this player.
Then I am French, so excuse me for my bad English.
I use this player in another fla, it's working very well. Now, I will wish to create a button which reveal and disappear the playlist.
How to do that ?

Thank you.

@JIM

I used that command (mpl.controller.getEvent("stop");) on a mouseclick event of a button. So, if you have a getURL or a jump to another scene, or something similar, you put that line of code before you "navigate". Hope this helps.

J.

Hello,

Ive read all the posts on fullscreen and im still confused, I think it might be the different scripts, so let me try to simplify this.

If I have the player in another flash document, do I put

var allowfullscreen = "true";

in the actionscript with the rest of the script?

Thanks

John Ghadimi or anyone else:

I tried adding the code

on (release) {
mpl.controller.getEvent("stop");
}

on (release) {
gotoAndPlay("Scene", 1);
}

and also added the 'navigation' code within the same on(release) command, yet the video still does not stop while the navigation still works. I double checked to see if the AbstractPlayer.as was public, which it is...any other ideas??

@JIM

I think I see the problem. Remember that you are loading the player into a movieclip, so you need to reference your player(mpl) from the movieclip:

somebutton.onRelease = function() {

movieclipname.mpl.controller.getEvent("stop");
gotoAndPlay("Scene", 1);

}

J.

John G:

I appreciate you helping me out, but for some reason it still does not work.

The 'somebutton' refers to the button name on which the action is being applied to, correct? Like page2btn?

Then 'movieclipname' refers to the flashplayer since it is what im am trying to stop, rite? in this case, FLVplayer ?

I inserted my own paths into the code u provided and first it came with an error, saying that i needede an 'on handler' - so i put ur code within on (release) giving:

on (release) {

homebtn.onRelease = function() {

FLVplayer.mpl.controller.getEvent(stop);

gotoAndPlay("Home", 1);

}
}

However now even the gotoAndPlay command does not work either. I have a feeling is has something to do with my onRelease = function command. Please could u help me out again? Thanks again!

@JIM

First off, your function is wrong. You are defining the release function twice! All you need is:

homebtn.onRelease = function() {

FLVplayer.mpl.controller.getEvent(stop);

gotoAndPlay("Home", 1);

}

Now, is "FLVPlayer" a movieclip? If so, then you should have no problem. I'm assuming you went through this looong post and have already figured out how to embed the player in to a flash file. If that is the case, you are loading your flvplayer.swf in to some movieclip, like so:

loadMovie("flvplayer.swf", "videoMC"); // videoMC is the movieclip name

So, when you go to stop your video, the call will be:

videoMC.mpl.controller.getEvent(stop);

J.

John:

After reading this whole post and seeing everyones mistakes/corrections, my code is as follows:

on the flvplayer (which is a movieclip), i have actions with the code stop ();
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player);

a frame or two before, i have all my vars commands and the code for the playlist:
_root.file="playlist.xml";

and it works fine! buut i cant seem to get it to stop, and i dont think i have a loadMovie command like u said. any ideas on if im doing this wrong?

JIM,

Just so we don't fill this thread up anymore, feel free to email me your FLA so I can see what you're doing. I'm still unsure what your problem is, and I think seeing the FLA will shed some light. ;)
john.ghadimi@bnw.com

J.

:)

Hi Jeroen,
i have a problem in embedding the player it loads in to my swf but shows only the screen and the activity symbol.
so can you help me regarding it,

Sahil
sahilchokshi2003@gmail.com

Sounds like you might be missing the playlist.xml file. By default, if you don't define a file variable, it will look for that xml file:

var file = "the path to your file";

J.

Hey,

A quick question... it seems that there are black bars at the top of my video when using this player. Anyone have any ideas about the scaling of your video or these bars?

When I look at the example it seems as if his video is 16:9 or wide angle landscape. I'd like to fill the whole flv with my video and not have any bars. Any ideas?

cheers,
paul

Hi all and thanks to JeroenW, obviously.

I'm trying to load new video in the player throught a button.
that's my code but it doesn't works

on (release) {this.player.loadFile("video.flv");
}

I have to do this because i need a long description to my video,
so when i click on my button i load a text and video

thank u

Re:
---------------------------------
"Note that the 3.2 version of all player have a new command, loadFile(). From now on, you won't have to restart the player again. You can just use this function to play another file. Example:
// start the player
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player,"some_video.flv");
// load another video
mpl.loadFile("another_video.flv");"
-------------------------------------------------------------
I have been trying for an hour now and I can not make it work. do you have any working fla sample of this new function?

Here is my code:
--------------------------------------------------------------
Stage.scaleMode = "noScale";
Stage.align = "TL";

var width = 320;
var height = 260;
var showdigits = "true";
var autostart = "true";
var displayheight = 240;
var lightcolor = 0xEEEEEE;
var backcolor = 0x000000;
var frontcolor = 0x666666;

flvLoader.loadMovie("flvplayer.swf");
//flvLoader is emty movieClip

var mpl = new com.jeroenwijering.players.MediaPlayer(flvLoader.player,"video1.flv");

function loadFile(){
mpl.loadFile("video2.flv");
}

testBTn.onPress = function(){
_parent.loadFile();
}

stop();
------------------------------------------------------------------

How would you get an SWF that has the mp3 player embeded, to tell it to change the playlist item to a specific item?

hi my name is dee,
Jeroen great work, i am a big fan of your tools.
I have read this huge post and tried implementing everything that everyone tried, yesterday the whole day.
The mp3 player appears on my page and i can hear the music but none of the buttons work .
I dont understand what i have done wrong.
can anyone help me who has successfully done this?
I used the zip file provided by pique and stephen.
I am an amateur at flash and actionscript.
I am using a flash template and am modifying it.
thank you very much and appreciate everyone's contribution to this post

Hello!

First of all: This is the best player ever.
There is definitely no player outside with more options to customize.
Really great work!!!

But I'm having a problem when importing it into an other FLA.
Actually it works perfect, I can adjust all the vars from inside the partent-fla except these:
- var hieght
- var width

It seems that I used them somewhere else to determine the size of the screen because the MP3player stretches to full size. it doesn't matter what I enter in the var height and var width. All other vars are accessible and are working.

My Questions:
Do I miss someting?
Can I change the names of the MP3 Vars? This would be the best as there are alos other vars that I mights have used (like var files).
Or is there a way to separate the vars?

Perhaps anybody can help.
Thank you everybody in advance...

gb5256

Hi jereon,
a quick question about the sound component i am looking to get a vertical component in the the player can you provide some hint how do i do it.

Hi there
I've managed to insert the flashvars into the swf but it doesnt work when I set the file flashvars to an internet xml.If I point the url to a relative adress it work fine...I have the crossdomain.xml on the site from wich I'm tryin to load the playlist.xml.Please help me :)
Cheers

andrew,

Please post your player code and/or a link to your page so we can help you.

I want to create an exe from this player, and the I've just done what it saids in the first post in this forum, i've declared the vars in the first frame like so: var file = "http://mysite.com/playlist.xml"; when i press ctrl+enter to test it it appears that it loads for a few seconds but after the playlist remains empty. I must tell you that online i can use this wonderful player perfectly but, like I've told you I want to make it exe :)
my site is http://fermademuzica.uv.ro and the xml is here http://fermademuzica.uv.ro. Thanks for your willing in helping me Will :) Please help me, in three weeks there is the national competition and this would save me a lot of time :) :d

@andrew
from the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url]:
"note that your XML playlist (if used) should always reside on the same server as your SWF, or else the security restrictions won't allow the player to load it. Having MP3 or JPG or FLV files on a different server is no problem"

I know nothing about creating an exe from the player. Sorry, can't be of much help.

hey all,

i've successfully brought this great flv player in to my main flash stage by doing the copy/paste method with the movieclips. it runs great and accesses the playlist with no troubles. the only thing i'm struggling with is making the playlist disappear. i thought i read that if you make the height and displayheight the same then the playlist doesn't show up. i've listed the code i'm using below and for some reason it does not work.

did i do something wrong?

var width = 320;
var height = 215;
var displaywidth = 320;
var displayheight = 215;
var file = "playlist.xml";
var showdigits = "true";
var autostart = "false";
var frontcolor = "0x000000";
var backcolor = "0xffffff";
var shuffle = "false";
var repeat = "false";
var volume = 0;

// Start the player
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player);

thanks for your help!

forgot to mention...

the playlist shows up on the right hand side with the variables that are listed above.

@nathan
what happens if you delete var displaywidth = 320; completely?

i personally havent tried incorporating the player into another swf,
but if you had setup a player in a html page with the values you have posted, then the playlist and controlbar would be hidden!

@andersen

i tried your suggestion with no success. what i noticed though is that the flv player is stretching itself to be the same width as the parent clip it's being called in to. the parent clip is 800px, and the player's playlist appears on the right hand side and stretches to reach a full 800px when added to the flv itself.

any ideas why that might be?

@nathan
no specific idea apart from what i can read in the forum...
have you checked this [url=http://www.jeroenwijering.com/?thread=4560]thread[/url]?
or tried/studied Piques [url=http://fifthrealmstudios.com/swf_loaded%20player/swf_loaded%20player.zip]download[/url]
and noticed John Gs comment?

hi,
man there seems to be 50 ways to do this. using the files from pique i got it to work - minus one thing. the activity clip continues to play on top of video that's loaded? everything works great minus that one thing. any ideas? :)

Well nevermind - looks like the mp3 player was playing the video somehow. Now that I've switched it around to the flv player it's not working at all. Brain hurts... (b) :p

Argh, ok, it's now the FLV player but still the constant loading/activity even though it's still playing. What to do?!

How I can add cover if i use your player into other swf file?

@andersen

thanks for the references, i got the player to stop stretching by manually entering the player size i wanted within the .as files!

Hi there, where do i find those .as files?

i found the .as files.
i manually entered in all configArrays my prefered sizes, but i still have not fixed the height. the width is okay now.
any suggestions?

After a bit of sleep: solved. ;)

At least back with another problem, wich was topic in the middle of this thread.

Jeroen wrote:
Next, if the reference to the movieplayer is "mpl", use this code:

mpl.controller.getEvent("stop");

Note that, in the same way, you can send other events to the controller as well. All events are listed in the infographic at the bottom of the readme

Now my problem ist not to stop the player.
I have set a button with the "scrub, second" event, to link to a specific second in the timeline. that works.

The Problem is, that this only works, if i start the video before i hit the scrub button.
Is there any way to tell the scrub-button to start the video at the defined second?

First and foremost- I'm not a programmer. :$ :@
I need to insert scrips to videoclips. (The lyrics in the video clips).

What is the easiest way to do it.

Thank you in advance

Ishay

Hi, I have a question

I need a simple html/javascrip code to set the window where's the mp3 player in to a smaller size.
So when visitors clicks on the link to the player, you will get only the player but not the white background around it.

greetz ,maikel

@Maikel,

Have a look at this post [url=http://www.jeroenwijering.com/?thread=6531#msg31201]http://www.jeroenwijering.com/?thread=6531#msg31201[/url] to see if this is what you want.

It's a method of using CSS to hide the border of the player. 1px right & left, 2px on the bottom, and 0px on the top. If that's not exactly what you want, maybe you can still use that method, with some modification, to achieve what you want.

Hello , Will.

It doesn't work, I don't understand why it will not work.

Do you have a clear sample for me, that i can paste in my .html file?

Thanks .

@Maikel,

Here is a full HTML page with the player's border covered by a CSS border. 0px top, 1px right & left, and 2px bottom.

In this code, the border is green so you can see it. You should set it to the surrounding background color so it disappears.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">

<head>

  <title>border css</title>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <script type="text/javascript" src="swfobject.js"></script>

  <script type='text/javascript'>
    function createPlayer()
    {
      var so = new SWFObject('mediaplayer.swf', 'mpl', '200', '20', '7');
          so.addVariable('file', 'song1.mp3');
          so.addVariable('width', '200');
          so.addVariable('height', '20');
          so.addParam('wmode', 'opaque');
          so.write('player');
    };
  </script>

</head>

<body bgcolor="#000000" onload="javascript:createPlayer()">

  <div id="borderbox" style="position:absolute; top:100px; left:200px; width:198px; height:18px; z-index:1; border-style:none solid solid solid; border-width: 0px 1px 2px 1px; border-color: #00ff00; font-size:10px; " >
  </div>

  <div id="player" style="position:absolute; top:100px; left:200px; width:200px; height:20px; z-index:0;">
    <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Plugin</a>
  </div>

</body>

</html>

Hi guys,

I'm trying to switch videos inside another Flash movie using my own button that already are on stage (not using the built in playlist feature), and I'm using this code:

// start the player
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player,"some_video.flv");
// load another video
mpl.loadFile("another_video.flv");

But there's no way I can do it work.
Does anyone have any idea of what can be happening?

Thanks in advance!
sebabasso

Thanks for the above codes guys. They really help.

I also had problems to switch between playlists in a swf-file.
The loadFile() method didn't seem to work.

I solved the problem the old fashioned way. Here the approach:

Place an empty movieclip with the instance-name "mp3placeholder" on the stage.

Define some variables for the player in a keyframe in the main movie:
________________________________
var width = "220";
var height = "90";
var file = "playlist_papillon.xml";
var autostart = "true";
var displayheight = 0;
var lightcolor = 0xf3ac50;
var backcolor = 0x391525;
var frontcolor = 0xe9ffcd;
var repeat = true;
//var shuffle = 1;

// and then load the mp3 player into the mp3placeholder-instance:
mp3placeholder.loadMovie("mp3player.swf");
_________________________________

If you want to switch to another playlist (using a button i.e.), do the following:

on (release){
_root.mp3placeholder.mpl.controller.getEvent("stop");
unloadMovie(_root.mp3placeholder);

_root.file = "playlist_lnogp.xml";

// and then load the mp3 player again:
_root.mp3placeholder.loadMovie("mp3player.swf");
}

I use unloadMovie to destroy the current player. But I first have to stop the current playing song.

Here is a working example:
http://www.anselmepau.com/

And here is the fla in case my instructions aren't clear:
http://www.anselmepau.com/testmp3player.zip

I admit that the solution is a bit nasty but it worked for me.

Regards,
Remco

@Remco,

Thanks for sharing the method and your code.

Thanks Remco!

I owe you big time! Thanks a lot!
sebabasso

Hi I am a peruvian, please forgive my bad english.

I use the Flash MP3 Player 2.3.1, y charge de flash using the follow code:

loadMovieNum("musica/pop/pop.swf", "5");

The player is in your positiona and i customize, the problem is, load the playlist from my playlist.xml, and show the list of songs, but when I click in someone, the song dont load, the progress bar still in 0% for ever and never load.

any idea?

thanks

i left de direction to see the problem

http://www.qolqaclientes.com/radiologros/

click in the POP button

I solved the problem, that was a problen in rute from mi playlist.xml :d

@Remco,

thanks for sharing the method and your code.

I saw your code working on your nice site. so I took your offer and only changed xls and the player (into: imagerotator.swf.

thus I had the same problem as for a long time, the movie placeholder does not stop playing.
btw: even does the activity cycler!

It' such a pity

... so, it seems to be a timing problem with the unload above. If inserting a few sec idle time it works.

But the activity spinner is still my problem with embedding imagerotator in a swf. It stays on the scene even pics are shown.
Has someone an dea?

to the above: only jpg's a shown, no video

You have to set a playlist variable at the first frame of your root timeline:

var file="video/playlist.xml";

var width = 200;
var height = 250;
var showdigits = "true";
var displayheight = 150;
var lightcolor = 0xCC0000;

Hello JeroenW

First of all I want to say that u've done a so great work with you mp3 player, I love it so much !

But i have some problems with playlists and my flash site.

Sorry fo my bad english, I'll try to explain as simple as i can.

I want the mp3player to find the proper playlist.xml path for each section/page I've made. For exemple I have 5 pages, named "page1.swf", "page2.swf" etc that I load in my mainHolder_MC, and I have a specific "playlist1.xml", "playlist2.xml" that I want the mp3player to target.

Each sounds of the playlist is in the same folder.

So how can I tell the mp3player to target this or that file ?

I ve tryed many times but i just can't figure !

Thanx for the help and have good day !

Nicolas from Paris

Hi,

I like the anselmepau method, but when I place it not on the main stage but inside of another movie twine, actually movie inside of the movie, than it will not work. what will be script in this case?

Any help will be appreciated.

P.S. In the script above there is a report that keeps running and never stops see below:
Is this normal?

view: item: 12,undefined
model: item: 12
model: item: 12
model: start: 0
view: load: 0,undefined
view: load: 0,undefined
view: load: 0,undefined
view: load: 0,undefined

If people still having problems with the "streching to stage" thingy, try setting the vars displaywidth, displayheight, width, height. I got the player working just fine inside a parent movie.

If you have problems using the fullscreen function, make sure you include:
Stage.scaleMode = "noScale";
and set allowfullscreen to true.

Thanks JW :)

Hello everyone!
I put JW player into another swf with mc video_holder.
I add this AS to my swf with mc video_holder.

loadMovie("mediaplayer.swf",video_holder);
var width = 274;
var height = 345;
var displayheight = 190;
var backcolor = 0xE7E1C0;
var frontcolor = 0x621f08;
var lightcolor = 0xCA9700;

Everything is OK but loading Logo is visible all the time.
And full screen button does not work! Any help !! PLease!

my link:
http://www.germinal.ws/player/holder.html
my files:
http://www.germinal.ws/player/test.zip

Thanks in advance!

I guess I have the same problem as Marko (12.10.2007) and laserfloyd (14.07.2007):

I managed to load the media player within a movie clip… puh…

But…

the black activity spinner (which apparently indicates the loading-status of the player) keeps on spinning on top of the images, although the files are loaded and playing correctly. It won't go away.
The white activity spinner behaves normally and disappears as soon as the file is loaded… Any solution? Is there any way to deactivate (only) the black spinner?

Thanks in advance!!

P.S.: It's the best player out there — by far :d

Hello again!

Hey Horgel (13.10.2007)!
We both have same problem ...
I solve the thing with activity...
I just add into mediaplayer.fla line:

activity._visible = false;

It works!
But still have problem with full screen ...
I have loaded JW player into another swf ...
[url=http://www.germinal.ws/player/holder.html]click here[/url]
Please Help anybody!!
My button full screen does not work !!

Thank YOU!!!!

OK me again!
I solve the problem!
It is important that I add parameter allowfullscreen into html when embed swf object! here is the code:
/////
<html>
<head>
<script type="text/javascript" src="swfobject.js"></script>
</head>
<body>
<p id="player"></p>
<script type="text/javascript">
var s2 = new SWFObject("holder.swf","playlist","550","400","7");
s2.addParam("allowfullscreen","true");
s2.write("player");
</script>

</body>
</html>

Simple! :)
Thanks anyway! :)

Hello!

Thank you Marko!! Worked for me: no more spinning circle.

Great.

Grazie mille!

:)

:) Hello Everybody I'm really glad about all the support blogged in this site, and of course all this coming from a big project "JeroenW" thanks alot 1,000 time JeroenW, your players are really great. But can anybody explain step by step what exactly I have to do , to put a media player into my flash site, can anyone explain more clearly all the steps in just one simple tutotial. THANKS so much!!

Hello,

Firstly, thanks for the player Jeroen. I had the old version of the MP3 player inserted into a flash site and it worked great. I've been trying to insert the new version, and have been through this huge thread, have tried the various templates that were posted and it still doesn't work.

The "Pique" file, loading the SWF method, works but the activity symbol keeps spinning and the output keeps sending out the view time numbers.

With the other file for embedding the actual player from the source fla., I haven't been able to get it to read the .xml playlist (which I have in the same folder) or to send the file variables.

Has anyone been able to really get this to work properly in a flash site? Why has it become so difficult to do so with the new version? Thanks for any help..

update

i found a working solution for using the pique load movie template. to get rid of the malfunctioning activity symbol i just deleted the activity MC and layer and then created a new mp3player SWF. it seems to be working okay, and looks a lot sharper than the previous version.

Ok, here's another question about embedding into an existing flash.

I want to build a custom playlist sort of where I have album covers floating around and when you click on one of the album covers it plays the MP3 for that album. I also want to be able to show in a text box the current title of what is playing.

So I need to update a text field when the track changes and I need to execute an item in the playlist.xml from a button.

Any direction I could start looking at?

@Chris - Any direction I could start looking at?
sounds like something that could be made quite easily in html/css/javascript without modification of the player (with the added advantage that you dont have to worry about updates of the player)
please see the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/]demopage[/url] for examples of what can be made without flash editing...

@andersen

Yea, I agree in general but for this particular project it needs to be embedded into a single .swf file which is why I'm asking.

I got it to work on change by adding this line in the setPlayitem function of PlayerController.as

_root.nowplaying.text = feeder.feed[itm]['title'];

Now it only changes he title when an item changes, I just have to figure out how to update the text field when the first song begins to play.

Then I'll tackle the changing of a song via an image that's not the playlist and not a control button.

Figured out how to get it to update on start play as well. Got fancy also and used this code:

_root.nowplaying.htmlText = feeder.feed[currentItem]['title'] + " - " + "<a href='" + feeder.feed[currentItem]['link'] + "' target='_blank'>DOWNLOAD</a>";

So now my text box shows the title of the current track being played and a hyperlinked DOWNLOAD text next to it using the <link> node in the XML file.

I added this in two spots in the PlayerController.as file.

public function startMCV(mar:Array) at the bottom:

} else {
sendChange("start",feeder.feed[currentItem]['start']);
isPlaying = true;
_root.nowplaying.htmlText = feeder.feed[currentItem]['title'] + " - " + "<a href='" + feeder.feed[currentItem]['link'] + "' target='_blank'>DOWNLOAD</a>";
}

and the second one in the private function setPlayitem(itm:Number)

sendChange("start",feeder.feed[itm]["start"]);
currentURL = feeder.feed[itm]['file'];
_root.nowplaying.htmlText = feeder.feed[itm]['title'] + " - " + "<a href='" + feeder.feed[itm]['link'] + "' target='_blank'>DOWNLOAD</a>";
isPlaying = true;

Now the question is, how do I change items via a graphic link....

So the public function setPlayitem(itm:Number) should allow me to change the currently playing item but placing the call on a graphic doesn't seem to work.

I've tried:

setPlayitem(i); and _root.setPlayitem(i); where (i) is the item number I want to play, but neither of these seem to work.

If anyone has any ideas, please share.

What a massive thread people.

Major thanks to bluestar and company who discovered the issue with having other media components in your library.

I spent 2 days trouble shooting this problem, and all it was was an old instance of the flash scrollbox component in my library. Deleted it and everything worked a treat.

MASSIVE shout outs too to JW for his awesome player and great involvment in supporting it. I know how hectic that can be especially to someone as talented as JW.

Thankyou Thankyou Thankyou

RRR.

I suppose I should learn to read.

JW answered this on the [url=http://www.jeroenwijering.com/extras/readme.html#customization]readme docs[/url].

Using this worked flawlessly.
mpl.controller.getEvent("playitem",i);

Now I have floating album covers which are pulled from the XML playlist and then when you click on them the track plays.

Sweet!

i have loaded the flv player as a external swf from my movie. I have created a button that closes the "flvplayer" swf (unloadMovieNum(2);). The problem is that the sound of the video still playing in the background!!
Is there anything that "kills" the flvs?

Thanx

hello all,

i have the same problem to unload the flv in a seperate container i have load into a swf.

Stage.scaleMode = "noScale";
Stage.align = "TL";

var file = "download/stream/my_video.flv";
var allowfullscreen = "false";
var displayheight = 288;
var height = 288;
var width = 680;
var image = "download/stream/hg_image.jpg";
var backcolor = "0xCCCCCC";
var lightcolor = "0x7D0000";
var repeat = "list";
var shuffle = "false";
var volume = 100;
var showdigits = "false";
createEmptyMovieClipNum("mediaplayerHolder", 1);
mediaplayerHolder.loadMovie ("download/stream/my_video.swf");
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player)
stop();

So i want to stop, by pressing a button or go to another palce in the stage movie, the movie. The visible movie stopp because the sound plays on and on...... :-((((

I test to sop it, or hold it with event or unload....nothing works....please help fast.

Thank you all and best wishes for christmas

Alex

Hi,

I got my player to embed in another flash movie just doing this:

var width = "200";
var height = "50";
var file = "01.Passion.mp3";
var autostart = "true";
var showvolume="true";
var displayheight = "0";
// Start the player
this.createEmptyMovieClip("container", 1);
container.loadMovie ("mp3player.swf");
container._x = 20;
container._y = 100;

It seem there's no need to create an extra instance of the MediaPlayer object, in fact if i do I hear the song played double.
Most solutions on this thread look a little complicated?

Is there a way to access MediaPlayer methods and events without instantiating a new object? Or to instantiate a new object wihout starting the player, in order to get access to the controller-object?

can anyone kindly assist me in loading the latest version of the media player into the image rotator and have them both functional normally as one flv and not be interferring with each other.

i simply am trying to have the image rotator be a backdrop behind the media player in the same flv... please
any assistance would be grately appreciated as i have read and tried this entire thread from start to this point at end and nothign works for me...

would be real nice if i could have a sample .fla file to see how to make the two fucntion together.

thanks... i am pretty sure i am doing everything wrong..

hey y'all

hopefully this thread is still active!

after loading an instance of the media player into another swf,
i am having a problem with the player resizing my entire parent movie

this is for the purpose of detecting different screen resolutions using javascript and providing a custom .swf size depending on a user's display size

so - if you use

Stage.scaleMode = "noscale"; that works great for preventing JW's player from resizing my main movie

but then i can't use the swobject to detect browser size and adjust the size of the main .swf accordingly

because the flash movie stays at its original resolution (which is the purpose of "noscale"....)

any thoughts ?

Hi

i converted a ppt file into swf and use that swf to play with media player.
When mouse click event fired on screen it moves to next slide but audio is not forwarded.
can any one please tell me,How can we disable mouse click event .

Alex, I have the same problem as you....

I also have a problem of the controls being to small but i assume that is because of my attempts to resize the player after it has already acquired the stage width and height.

Maybe somehting can be changed in one of the external .as files to prevent the player from doing this? DisplayView.as or something?

By the way Alex...where do you put this Stage.scaleMode = "noscale" code???

@josh
hey josh that's a good idea
JWs code is kind of intense - but he's gone out of his way to clarify it, organize it well
just wanted to avoid having to route through the .as ! (laziness is so hard to avoid)

i'll try and follow through on your suggestion and see where i get...

re: small controls - it is my understanding that the player control/component dimensions will be independent (more or less)
or player and .width and .height as well as stageheight and stagewidth

however - you're going to distort your player (re: small controls) if you resize your host .swf (i.e. the flash movie which load the player)
from its original size
you could try playing with height and width variables of the player and then
dynamically resizing the containing movieclip

alternatively:
i've found it fairly easy to edit the player dimensions by directly editing the mediaplayer .fla
although no experience with the player controls in particular
------------------------------------------------------------------------------------------------------------------------
i've found that Stage.scaleMode = "noscale"

can only go in two places cleanly - other solutions seem to work but end up giving me other issues:
the very first frame, very top layer of the root timeline

or else
passed as a flashvar when i write the embed code into the html holder
while using the JS FlashObject

(i.e.

var myScale = 'noscale';
var so = new SWFObject("my_movie.swf","my_movie","1000","588","7","#000000");
so.addParam("allowfullscreen","true");
so.addParam("scale", "exactfit");
so.write("my_movie");

)

I think my problem is the opposite to yours actually...you said the player was resizing your entire parent movie?

My player is resizing itself to the size of whatever swf it appears in...

ya
thats' what 'noscale' should fix
did you place it in the root TimeLine and the problem still persists?

yeah still have problem.... my project is 1000x600px and the player when inserted by either a loader component or the movieclip directly from the source .flv it will resize to the stage size.

i have tried 'noscale' in both the source and my .flv and doesn't seem to change anything.

any luck with the various .as files?

ah - josh
forogot to mention
you need to make sure you remove every Flash UI component from your movie to fix the scale bug.
(if you have flash scrollpane or anything like that, get rid of it!)
that is an issue many people are having

Ok, I am pretty new to flash, so hopefully you guys can help me out I have totally exhausted myself trying to build this site:

www.tcsspecializedservices.com

but as you can see the images are not coming up only the blocks are?

Can you tell me what I am doing wrong please?

this is the script I have in frame 1 on the home page section:

loadMovie("imagerotator.swf", slideshow);

var file="playlist.xml";

but no play list shows :*(

what am I doing wrong? what other files should I upload besides those two files?

Thank you!

Alex

yeah i have a scroll pane in there...i'll get rid of it and see how i go

ok cool that worked.....

though I had a scroll pane component and also a progress bar component and they were kinda essential...

Would it still work if i hand made and coded my own progress bar and scroll panes?

though I will have to do some homework to do this myself :-)

Also there is the problem of when i resize the document the video reverts back to going to stage size?? Though I spose I can just fix that by publishing the html to 'match movie' and 'no scale'

ok I did my own preloader and scrollbar and everything is working great.

now I just have to figure out how to do 2 extra videos :-)

by the way thanks for your help Alex

ok doing more than one video is way to annoying so i have decided to go with the playlist option....

however there is the problem that when i play a video then move to a different section of the site (i.e a different frame on root timeline) the audio keeps playing...and then when i go back into the frame with the video and play another video it will play over the top of the last one...very annoying.

so basically i need to issue a stop command to the player as well as removing it on change of frame..

I have tried what i could find on the jw documentation but doesn't seem to work.

any ideas?

hi everybody,

I have the FLV media player on the stage and a bunch of buttons at the bottom; when I click on a button, I'd like to change the flv in the player.

How can this be done?

I've tried the loadFile function but it doesn't work.

Any suggestions?

thanks

A Note On Flash Security Settings Affecting Player Width/Height
=====================================================

Hi,

I have been struggling with the player height and width going fullsize when embedding the player. I managed to locate the source of my problem (this may have been mentioned before, this thread is huge).

I was pulling in XML from an external server and testing locally, I consequently had to edit my Flash security settings to allow my local copy to communicate with the external servers XML. After adding my movie to the "always allow" flash list this would cause my player to go full screen. No idea why. But by copying my XML to the local folder and removing my flash movie from the "always allow" list, my player loaded the correct size.

Hope this helps someone,

Gareth

Hi Gareth,

I'd be happy to get a look at your source. ;)

Sorry 4 my english ...

i have this "contenido.swf", and at the 7 frame i have this ...

carga2.loadMovie("video.swf?id="+random(1000));
stop();

the archive "video.swf" will load the flv player ...
in the first scene (preloader) i put it ...

var height = 260;
var width = 580;

and im loading the flvplayer.swf in the second scene, first frame, in this way ...
holder.loadMovie("flvplayer.swf");
the vars of the flvplayer are in mediaplayer.as ... xml, colours, etc works ok in all swfs...

but i have a problem with this: var height = 260;var width = 580;

its only works on the video.swf file, executing only it,

because when i execute contenido.swf, it loads video.swf and it loads flvplayer.swf, ok, but the dimensions of the flvplayer are incorrect, all vars works fine, but this two not...

I tried putting this two vars in all places :(
Can you help me? If it works i will need a license. ;)

At the flvplayer.swf i have this ..

// Stage variables
Stage.scaleMode = "noScale";Stage.align = "TL";stop();

// Center activity icon
activity._x = Stage.width/2;activity._y = Stage.height/2;

var height = 260;  var width = 580;

// Start the player
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player);

Thank you.

Hi everyone,

I'm loading the mediaplayer as an external swf, with a xml playlist, everyting works perfect. Only 1 problem though. The whole stage moves from the upper left corner to the lower right corner. I don't have a clue how to solve this. Here's my code:

_root.createEmptyMovieClip("holder",5);
holder._x = 530;
holder._y = 495;
holder.loadMovie("media/mediaplayer.swf");
var file = "media/playlist.xml";
var width = 541;
var height = 312;
var backcolor = 0xFFFFFF;
var frontcolor = 0x000000;
var lightcolor = 0xCC0000;
var showdigits = "true";
var autoscroll = "false";
var shuffle = "false";
var volume = 80;
var shownavigation = "true";
var thumbsinplaylist = "true";
var displayheight = 288;
var displaywidth = 384;
activity._visible = "true";
//Start the player
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player);
stop();

Thanks!

I'm using flv player 3.15 and I'm having a problem.
I'm loading the mediaplayer.swf into my main swf with a button.
script:

on (release) {
mpl.controller.getEvent("stop");
loadMovie("flvplayer/mediaplayer.swf", 50);
}

the mediaplayer.swf script is:

var width = 650;
var height = 355;
var showdigits = "true";
var displaywidth = 425;
var lightcolor = 0x990000
var backcolor = 0x000000
var frontcolor = 0xFFFFFF
var thumbsinplaylist = true
var fullscreenpage = false
var showstop = true
var usefullscreen = false
var prefix = 'http://www.mysite.com';
var file = '/flvplayer/playlist.xml';

// Start the player
com.jeroenwijering.players.MediaPlayer.main();

everything is fine until I press the button again ...the player is unloading but the flv is still playing. I though the sollution was mpl.controller.getEvent("stop"); but it doesen't work :((((

pls. help

Hello,

I would like to play a local file called tata.flv inside a flash page with this fantastic player.
I don't know where to find clear tutorial on how to do that. it seems that there are a lots of things to do before...
If somebody can help
Thank you

does anybody know why my mpl.controller.getEvent("stop"); command to stop the flv playing is not working?
please help me, it's my only big problem about this player. I really want to use it.
Jeroen, pretty please.....:P I can't believe I was unable to find such a script to stop the flv playing (&streaming) from a button, I'm going crazy for days now :((

This is the first web demonstration ...
<We want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! >.... we love this tool but we want DEMOCRACY we're not all experts in A.S. please give us freedon and give us a clear documentation !!!

Thank you Jeron.

Mosaic, what you ask sounds kind of stupid. no offence. It's like asking: how to install a game or program? Ask something concrete with details....... some problem you occured trying to install this player.

I (for example) just need this "little" big detail about how to stop the flv streaming/playing. The rest is working as planed.
I read the whole page and the solution described by Jeron was mpl.controller.getEvent("stop"); . But for me is not working. I'm sure I am doing something wrong, but I need help finding what.
Is anybody out there? Helllooooooo.... Echooooooo :)))
pls help....

I need what's in the player "stop" button (the a.script)....something like that will be perfect

You see supreme what you asking sounds kind of "no interest". no offense :) ...
If you have something that can help step by step on "How to integrate the new player inside a swf" will be more than perfect !

Cheers

Mosaic, try to read the "read me" file ;) ....or this topic. After that ask what you don't understand...maybe it will be the same problem as mine :)) ....and then will be in your interes too. hehe

all work fine but ...
i have a problem with fullscreen :
when i leave fullscreen the mediaplayer fit all the main swf and not the size i defined with the width and height parameters

thanks for help

This is the first web demonstration ...
<We want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc !<a href="http://www.freebids.net">online auctions</a> we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! we want doc ! >.... we love this tool but we want DEMOCRACY we're not all experts in A.S. please give us freedon and give us a clear documentation !!!

Thank you Jeron.

Jeroen, mate, wicked player..thanks so muuuuch!!!

Ok took me a while but now ALL is working.
this is how. hope it can help.

1_copypasted the player from source .fla (only the player, 1 frame) into my main .fla where/when i wanted it to be
2_in the player frame on main .fla only left this:
stop();
var mpl = new com.jeroenwijering.players.MediaPlayer(this.player)
3_on the same player layer i put a blank keyframe for each other page of my main .fla to stop and unload the player when navigating to other pages of my site. this is the script in the blank keyframes:
mpl.controller.getEvent("stop")
4_ figured out how i wanted my player playing around with the wizard page (http://www.jeroenwijering.com/?page=wizard) and checking the flashvars page (http://www.jeroenwijering.com/?item=Supported_Flashvars), then put all my flashvars in a blank keyframe coming just before the player (pretty sure you can chuck'em in the player frame, but be sure they're before the script you put previously).this is my code:
var kheight = 296;
var displaywidth = 300;
var showdigits = true;
var showstop = true;
var showicons = false;
var thumbsinplaylist = true;
var usefullscreen = false;
var bufferlength = 5;
var lightcolor = 0x333333;
var backcolor = 0xFFFFFF;
var frontcolor = 0x000000;
var autoscroll = true;
var repeat = false;
var shuffle = false;
var file = "playlist.xml"
first line in bold is next point...
5_remember that if you're using flash UI components (scrollbar, checkbox..) in your site the player will freak out and won't respect the values you set for width and height. This is because the parameter "width" and "height" used as vars in the players create a conflict with the width and height parameters of flash components as they're named the same. so Only solution is to open all the .as files of the com folder (source mediaplayer), one by one press command F and search for all the width and height parameters and rename them. that's why my first line of the above code say var kheight and not height. Only "height" and "width", not _height or ...height.

for me between step 1 and 5 there were about 1000 other different tries ...'keeeenheeellll!! hope with this post won't be the same for all of you guys..

thanks jeroen, thanks blustar

I am sorry, i read thoses posts but could not find any solution to make the player work.
I have a fla that will load the mediaplayer.swf
In the first frame of the container fla i put this code :
loadMovie("mediaplayer.swf",container);
var file = 'afraid.flv';
var width = 274;
var height = 345;
var displayheight = 118;
var backcolor = 0xE7E1C0;
var frontcolor = 0x621f08;
var lightcolor = 0xCA9700;

where container is my MC container :)

Then, in the mediaplayer.fla i put this code on the first frame :
stop();
// Start the player
var mpl = new com.jeroenwijering.players.MP3Player(this.player);

So the player is loading but anything else. No var seems to be seen, no movie works.
The flv is in the good directory (where all the fla are).

Many hours that i am looking … if you could help … !!!!
Thanx

Oh, don't use my precedent message … i make it work … :)

supreme:

you must start the player with

var mpl = new com.jeroenwijering.players.MediaPlayer(this.player);

otherwise your button won't refer to teh correct var

STRANGE BUG width the width and the eight : i load the player into another one as many others swf (sectiosn of the site). Eveything works perfect, but if i load other movies (as other sections) and i go back to the players, the width and the eight take all the screen place without any reason (to the bottom and the right of thr screen). Can't explain this. Does someone has already this problem ?

to Nik F

could give me your published mediaplayer.swf with the kwidth and kheith inbedded. I tried your solution because i use tha datagrid, but now i only see the full player trying to load but it doesn't do anything.

thanks alot!

menno

I narrowed it down to this:

Followed Nik's guidlines to replace all "width"and "height" used in the controlls. Republished this and tested it with a new html page providing the var file, this played my mp3 file just fine.

How ever, when I used this inside my own swf file, the mediaplayer.swf shows all the buttons and doesn't play anything. It seems like it doesn't get any var provided by my swf.

The old mediaplyer.swf (previous version 3.14) I use does work inside my own.swf.. The old mediaplayer.swf is executed by:

var mpl = new com.jeroenwijering.players.MediaPlayer.main();

Do I need to change this to something else or do I need to change some code in the new mediaplyer.swf?

download version 3.14, changed every parameter to kheight and kwidth, works like a charm inside my swf.

Hopefully this will help others, as previous suggestions helped me to get this great player working inside my own swf. Here's my code:

Open de player for the first time, but hide it untill it's get activated by user:

root.createEmptyMovieClip("mymediaplayer",5);

mymediaplayer._x = 235;
mymediaplayer._y = 426;

unloadMovie(_root.mymediaplayer);
unloadMovie(mymediaplayer);

var kwidth = 430;
var kheight = 130;
var displaywidth = 110;
var displayheight = 110;
var autostart="false";
var bufferlength = 0;
var showdownload= "true";
var shuffle = "false";
var repeat ="list";

//Start the player
var file = "album_latest.php";
var mpl = new com.jeroenwijering.players.FLVPlayer(this.player);

stop();

Open the player with variable album parameters

_root.mymediaplayer.mpl.controller.getEvent("stop");
unloadMovie(_root.mymediaplayer);

_root.file = "album.php?album="+infostruc[current - 1].auth+"/"+infostruc[current - 1].album+"/";
// and then load the mp3 player again:
_root.bufferlength = 0;
_root.mymediaplayer.loadMovie("mediaplayer.swf");

That's all folks, works with other UI from flash, such as datagrid.

Modified mediaplayer with params kwidth and kheight.

http://www.weak-link.nl/mediaplayer.swf

Hi,

I successfully included the mediaplayer in my flash movie.
Now I need to get update events from the player (as you can do with the getUpdate function in JavaScript) in the ActionScript code of my flash movie.

Is there a way to do this?

Thank you in advance

Frank

Hello Nik f.

I have followed all your steps but it doesn't work to me. It doesn't play the videos of the .xml file and the mediaplayer looks weird.

Could anyone tell me how to insert the new 3.15 mediaplayer with an xml playlist in another .fla.

Help is so much apreciatted...

/Juan from Spain.

Ummm... can any kind soul simply post a folder that has ALL the files necessary to demonstrate this working properly??

(I'd too love to use the player in a Flash movie but this subject is wayyy too long and confusing to give it a try.)
much thanks by many I'm sure,
R

hey guys, i was able to change all the width/height to "kwidth/kheight" and get it to embed into another swf that uses components and not have the full screen distortion. worked great!! I posted the updated "com" folder at
<a href="http://www.bandphotography.com/com.zip">http://www.bandphotography.com/com.zip</a>.

The only thing I noticed is that I set the flash vars in the FLA file, but those didnt work. I had to edit the flashvars in the mediaplayer.as. Then it worked like a charm.

mikey

Hi. I have a very strange problem and so, i can't use the player. I can make it work fine but i need 3 playlist, so on specific frame i load the playlist.xml, then an another i load the playlist2.xml and an another i load the laylist3.xml. It works BUT : IT LOADS SOME ITEM FROM THE PREVIOUS PLAYLIST each time i swith to the othe playlist !!! I can't explain and solve the pb.
Thanx.

Ha, ha dumbass, the link spamming doesn't work anymore.

Thanks for screwing it up for those of us who need to put links in our posts.

have you had any issues with removeMovieClip (using AS2) being stopped from working by UI components?? if so do you have any solutions, this has been hurting my head for a while it seems a bit silly really but i am assuming it is a conflict in the actionscript somewhere...

Hi

I managed to integrate the player in my project. Everything runs fine, but the screen where I load the player, the mouse disappears and all the buttons I have around do not to appear as buttons any more.

I removed all Mouse listeners from the code (3), but now I have the same problem when I come back from a full screen display.

I also: I managed to place my movie on the correct spot again once coming back from fullscreen, but it seems there are two ways to handle this: with a mouse click and with the Esc button. Is tha correct?

ralph

I need a developper specialized in the integration for this player inside a flash.
Please contact me here for a mission : flashsofianATgmail.com
Thanks

The height and width would only work if I put quotes around them.

Hmmm.. still nothing clear here?
Sure wish some kind soul would post a folder with a working example setup....
I'm not being lazy but I can't see putting in hours on something that folks with more Flash knowledge then myself are struggling with.
Thanks!
Tom

Does anyone have an FLA file I can see? None of this seems to be working :(

Please can someone upload a working source code of 3.16 version.

@BKP

the v.3.16 source is in the source folder in the download .zip package
http://www.jeroenwijering.com/?item=JW_FLV_Media_Player

Thanks. But I am looking for the source code of an integrated flash file which in turn embed the FLV player.

Hi have loaded a intro.swf via loadMovie into the mediaplayer.swf.
The idea is to start the loaded movie clip after the intro.swf is finished.
Is there a possibility to start the playpause event from the intro.swf?
I have tried sendEvent("playpause") with _root. _parent and more,
Some advice would be nice.
Thanks

[URL=http://www.fast-wowgold.com]FFXI Gil[/URL] or you can call it [URL=http://www.fast-wowgold.com/Final-Fantasy-Gil.htm/]Final Fantasy XI Gil[/URL] . We have sale it now , all player know it's a game money in Final Fantasy XI . you know the farm gil it's not easy , but we promise all the player we must be make our [URL=http://www.fast-wowgold.com]FFXI Gil[/URL] price cheaper , so if you want get [URL=http://www.fast-wowgold.com]cheap FFXI Gil[/URL] or [URL=http://www.fast-wowgold.com/Final-Fantasy-Gil.htm/]cheap Final Fantasy XI Gil[/URL] you can contact our 24/7 online service .
buy [URL=http://www.fast-wowgold.com]FFXI Gil[/URL] here you will get some offer at sometimes ! enjoy your final fantasy xi .

also if you want other game gold or other items , please choose your game and items , and if you don't know how to do the next step or if you have any other questions please contact our 24/7 online service we will always here for you !
all copyright from www.fast-wowgold.com !

What we don't want is your DAMN SPAM.

Anyone have any luck with version 4?

I'm also having the re-size problems with version 3 and just flickering with version 4. Any help would be much appreciated.

Cheers
Mike

I need A developer to include FlashPlayer at a different level in a swf

MailAddress : aniclip@mac.com

Thanks

Hi , this is a link to download an example file on how to insert the JW Player in a Flash Movieclip...

The link = http://rapidshare.com/files/138223139/JW_Player_into_Flash.zip.html

All is in the zip file

Enjoy !!!

[URL=http://www.fast-wowgold.com]FFXI Gil[/URL] or you can call it [URL=http://www.fast-wowgold.com/Final-Fantasy-Gil.htm/]Final Fantasy XI Gil[/URL] . We have sale it now , all player know it's a game money in Final Fantasy XI . you know the farm gil it's not easy , but we promise all the player we must be make our [URL=http://www.fast-wowgold.com]FFXI Gil[/URL] price cheaper , so if you want get [URL=http://www.fast-wowgold.com]cheap FFXI Gil[/URL] or [URL=http://www.fast-wowgold.com/Final-Fantasy-Gil.htm/]cheap Final Fantasy XI Gil[/URL] you can contact our 24/7 online service .
buy [URL=http://www.fast-wowgold.com]FFXI Gil[/URL] here you will get some offer at sometimes ! enjoy your final fantasy xi .

also if you want other game gold or other items , please choose your game and items , and if you don't know how to do the next step or if you have any other questions please contact our 24/7 online service we will always here for you !

all copyright from www.fast-wowgold.com !

Thx Flashnos, but there is for FL 8 and AS2, some people here try to load JW V4.1 with AS3

I.

Hello Folks,

If a generous person can help the community with example 4.1 player inside flash.
Many thanks

Hi Guys,

i've been trying to load the mediaplayer (version 4) into another swf file (also complited @ AS3) and im getting a runtime TypeError exception.

the problem seems to be coming from the moment the player tries to access the satge inside the view constructor:
in somewhere like this line:
skin.stage.scaleMode = "noScale";
skin.stage.align = "TL";

the full exception is as follows:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.jeroenwijering.player::Controller$iinit()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\player\Controller.as:42]
at com.jeroenwijering.player::Player/com.jeroenwijering.player:Player::skinHandler()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\player\Player.as:100]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.jeroenwijering.player::SWFLoader/loadSkin()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\player\SWFLoader.as:63]
at com.jeroenwijering.player::Player/com.jeroenwijering.player:Player::configHandler()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\player\Player.as:94]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.jeroenwijering.utils::Configger/com.jeroenwijering.utils:Configger::loadFlashvars()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\utils\Configger.as:74]
at com.jeroenwijering.utils::Configger/load()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\utils\Configger.as:44]
at com.jeroenwijering.player::Player$iinit()[M:\DEV\Web-Pages\flash\jeroenwijering player\ver 4\com\jeroenwijering\player\Player.as:85]

I'm considering to make a custom simple flv player of my own, but this is my last resort....

Thanks

<a href="http://www.gamegoldcoin.com/">ffxi gil</a>
<a href="http://www.gamegoldcoin.com/">cheap ffxi gil</a>
<a href="http://www.gamegoldcoin.com/">buy ffxi gil</a>
<a href="http://www.gamegoldcoin.com/">lotro gold</a>
<a href="http://www.gamegoldcoin.com/">buy lotro gold</a>
<a href="http://www.gamegoldcoin.com/aoc-gold.php">buy aoc gold</a>
<a href="http://www.gamegoldcoin.com/aoc-gold.php">aoc gold</a>
<a href="http://www.gamegoldcoin.com/aoc-gold.php">age of conan gold</a>
<a href="http://www.gamegoldwow.com/">wow gold</a>
<a href="http://www.gamegoldwow.com/">cheap wow gold</a>
<a href="http://www.gamegoldwow.com/">buy wow gold</a>
<a href="http://www.gamegoldwow.com/">wow gold</a>
<a href="http://www.gamegoldcoin.com/">ffxi gil</a>
<a href="http://www.gamegoldcoin.com/">buy ffxi gil</a>
<a href="http://www.gamegoldcoin.com/">f11 gil</a>

I noticed a few people were trying to update the

var file = "someVideo.flv"

when say a button is clicked etc, and couldnt get the mpl.loadFile("someVideo2.flv"); call to work, this is because its a 'private' function and cant be accessed.

instead i found updating the first instance of the feed array works great

mpl.feeder.feed[0]['file'] = "someVideo2.flv";

you should beable to update the other feed associated variables from here too such as 'image' etc, although i haven't tried this yet.

Why the author is not helping?..It seems everyone have same problem.

it works only if u use loader.swf in html...which in turns loads Jwf player....i see jwf player now. Still not playing video...i see it is streaming inf irebug...just showing blank screen

ok i found this on another thread.

var myLoader:Loader = new Loader();
myLoader.load(new URLRequest("player.swf?config=config.xml"));
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
function finishLoading(e:Event):void{
addChild(myLoader);
}

<config>
<logo></logo>
<skin></skin>
<playlist>none</playlist>
<repeat>true</repeat>
<stretching>uniform</stretching>
<volume>50</volume>
<quality>true</quality>
<autostart>false</autostart>
<width>320</width>
<height>280</height>
<linktarget>none</linktarget>
<type>video</type>
<streamer>http://localhost:81/media/flvprovider.php</streamer>
<file>teaser3.flv</file>
</config>
config.xml
<config>
<logo></logo>
<skin></skin>
<playlist>none</playlist>
<repeat>true</repeat>
<stretching>uniform</stretching>
<volume>50</volume>
<quality>true</quality>
<displayclick>link</displayclick>
<autostart>false</autostart>
<shuffle>false</shuffle>
<repeat>true</repeat>
<width>320</width>
<height>280</height>
<linktarget>_blank</linktarget>
<type>video</type>
</config>

I am at full stop in communicating with player SWF. It seems only way is plugin way to communicate with player...or write a plugin that exposes all events and listen to all custom events.

I think i finally solved it. I am FLASH ACTION SCRIPT noob. HAHA.

I just stored the Loader in global variable and accessed its content and got the view directly ....

loadedSWF=myLoader.content;
var myView:com.jeroenwijering.player.View = loadedSWF.view;

once u have swf u can manipulate anything...

My problem solved !

Hello Alex,

Can you post FLA please ?

Thx

There is not much to it.

I can't post fla. as it has some business stuff.

Create loader.fla... Add two layers. One layer drop a empty movie clip and write actionscript code in first keyframe.
Another layer you add anything u want. I just added some hotspot to seek different part of video.

But again i am flash noob. So it is better if you do get idea from flash experts. But i can show how to interact with player once u loaded using loader.

part of code

===
import flash.display.*;
import fl.events.*;
import fl.events.ComponentEvent;
import com.krypton.events.CustomEvent;
import com.jeroenwijering.events.ViewEvent;
import com.jeroenwijering.player.View;
import com.jeroenwijering.player.Player;

var myLoader:Loader = new Loader();
var loaderinfo=myLoader.contentLoaderInfo;
//var vars = "http://localhost:81/media/player.swf?config=http://localhost:81/media/config.xml";
var vars = "player.swf?config=config.xml";
myLoader.load(new URLRequest(vars));
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
var loadedSWF;

function finishLoading(e:Event):void{
myLoader.x=0;
myLoader.y=0;
addChild(myLoader);
myLoader.width=240
myLoader.height=370;
loadedSWF=myLoader.content;
//arealabel.text=loadedSWF.loaderInfo.url;
}

======

Add customEvent listener....

Add the following like for do any seek or interact.

if(loadedSWF)
{
//arealabel.text=loadedSWF.name;
var myView:com.jeroenwijering.player.View = loadedSWF.view;
if(myView)
{
if(event.data=="something")
myView.sendEvent('SEEK',6);

.....

Here is the code for CustomEvent.js

package com.krypton.events
{

import flash.events.Event;

public class CustomEvent extends Event
{
public static const HOTSPOT_CLICKED:String = "hotspotClicked";
public var data:Object;
public function CustomEvent(type:String, params1:Object)
{
this.data = params1;
super(type);
}
}
}

Enjoy!.

My stage size is 1000x330 and player occupies 600x330 ..rest for something else.

But the height and weight is ratio of something....to get that 600x330.

So play around with different values to get ur desired height and width...

I still have few minor issues...fullscrenn brings whole stage not just player...also autostart =true stream 4 times...

I have to figure out why...

Hi alex
I try your exemple without success :(

Player is loaded but :

Error #2044: IOErrorEvent non pris en charge : text=Error #2035: L'URL est introuvable.

Thx

<config>
<logo></logo>
<skin></skin>
<playlist>none</playlist>
<repeat>true</repeat>
<stretching>uniform</stretching>
<volume>50</volume>
<quality>true</quality>
<displayclick>link</displayclick>
<autostart>false</autostart>
<shuffle>false</shuffle>
<repeat>true</repeat>
<width>340</width>
<height>280</height>
<linktarget>_blank</linktarget>
<type>video</type>
<streamer></streamer>
<file>video.flv</file>
</config>
//import flash.display.*;
//import fl.events.*;
//import fl.events.ComponentEvent;
//import com.krypton.events.CustomEvent;
import com.jeroenwijering.events.ViewEvent;
import com.jeroenwijering.player.View;
import com.jeroenwijering.player.Player;

var myLoader:Loader = new Loader();
var loaderinfo=myLoader.contentLoaderInfo;
//var vars = "http://localhost:81/media/player.swf?config=http://localhost:81/media/config.xml";
var vars = "player.swf?config=config.xml";
myLoader.load(new URLRequest(vars));
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
var loadedSWF;

function finishLoading(e:Event):void{
myLoader.x=0;
myLoader.y=0;
addChild(myLoader);
myLoader.width=340
myLoader.height=280;
loadedSWF=myLoader.content;
//arealabel.text=loadedSWF.loaderInfo.url;
}

Hey that is because it won't work in flash...but it work in browser.

That is same error i get in flash debugging because it try to load the file from remote. I hope u have flvprovider and php back end..if not remove streaming and use exact file location.

remove streamer tag from config.xml

It works...here is html code

<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("loader.swf","vidDisplay","1000","330","9,0,124,0","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.write("container");
</script>

It removes the control bar from player...so u control through hotspots or some kind external way ...u can always put back control bar...change it and config.xml,, trial and error.

<config>
<playlist>none</playlist>
<stretching>fill</stretching>
<volume>50</volume>
<quality>true</quality>
<autostart>false</autostart>
<usefullscreen>false</usefullscreen>
<allowfullscreen>false</allowfullscreen>
<linktarget>none</linktarget>
<showicons>true</showicons>
<streamer>http://tripadvisortv.com/media/flvprovider.php</streamer>
<start></start>
<file>teaser3.flv</file>
<title>The Funj - A Preview</title>
<backcolor>#000000</backcolor>
<frontcolor>#999999</frontcolor>
<lightcolor>#ffffff</lightcolor>
</config>

I'm using Markos example a bit above here in the thread. All works fine except for when doing a full size window. The controlbar won't disappear. Anyone know how to make it disappear when full screen size is activated?

when i use it in Mozilla FireFox ,
text=Error #2035: URL NOT FOUND
but it is ok in IE

sorry, my english is bad.

So... After read all the post... there is no final solution to integrate JW flv player into our own .fla ...
or now is so confuse... too many post...

I have embedded the player a year ago. It stopped working, maybe because of Flash Player 10? Does anyone have the Fla example with the embedded code?

I would appreciate...

I tried embeding the flv player into flash but i tried all the resources above but fail anyone has a working example fla?

I've just downloaded the latest version (v4) and I'd like to ask if someone knows how to load the player into another swf.

Formerly, I bypassed the problem by enlaging the background of the original fla but the trick is a little bit "dirty" and doesn't allows some other things I'd like to include into my parent swf.

Hi,

I've been able to successfully load the player 5 into another swf. Two questions I hope someone can answer.

1) How can I set the config via actionscript? I've tried doing the following, both with and without quotes, after receiving the "jwplayerready" event. If I try to set the config prior I get an error stating that the property does not exist:

_player.config.setConfig({'image' : 'preview.jpg', 'skin':'beelden.zip', file:'video.flv'});

2) Is it possible to have multiple instances of the jw player loaded in one swf and function properly? I have been able to load two instances, but while one functions properly the other plays only the audio.

Thanks,
David

Hi can any one tell why I am getting this error (was working Ok a few months ago)

'http://www.youtube.com/get_video.php?video_id=Vo_0UXRY_rY&t=vjVQa1PpcFPIb86Ytb4gAqADtltBrF4kRGw_d3kH...'

thanks

Chances are, YouTube updated their API to get rid of people leeching videos from their servers. Maybe you should not do that. ;)

Note, this thread is about embedding the player into another SWF, not for why is YouTube leeching broken. Thanks.