www.webdeveloper.com
Results 1 to 9 of 9

Thread: embed actionscript video?

  1. #1
    Join Date
    Oct 2006
    Posts
    203

    embed actionscript video?

    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:

    Code:
    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!

  2. #2
    Join Date
    May 2004
    Location
    FL
    Posts
    3,453
    Please don't cross post. The other thread has been removed.

  3. #3
    Join Date
    Oct 2006
    Posts
    203
    I needed to know which forum would be ideal for this post.......thanks

  4. #4
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Well if you want to use all that ActionScript, yes you will have to open Flash. But just looking at the code, seems to me that it may not be all that simple. Have you created a player or banner and the buttons mentioned in the code? There are also a lot of empty functions, there in name but no code to support them.
    Are you trying to put an actual video (Flash .flv) on the page or just an animated banner (Flash .swf)? In either case, once the Flash .swf file is created, you will still need to place the <object> and <embed> it into the HTML page. Seems like a really long way to go if your goal is to simply place an animation on the page. If it is a video, the .swf will play it but then the control buttons and functions all need to be tied to it with instance and movie clip names, etc.
    From what I see, there must be more to itů.
    Eye for Video
    www.cidigitalmedia.com

  5. #5
    Join Date
    Oct 2006
    Posts
    203
    All I'm trying to do is auto play a video object that is hosted by them for our site:

    They said:

    Please copy the following code and paste it into the HTML on the page where it is to auto play.

    Code:
    <script type='text/javascript' language='javascript' src='http://objectservers.com/play/#idhere#'></script>
    So if I do that nothing happens. I know I have to implement more.

    Thanks

  6. #6
    Join Date
    Jul 2008
    Posts
    1
    Please contact your vendor. They (me) offer free implementation assistance and can have you live right away.

  7. #7
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Since all you are trying to do is post a video on your site, seems that the people you should be talking with is the host. They are a commercial company and should be eager to help their clients. If not, maybe you should look elsewhere next time.
    The first set of code you posted was for a Flash video player, not something you should have to deal with if all you want was one video. The second set of code seems woefully missing a lot of information.
    For example, here is the code you would get from YouTube if you wanted to embed one of their videos.
    Code:
    <object width="425" height="344">
    	<param name="movie" value="http://www.youtube.com/v/oohet-cZz0o&hl=en&fs=1"></param>
    	<param name="allowFullScreen" value="true"></param>
    	<embed src="http://www.youtube.com/v/oohet-cZz0o&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed>
    </object>
    Talk to them again, you are missing something.
    Good luck,
    Eye for Video
    www.cidigitalmedia.com

  8. #8
    Join Date
    Oct 2006
    Posts
    203
    Quote Originally Posted by vGlobal
    Please contact your vendor. They (me) offer free implementation assistance and can have you live right away.
    Yeah I did and they only give you an email and no response yet....

  9. #9
    Join Date
    Oct 2006
    Posts
    203
    Eye for Video thank you for your help yeah I'm trying to get in touch but those people are a pain (onsitevideos.com).

    Check their site and they have it working!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles