You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Problems compiling and testing plugin Created Feb 4, 2010

This thread is solved

Views: 2147     Replies: 3     Last reply Feb 15, 2011  
You must login first before you can use this feature

eb_dev

Posts: 24

Registered:
Jan 29, 2010

Problems compiling and testing plugin

Posted: Feb 4, 2010

I come from a purely CS4 background and I'm completely new to Ant and the build process. I've been having a go at creating my own plugin, so far i have done the following (already downloaded core, devkit and plugins from svn):

1) Create a new folder for my plugin called carousel in my flowplayer dev directory (flowplayer.core and standard plugins alongside).

2) Duplicated the build files from the controls directory and placed them in my new plugin folder.

3) Modified the build.xml (located in carousel/example/) file to read as follows:

http://paste-it.net/public/g54759e/ (problems posting with code on forum)

4) Created the following folder structure in example/src/actionscript:

com/myco/carousel

5) Added the following as file to the com/myco/carousel directory:

Carousel.as:

http://paste-it.net/public/jd9a66b/

6) Compiled successfully using Ant:

http://paste-it.net/public/ne09a80/

7) Created example/example folder and added the following files:

- flowplayer-3.1.4.min.js
- flowplayer.carousel.swf
- flowplayer.controls.swf
- flowplayer.swf
- index.html
- style.css

index.html:

http://paste-it.net/public/v264f0a/

8) Test the page. Flowplayer runs, video / plugin do not. Log states that plugin never loads.

9) Test the page without plugin code. Video runs.

10) Create test fla file, which includes flowplayer components and has com.myco.carousel.Carousel as doc class.

11) Test run, compiles with following error:

5000: The class 'org.flowplayer.model.Plugin' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.

I'm stuck either way now and I don't know how best to test it, can someone help please :) ?

Thanks,

eb_dev

eb_dev

Posts: 24

Registered:
Jan 29, 2010

» Problems compiling and testing plugin

Posted: Feb 9, 2010

Reply to: Problems compiling and testing plugin, from eb_dev
Ok I've managed to get the flowplayer to appear now, the problem was I wasn't dispatching the onLoad event:


        public function onLoad(player:Flowplayer):void { 
            // onLoad event must be dispatched once our plugin is completely initialized, 
            // if initialization fails we need to call _model.dispatchError(PluginError.INIT_FAILED) 
            _model.dispatchOnLoad(); 
        }

My problem now is my plugin is not displaying. I've compiled as a simple swf and it displays but it's not displaying when I extend the Plugin class.

Any ideas?

Thanks,

eb_dev

eb_dev

Posts: 24

Registered:
Jan 29, 2010

Solved - Incorrect instruction in development plugin

Posted: Feb 9, 2010

Reply to: » Problems compiling and testing plugin, from eb_dev
Ok the problem with this was the Hello World example in the development plugin tutorial features faulty code, at least to use as a base for a new plugin anyway. The line:

top: "70%",  left: '50%', width: '40%', height: 50, opacity: 0.9,

in the function:


        public function getDefaultConfig():Object { 
            return { 
                top: "70%",  left: '50%', width: '40%', height: 50, opacity: 0.9, 
 
                // this time we have a support for styling properties 
                borderRadius: 20, 
                backgroundGradient: 'medium' 
            }; 
        }

I turned logging on in the flowplayer js and it was complaining about the values entered for the config. I removed the quotes and entered integer values and it fixed the problem. Is the player supposed to accept percentage values?

Thanks,

eb_dev

leadbased

Posts: 9

Registered:
Jan 24, 2011

Hello World

Posted: Feb 15, 2011

Reply to: Solved - Incorrect instruction in development plugin, from eb_dev
ed_dev, every time I use my hello world FLA and it's compiled SWF for the ant compile, nothing shows up (aka it's broke) when I use the SWF from the SVN it works fine, but I cannot make any changes... I have spent two days trying to figure out what's wrong with my workflow...I read what you have posted here and hiope it may be my issue... can you please post what you wrote for your getDefaultConfig()?

I changed it how I read from your post, but still nothing happens

Thank in advance