- Player track and throw out position.
- Click to content send position that's the track will be jump.
ADPlayer Embed Example
Include the ADPlayer JavaScript library in the head of your HTML page<html>
<head>
<title>ADPlayer dynamic embed</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{
font-family:Tahoma;
font-size:12px;
color:#484848;
}
a.transcriptLink {
outline: none;
text-decoration: none;
color:#484848;
}
a.transcriptLink:hover, a.transcriptLink:active {
outline: none;
text-decoration: none;
background: #d2d1d0;
}
</style>
<script type="text/javascript" src="adplayer.js"></script>
</head>
<body>
<div id="yourembedflash"></div>
<div id="sourcedata" style="overflow: auto;" class="transcript">
<p>
<a href="0" class="transcriptLink">I am a writer.</a>
<a href="2000" class = "transcriptLink">Writing books is my profession... </a>
</p>
</div>
<script type="text/javascript">
// [0] create here
</script>
</body>
</html>
Embed your SWF with JavaScript
Example:
try{
var ebonc = new ADPlayer();
ebonc.id = 'flashid';
ebonc.swf = 'flash.swf';
ebonc.divid = 'yourembedflash';
ebonc.handler = 'ebonc';
ebonc.base = 'sourcedata';
ebonc.variable.src = 'trackfile.mp3';
ebonc.variable.title = "Artists - Titles";
ebonc.variable.overhand = true;
ebonc.variable.reading = true;
ebonc.variable.rightclick=true;
ebonc.install(true);
}catch(ex){
}
ADPlayer JavaScript API
Parameters and Variablesvar ebonc= new ADPlayer() // ebonc is the name I created as form
ebonc.id
ebonc.swf
ebonc.divid
ebonc.handler
ebonc.base
ebonc.variable.id
ebonc.variable.src
ebonc.variable.title
ebonc.variable.crossdomain
ebonc.variable.insecure
ebonc.variable.policy
ebonc.variable.playerid
ebonc.variable.handler
ebonc.variable.rightclick
ebonc.variable.autostart
ebonc.variable.animation
ebonc.variable.minisize
ebonc.variable.overhand
ebonc.variable.reading
ebonc.variable.version
ebonc.variable.volume
Detail
- ebonc.id
Define the id for flash embed, this is required! - ebonc.swf
Link flash file
Example: http://yoursite.com/adplayer.swf
or
/abc/adplayer.swf - ebonc.divid
Where you want to embed flash file.
Example: ebonc.divid="divembedid";
<div id="divembedid">
<embed id="flashid" />
</div> - ebonc.handler
This is the variable of ADPlayer or Player that you have declared
Example:
var ebonc= new ADPlayer(); //or new Player();
ebonc.handler = "ebonc";
var newaudio= new ADPlayer(); //or new Player();
newaudio.handler = "newaudio";
... - ebonc.base ID, Area or location where the text contains that is the handler will be get data for flash.
the data is essentially the links ,within it have ID , each ID is a sound position.
Example:
<div id="datasource">
<a id="0">I</a><a id="100">love</a><a id="200">my friends</a>
</div>
so
ebonc.base = "datasource"; - ebonc.variable.id
This you can ignore , ignore that is not declared this variable - ebonc.variable.src Link audio file
Example: http://yourhot.com/hello.mp3
or
/abc/hello.mp3 - ebonc.variable.title
Title's audio. May be include titles and articles
Example:
Title here: Elizabeth Gilber... - ebonc.variable.crossdomain
Default (*)
On flash as flash.system.security.allowDomain('*')
You can custom it as the case may be, about development, I'm sure you know. - ebonc.variable.insecure
Default (*)
On flash as flash.system.security.allowInsecureDomain('*') - ebonc.variable.policy
Default empty ''
On flash as flash.system.Security.loadPolicyFile(''); - ebonc.variable.playerid
Default 192.168.1.1 That is id separate the configure of the sound. - ebonc.variable.handler
You don't need to define, default: ebonc.variable.handler = ebonc.handler = "ebonc"; - ebonc.variable.rightclick
true or false, When you use the right mouse and click on the process bar, immediate position of the track will be placed in the position where the mouse click, Note: if you don't want to use the right mouse the does not need to declare, default is false. - ebonc.variable.autostart
true or false, auto play if true, default is false. - ebonc.variable.animation
true or false, default is false.open state 
close state - ebonc.variable.minisize
true or false, default is false.In the case the "minisize" is the true state, then the "animation" is not meaningful.

close state open state - ebonc.variable.overhand
true or false, default is false.
A feature allows the sound to the position of the corresponding content and to the contrary.
When you click on the content , the track will jump to the position of the content on the process bar, When you click on the process bar, the content is highlighted will jump to the position and continue play. - ebonc.variable.reading
true or false, default is false.
The process of the sound is move, the content is highlighted, and if you set false, it'll not highlight content. - ebonc.variable.version
true or false, when you right click on the Flash you'll see develop version, in case you don't like , you can hide it.
if true is show else hide. - ebonc.variable.volume
Variable is the value of Number, Float [0-1], default: 0.6
API function
var ebonc= new ADPlayer() // Or new Player()
// parameters...
// variables ...
ebonc.install() //
ebonc.process() //
ebonc.change() //
Detail
Coming soon!
0 comments:
Post a Comment