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

Forums

/

MXLMC compile plugins tutorial???

36 replies [Last post]

@Jeroen

Do you plan to create step by step instructions for version 4.5 to compile a plugin using either Flex Builder or the SDK? Try as I may I can't come up with a procedure that works for me. I "think" I have followed the instructions carefully but obviously am overlooking something.

Regards - Jimb

We're going to try make this happen in a later version, but the short answer is that it will require some pretty significant modifications to the player, as the graphical elements are currently built in Flash.

Hi Zachary

Thanks for the reply. Not sure I was clear in my post though.

I was asking for some guidance as to How to compile the plugins that we can currently download. There are 3 there that I wish to modify and create new SWF's for. Since there are no FLA's in the download folders and limited instructions on how to use the SDK I'm stuck until I can understand how you folks compile a plugin without an FLA

Any further insight will really be appreciated. - Regards - Jimb

@ Jimb:

Check out build.sh from one of the existing plugins, eg http://developer.longtailvideo.com/trac/browser/plugins/hd/build.sh.

It's a single line command that should do the trick.

@Zachary

Once again, THANK YOU for getting back to me. Yes, I've seen the build.sh My problem is I don't know what to do with that file. Obviously it won't open in CS3, Even though I have added the Flex Builder MXMLC.exe directory to my system path and TRIED to follow the instruction I can't make things work.Is there more info on my local directory structures I need to use than is given in the build.sh? That's the kind of info I seek. I have tried dragging and dropping things into the CMD Line window as instructed but, still no joy.

I just want to be able to compile a plugin LOCALLY on a workstation and then upload the resulting SWF to our server. I already modify the player.as file to point to our domain for plugins and that is all working fine for those pre-compiled plugin SWF I don't need to modify. The issue I am struggling with are the few I need to change slightly for custm purposes.

I do appreciate your feedback and if you can help me get this to work I'd love to make a new video tutorial for others here on the forum so they can do the same. I've done that often and get constant feedback from those that have watched them. I'm fairly confident I'm not the only one that seeks this information. I'm just willing to admit I don't know how to make it work.

Regards - Jimb

if you are on Windows, then you need to convert build.sh to build.bat.

Here are a couple of examples.

For the flashvars sample plugin:

:: This is a simple script that compiles the plugin using MXMLC (free & cross-platform).
:: To use, make sure you have downloaded and installed the Flex SDK in the following directory:

SET FLEXPATH="\Flex SDK"

ECHO "Compiling flashvars plugin..."

%FLEXPATH%\bin\mxmlc .\Flashvars.as -sp .\ -o .\flashvars.swf -use-network=false

For the metaviewer plugin:

:: This is a simple script that compiles the plugin using MXMLC (free & cross-platform).
:: To use, make sure you have downloaded and installed the Flex SDK in the following directory:

SET FLEXPATH="\Flex SDK"

ECHO "Compiling with MXMLC..."

%FLEXPATH%\bin\mxmlc .\com\jeroenwijering\plugins\MetaViewer.as -sp .\ -o .\metaviewer.swf -use-network=false

These build.bat files should go in the same directory as the build.sh.

Adjust the FLEXPATH variable to the location of your Flex SDK.

Then double-click on build.bat

@lost

Once again.... :) you've given me a spot on answer. I really appreciate all that I learn from you. I do indeed work on the windows platform and a .BAT file adjusted to my file structure was all it took to get me going. I've managed to get all of my customized JW plugins modified and working on my domain as I wanted almost. Truth is my basic version of captions is now working but tomorrow when I'm not so darned sleepy I'll go to work on a host definable - user selectable language version of it that allows the user to toggle between multi language captioned files. I have 3 long term clients that are very anxious for it.

When I create the tutorial for other on the forum, I'll make sure I specify that the video makes it clear it's for WINDOWS and not a MAC or LINUX.. That's kinda why I was so baffled in my efforts to recompile plugins. The instructions I read did not inform they needed to be modified for the windows platform. I'm really ashamed I didn't even think of that. You'll certainly be credited for your assistance again.

I am willie willie willie indebted to you :)

Regards - Jim

@jimb,

You're most welcome. All the help you've posted is also appreciated.

I was shocked when the first batch file I tried actually worked. So then, just for testing, I re-compiled all of the Longtail plugins and they all worked.

Now, I'm going to get to work making some plugins of my own. I'll post the source if I get anything useful working.

    Good Luck!

Cool! I'll make sure to add a tutorial to the developer site, using the helpful comments here. Thanks guys.

The tutorial is now live and can be found at:

http://developer.longtailvideo.com/trac/wiki/PluginsCompiling

It explains how to compile plugins using both a .bat (Windows) and a .sh (Linux/MAC) file.

I've got the location of the flex sdk as
C:\Program Files\flex_sdk_3

but the location of the flashvars is

C:\Program Files\trunk_sdk-r296\trunk\sdk\plugins\flashvars

the path i given in the build.bat is
SET FLEXPATH="\Program Files\flex_sdk_3"

but when i double click on the build.bat it says
Unable to locate the component.

and says This application has failed t start because MSVCR71.dll was not found .Re-installing the application may fix this problem...

I dont have admin access in this computer. so would it make any difference???

I fixed this problem. i downloaded MSVCR71.dll and place it in the system32 folder.

However still I couldn' execute this as I didn't use the admin login...

This is my build.bat file for dsharing.as file.

SET FLEXPATH="\Program Files\flex_sdk_3"

echo "Compiling dsharing test plugin..."

%FLEXPATH%\bin\mxmlc .\Sharing.as -sp .\ -o .\dsharing-10.swf -use-network=false

But I'm getting this error when I compile this.

Error: Couldn't find JRE
Error: Couldn't find Java 2 Runtime Environment

Yer I've installed java now it is compiling.

but it says,

All licenses for this program have been disabled, Contact your key server administrator for further information

what could be the error. But i've admin rights on the current computer..

Has anyone got the mxml file for dsharing-10.swf ???

Has anyone got the mxml file for dsharing-10.swf ???

WOW! BOLD TEXT!

I'm the only one that has it, because I modified it from the source.

I posted a link for you in some other thread; that's why we don't like cross-posting.

Anyway, here it is again:

    http://willswonders.myip.org:8074/dsharing-10.zip

And just for you...    I'll leave the server on tonight.

OH, MAYBE YOU MEANT THE BATCH FILE???

:: This is a simple script that compiles the plugin using MXMLC (free & cross-platform).
:: To use, make sure you have downloaded and installed the Flex SDK in the following directory:

SET FLEXPATH="\Flex SDK"

ECHO "Compiling dsharing plugin..."

%FLEXPATH%\bin\mxmlc .\com\delfi\dsharing\Sharing.as -sp .\ -o .\dsharing.swf -use-network=false

Directory Structure:

TreePrint listing of:

C:\My Download Files\developer\sdk
|   +---dsharing
|   |   |   AC_RunActiveContent.js
|   |   |   build.bat
|   |   |   Copy of d-sharing.swf
|   |   |   d-sharing.fla
|   |   |   d-sharing.html
|   |   |   d-sharing_preview.png
|   |   |   dsharing compile warnings.txt
|   |   |   dsharing.swf
|   |   |   dsharing_readme.html
|   |   |   DSharingSample.fla
|   |   |   DSharingSample.html
|   |   |   DSharingSample.swf
|   |   |   logo.png
|   |   |   logo_dsharing.png
|   |   |   preview.jpg
|   |   |   readme.html
|   |   |
|   |   +---com
|   |   |   +---delfi
|   |   |   |   |   TweenManager.as
|   |   |   |   |
|   |   |   |   \---dsharing
|   |   |   |           dsharing-10.zip
|   |   |   |           Sharing.as
|   |   |   |        
|   |   |   \---jeroenwijering
|   |   |       +---.svn
|   |   |       |   |   all-wcprops
|   |   |       |   |   entries
|   |   |       |   |   format
|   |   |       |   |
|   |   |       |   +---prop-base
|   |   |       |   +---props
|   |   |       |   +---text-base
|   |   |       |   \---tmp
|   |   |       |       +---prop-base
|   |   |       |       +---props
|   |   |       |       \---text-base
|   |   |       \---events
|   |   |           |   AbstractView.as
|   |   |           |   ControllerEvent.as
|   |   |           |   ModelEvent.as
|   |   |           |   ModelStates.as
|   |   |           |   PlayerEvent.as
|   |   |           |   PluginInterface.as
|   |   |           |   SPLoaderEvent.as
|   |   |           |   ViewEvent.as
|   |   |           |
|   |   |           \---.svn
|   |   |               |   all-wcprops
|   |   |               |   entries
|   |   |               |   format
|   |   |               |
|   |   |               +---prop-base
|   |   |               +---props
|   |   |               +---text-base
|   |   |               |       AbstractView.as.svn-base
|   |   |               |       ControllerEvent.as.svn-base
|   |   |               |       ModelEvent.as.svn-base
|   |   |               |       ModelStates.as.svn-base
|   |   |               |       PlayerEvent.as.svn-base
|   |   |               |       PluginInterface.as.svn-base
|   |   |               |       SPLoaderEvent.as.svn-base
|   |   |               |       ViewEvent.as.svn-base
|   |   |               |    
|   |   |               \---tmp
|   |   |                   +---prop-base
|   |   |                   +---props
|   |   |                   \---text-base

Anything else???

Thanks lost.
Thanks again.
But I'm gettng the following error:

com\delfi\dsharing\Sharing.as(510): col: 32 Error: Type was not found or was not a compile-time constant: TweenEvent.

private function hideForms(e:TweenEvent){

com\delfi\TweenManager.as(26): col: 36 Error: Type was not found or was not a compile-time constant: TweenEvent.

private function TweenComplete(e:TweenEvent){

You need:dsharing\com\delfi\TweenManager.aswhich should be in the zip package that you downloaded from Longtail Video.

Is your directory structure exactly as I posted above.

To keep things simple, I put my plugins in the developer\sdk that I get from Longtail Video with Tortise. That way, everything's structured correctly. For most plugins, you need to copy the com\jeroenwijering\events from another plugin.

    http://developer.longtailvideo.com/trac/#Sourcecode

If you're still stuck after this — I could package the entire dsharing directory, subdirectories, and contents in a zip for you.

@Lost

I've got the files from sharing plugin and docking pluging as you mentioned above except the version controlled files.

I have TweenManager.as in the same directory.

But my directory structure starts like this:

C:\Program Files\sdk\

C:\My Download Files\developer\
| +---sdk
| | | AC_RunActiveContent.js
| | | build.bat
| | | Copy of d-sharing.swf
| | | d-sharing.fla
| | | d-sharing.html
| | | d-sharing_preview.png
| | | dsharing compile warnings.txt
| | | dsharing.swf
| | | dsharing_readme.html
| | | DSharingSample.fla
| | | DSharingSample.html
| | | DSharingSample.swf
| | | logo.png
| | | logo_dsharing.png
| | | preview.jpg
| | | readme.html
| | |
| | +---com
| | | +---delfi
| | | | | TweenManager.as
| | | | |
| | | | \---dsharing
| | | | dsharing-10.zip
| | | | Sharing.as
| | | |
| | | \---jeroenwijering
| | | +\---events
| | | | AbstractView.as
| | | | ControllerEvent.as
| | | | ModelEvent.as
| | | | ModelStates.as
| | | | PlayerEvent.as
| | | | PluginInterface.as
| | | | SPLoaderEvent.as
| | | | ViewEvent.as

Would it make any difference?

@lost
Another issue:

When I was compiling on the command prompt, command prompt suddenly disappears in a second.

I just got a screen shot at the same time it goes off, and saw what was the mistake.

Are there any other ways available to see what was the error on the command prompt????

Yer, If possible, can you send me the whole directory?

Thanks a lot lost....

I couldn't access this url ........ doesnt come....

Hey lost.... I got it...

Let me compile and let you know...

wow, thanks again...

Wow, Thanks a lot lost, its working now..

wonderful.....

I really really appreciate your help.....

 
That's wonderful to hear. Don't throw away your knowledge, because soon you will be able to compile the new v5 player with MXMLC. See this thread: http://www.longtailvideo.com/support/forum/Plugins/19350/JW-Player-Version-5-coming-soon-

For something complex like the player, it's always best to get the source with a Subversion client like Tortise so the directory structure is maintained.

And of course now that you have MXMLC working, there are many other Longtail Video plugins that you can modify and compile (others too, where the source is available).

to Lost

hi,

i'm a very big beginner and i'm just trying to get things to work smooth and easy.
Seems to me like you understand all these things so i hope you'll be able to help me.

i'm trying to implement the Dsharing plugin but i have a few problems.

1 i have no idea how to write an embed code
2 the link and embed seem to be reading the same variable dsharing.embedvalue
3 i tried using the mail.php that you posted here but it didn't work (i didn't get my test email)
4 you wrote elsewhere about dsharing10.swf but the links are all dead, if i get that swf will that solve my issues?

thanks for helping me out!

Try again tomorrow, Nov. 1.

I'll make sure that the links are valid and post the link for the plugin.

Then I'll help you get it working.

Thanx!
I can't wait...

Test Page
http://willswonders.myip.org:8074/Simple_D-Sharing.html

Modified D-Sharing Plugin
http://willswonders.myip.org:8074/dsharing-10.swf

D-Sharing Plugin source Files
http://willswonders.myip.org:8074/dsharing.zip

serverside PHP mail sending script for the D-Sharing Plugin
(change extension to "php", enter yur email account details)
http://willswonders.myip.org:8074/mail_action.txt

Changes to the HTML document that you need to make:

1) file - change to your own video file or playlist.

2) plugins - change to the location of the dsharing plugin on your site.

Also, you have to enable mail sending through PHP on your server or ask your host to enable it.

@hobbs

I spent a few minutes playing with your dsharing project and have a question. I'm having an issue with my php script. All is fine as far as sending an Email BUT when I click on the link that appears in the Email pointing back to my player page the link opens and throws a couple of errors. If I click contimue threw those errors the video stutters for about 1-2 seconds and then sorts itself out and plays properly. Are you doing any communication back to the dsharing swf once the php is called? Here's a link to my test page.<strong>http://jim.playourvideo.net/vmplayerccd.htm?id=8.flv</strong> This is intended for use in sending captioned video but I just used a music video file for testing. If you use your own Email Address for both sender & recipient you'll see what's going on. Maybe you would take a minute or two and poke through my php file and see if you can spot something I left out.

Regards - Jim

@Jimb,

There is no communication back to the dsharing swf from the PHP script.

It is a one-way POST to the PHP script, which then sends the email.

The link in the email that I received is exactly the same as the link that I sent and the link opens your page and plays the video.

Original link:http://jim.playourvideo.net/vmplayerccd.htm?id=8.flv
email link:http://jim.playourvideo.net/vmplayerccd.htm?id=8.flv
If you are doing the sending, receiving, and link-clicking on the same computer, you may be experiencing some local caching issues (especially in Internet Explorer), where it takes a few seconds to find the video in the local cache.

Try receiving the email and clicking on the link on a separate computer.

@hobbs

Thanks for taking a look. You were right about it running properly from another computer but that's still a bit of an anomoly. The file is being streamed via Wowza's rtmp server so it shouldn't be cached. Is it possible that is the php file or the dsharing.swf that's being cached? Even if I clear the cache before clicking the link on the originatin computer I still get the same symptom. I'll tinker a bit more.

Jimb

It's the reloading of the page and the page's components (player, video, etc.) that is causing the glitch.

If you closed all of the browser windows, cleared the cache, then loaded up a new browser and clicked on the link, it should start up and play OK. Lots of "stuff" is also "cached" in RAM if you have any browser windows open.