riskmod
07-14-2008, 11:17 AM
On our homepage we want to put a video from onsitevideo site...
Anyways the video is done and what they gave us is:
Actioncript for embedding the flash:
So we got a code that starts like this:
thevideoid="idhere";
// BEGIN VIDEO PRE-LOADER ACTIONSCRIPT
System.security.allowDomain("http://objectservers.com"); // add this domain to your System.security.allowedDomain statement if you have others
theurl = "http://yourSWFfilesubdomain.yourSWFfiledomain.com"; // the URL of your banner SWF file, from "http" to just before the 3rd "/", for example "http://subdomain.domain.com" or "http://domain.co.uk"
mc_person = this.createEmptyMovieClip("mc_person", this.getNextHighestDepth()); // change the number to the level or next highest level where you want the video to appear
mc_person._x = 0; // set the X position of the upper left corner of the video area
mc_person._y = 0; // set the Y position of the upper left corner of the video area
scalevideo = 60; // initial percentage scale of the video (you can change this at any time during the video along with the X and Y positions to make the video appear closer and farther away)
var mc_person_mcl:MovieClipLoader = new MovieClipLoader();
getperson = function(){
// CHECK IF FLASH 8 OR OVER AND LOAD THE VIDEO
if((getVersion().split(",")[0].substr(getVersion().split(",")[0].indexOf(" ") + 1)) >= 8){
mc_person_mcl.loadClip("http://objectservers.com/bannervideo/?v="+thevideoid+"&vs="+scalevideo+"&theurl="+theurl+"&rdm="+Math.random()+"", mc_person);
}
// END FLASH VERSION CHECK AND VIDEO LOADING
}
// END VIDEO PRE-LOADER ACTIONSCRIPT
// to start a video, call getperson() from any of your functions, such as a timer, a click, or a mouse roll over
// for example
testbutton.onRelease = function() {
getperson();
}
testbutton.onRollOver = function() {
getperson();
}
// mc_person.thevideoplaytime; // current video play head time (updated every 1/20th second)
// mc_person.thevideoduration; // the video duration, set when the video is initially seen
// mc_person_onPress = function(){} // this is called when the visitor presses the mouse button while over the video
// mc_person_onRelease = function(){} // this is called when the mouse button is released while over the video
// mc_person_onRollOver = function(){} // this is called when the mouse rolls over the video
// mc_person_onRollOut = function(){} // this is called when the mouse rolls away from the video
// mc_person_onMouseMove = function(){} // this is called while the mouse is moving over the video
// mc_person_FAILED = function(err){} // this is called if the video fails or is below the required bandwidth of about 200k, err is the error message
// mc_person.thevideoVolume.setVolume(100); // 0 to 100, 0 = mute, 100 = full volume
// mc_person_seek(seekto); // specify time to seek to (seekto), you can use the video_playheadtime and video_duration variables set above if you need them
// mc_person_pause = function(); // pause the video
// mc_person_play = function(); // play the video once paused
// mc_person.closethevideo(); // close the video
alright do I have to open flash to input this action script to get an embed video? Sorry new at Flash.
Thanks!
Anyways the video is done and what they gave us is:
Actioncript for embedding the flash:
So we got a code that starts like this:
thevideoid="idhere";
// BEGIN VIDEO PRE-LOADER ACTIONSCRIPT
System.security.allowDomain("http://objectservers.com"); // add this domain to your System.security.allowedDomain statement if you have others
theurl = "http://yourSWFfilesubdomain.yourSWFfiledomain.com"; // the URL of your banner SWF file, from "http" to just before the 3rd "/", for example "http://subdomain.domain.com" or "http://domain.co.uk"
mc_person = this.createEmptyMovieClip("mc_person", this.getNextHighestDepth()); // change the number to the level or next highest level where you want the video to appear
mc_person._x = 0; // set the X position of the upper left corner of the video area
mc_person._y = 0; // set the Y position of the upper left corner of the video area
scalevideo = 60; // initial percentage scale of the video (you can change this at any time during the video along with the X and Y positions to make the video appear closer and farther away)
var mc_person_mcl:MovieClipLoader = new MovieClipLoader();
getperson = function(){
// CHECK IF FLASH 8 OR OVER AND LOAD THE VIDEO
if((getVersion().split(",")[0].substr(getVersion().split(",")[0].indexOf(" ") + 1)) >= 8){
mc_person_mcl.loadClip("http://objectservers.com/bannervideo/?v="+thevideoid+"&vs="+scalevideo+"&theurl="+theurl+"&rdm="+Math.random()+"", mc_person);
}
// END FLASH VERSION CHECK AND VIDEO LOADING
}
// END VIDEO PRE-LOADER ACTIONSCRIPT
// to start a video, call getperson() from any of your functions, such as a timer, a click, or a mouse roll over
// for example
testbutton.onRelease = function() {
getperson();
}
testbutton.onRollOver = function() {
getperson();
}
// mc_person.thevideoplaytime; // current video play head time (updated every 1/20th second)
// mc_person.thevideoduration; // the video duration, set when the video is initially seen
// mc_person_onPress = function(){} // this is called when the visitor presses the mouse button while over the video
// mc_person_onRelease = function(){} // this is called when the mouse button is released while over the video
// mc_person_onRollOver = function(){} // this is called when the mouse rolls over the video
// mc_person_onRollOut = function(){} // this is called when the mouse rolls away from the video
// mc_person_onMouseMove = function(){} // this is called while the mouse is moving over the video
// mc_person_FAILED = function(err){} // this is called if the video fails or is below the required bandwidth of about 200k, err is the error message
// mc_person.thevideoVolume.setVolume(100); // 0 to 100, 0 = mute, 100 = full volume
// mc_person_seek(seekto); // specify time to seek to (seekto), you can use the video_playheadtime and video_duration variables set above if you need them
// mc_person_pause = function(); // pause the video
// mc_person_play = function(); // play the video once paused
// mc_person.closethevideo(); // close the video
alright do I have to open flash to input this action script to get an embed video? Sorry new at Flash.
Thanks!