dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Player Controls not visible

  1. #1
    Member
    Join Date
    Oct 2002
    Posts
    56

    Player Controls not visible

    Hi FK,

    I'm new to AS3 + Flash Video and have an issue with player controls not showing. I have looked about and deduct its more than likely a path issue.

    I found this post and thought it addresses my scenario http://www.afcomponents.com/forum/viewtopic.php?t=3782

    I wanted to implement the AS but don't know how to add relative paths.

    This is the web directory I have; http://www.blabla.com/swf/

    containing files: HD-1.swf, MinimaSilverAll.swf, HD2010.f4v

    This is the code to set in frame 1, (how do integrate my files??? Also, name your instance of the FLV player to player1.) Many Thanks Paul

    //get url of loaded movie, so we can set relative path
    var skinURL:String = player1.skin;
    if (skinURL.indexOf("/",0) < 0) {
    var swfURL:String = this.loaderInfo.url;
    swfURL = swfURL.substr(0, swfURL.lastIndexOf("/") + 1);
    player1.skin = swfURL + skinURL;
    trace(player1.skin);
    }

  2. #2
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Well if it's a pathing issue, perhaps this will help:
    Pathing issues

    Almost always when it works on the local machine and not the server, it's a pathing problem.
    You can put your Flash related files in whatever folders you want, they do not have to be in the root. But if sticking them in there worked, then you know that the issue was a pathing problem.
    Just remember that paths become relative to the Web page on which those Flash files are used. So for example, if your .swf is in the flash/data folder and you use that .swf on a Web page in the root, you are in effect, removing that .swf from flash/data and putting it in root. So if the .swf is loading any related files (xml, etc), the path used inside the .swf to the .xml file has to be relative to it's new location in root and back down into flash/data. This is true even though when testing the .swf by itself, it can be inside flash/data and work just fine, since relative to it's location, the path is just fine, they are in the same folder. But if that same path is used when the .swf is placed on a page two folder levels up, the relative path has changed, the old "same folder" path will not work.
    So just be sure that you use addresses relative to the final locations and you can put the files wherever you want.
    Best wishes,
    Video Man

  3. #3
    Member
    Join Date
    Oct 2002
    Posts
    56
    Thanks Video Man, Ive got it all working correctly by placing everything in main directory. I know this is not the solution but at least I know it is all set up to work. When I go to tidy up I will revisit this issue.

    You wouldn't happen to know how to deal with this problem?

    Ive place my Flv Player in a (AJAX) Modal Popup Window but what happens when user closes window is the Player keeps playing, you can hear audio.

    I need to stop the Player somehow, any ideas!!! Many Thanks Paul

  4. #4
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    This is a common problem when the player is just made to disappear without actually shutting it of.
    Not sure how/what you are using as controls on the player itself but you need to activate the "stop" button as the first step in closing the AJAX window.
    If you are using NetStream to play the video then you would want to close the stream, something like this:
    Code:
    ns.close();
    One advantage of using this NetStream method is that closing the stream stops the downloading of the video, saving bandwidth for both you and the viewer.
    Contrast that with the Play/Stop (toggle) control button:
    Code:
    play_btn.onRelease = function() {
    	ns.pause();
    }
    This does NOT stop the downloading, it just paused the video/audio. So the entire file will continue to download, even though it has stopped playing.
    Hope you can adapt some of this to your need.
    Best wishes,
    Video Man

  5. #5
    Member
    Join Date
    Oct 2002
    Posts
    56
    Thanks VM, I am now learning to create a Netstream Conn as per gotoAndLearn, once I am using Netstream can/should I use JS function to close modal, stop stream and player.

    I suppose what im asking is can a JS function action control player, or do I need AS3 to listen for JS close button action. Thanks Again P

  6. #6
    Senior Member
    Join Date
    Sep 2010
    Posts
    324
    Guess I can't say for sure how to do this.
    Don't normally do video in a popup. But if that popup is a regular js popup, then closing the window, stops the download (it's just a html web page). Not sure about the AJAX version.
    If all else fails, just use a js popup, not the AJAX method for testing.
    Best wishes,
    Video Man

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center