A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: [v7] More Media Player Stuff

  1. #1
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217

    [v7] More Media Player Stuff

    Is there a way to have the playlist start visible and have playlist select close work in the players skin for Flash 9? I can get it to select-close by calling it up as an event (playlist.visible = false; ) but with playlist.visible = true, the playlist stays open on select. The old code (plSelClose=true; ) doesn't seem to work any more.

    And I just noticed putting some code in brackets gives you winking smiley faces.
    (playlist.visible = false
    Last edited by bobgodwin; 02-14-2009 at 05:43 PM.
    Bob Godwin

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Take a look at the as3 version of the iBlack skin (events.as file and the last line from the setup.as file). I think this is what you are looking for.

  3. #3
    That web bloke Stoke Laurie's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    869
    Bob if you want to do code
    Wrap it in the icon to the right of the picture icon. Then the faces don't appear.

  4. #4
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    Take a look at the as3 version of the iBlack skin (events.as file and the last line from the setup.as file). I think this is what you are looking for.
    That's the same code I used, but the playlist isn't visible when the player opens. You have to use the playlist button.

    I have lots questions about the skins. One is user colors. I set the user colors for my image files like this:
    Code:
    btnPlay.setSkin('buttonplay_png');
    btnPlay.duotone = [c[1],0;
    My png files are black, so I'm thinking the first variable, [c[1], is for black & since there is no white, the second variable is set to 0. It works, but I'm not sure if that's how you're supposed to do it.

    I also have questions on how to set up user buttons, drag images for the playlist that don't expand or contract with the number of items in the list, and more I'm sure. But I have converted four of my old skins into flash9 skins. They work, I just want to make sure they're code right.
    Last edited by bobgodwin; 02-16-2009 at 06:34 PM.
    Bob Godwin

  5. #5
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    You should be able to start with a visible playlist if you put
    Code:
    playlist.visible = true;
    in the setup code.

    If your png files are entirely black, you are using the duotone property in the right way. The second value can be 0 in that case.

    User buttons shouldn't be a problem, they can simply be added using addChild.

    As for the drag image for the playlist, that's another story. The AS3 media player uses a normal list component to display the playlist. The drag image of the list scrollbar expanding or contracting based on the amount of list items is normal behaviour. Getting the Flash 8 behaviour should be possible but is complicated. You would have to hide the list scrollbar, add a MediaPlayerSlider component and connect the two.

    If you are not sure about what you have done, you can mail me your skin directory so I can have a look at it.

  6. #6
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    If I use playlist.visible in the set up as an event, it no longer closes on select. I've tried various combination's of set-up and events, but can't get it to work the way it used to in flash 8. For the flash 8 players, you could do both with is code:
    Code:
    plSelClose=true;
    setListVisibility(true);
    I like the way the playlist behaves in flash 8, seems more user friendly.

    As for the drag handle, except for the HiVis players on the exchange, it's not a big deal really. With the others, I like the way they work. Easier to set up too. Seemed to have more appearance options in 8 though. I think I have my upgraded skins right. The TV know has a rotary knob now. I like that, more realistic. I'll email what skins I have so far so you can check the out before I put them on the exchange.
    Last edited by bobgodwin; 02-17-2009 at 07:30 PM.
    Bob Godwin

  7. #7
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    The playlist.visible = true; code sould be in the setup.as file, not inside an event function.

    As for putting them on KoolExchange, maybe it would be good to leave your current AS1 skins also there and post the AS3 versions in the AS3 component skins category instead of replacing the old ones so users who use AS1 can still use them. In case you put them in the AS3 component skins category, please mention it's a MediaPlayer skin since it's possible skins for other component types will also be submitted in the future.
    Last edited by w.brants; 02-18-2009 at 03:07 AM.

  8. #8
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    The playlist.visible = true; code sould be in the setup.as file, not inside an event function.
    I tried that, and as an event, but the playlist doesn't close when you choose an item.

    As for the AS3 skins, I'll add the new ones soon. I'll let you look at them first (Just sent what I have so far to you). I've upgraded most of the other AS1 media skins, so I'll have you delete the old so I can replace them.
    Bob Godwin

  9. #9
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Quote Originally Posted by bobgodwin
    I've upgraded most of the other AS1 media skins, so I'll have you delete the old so I can replace them.
    I hope the old ones remain for users of earlier KM versions. The repository should function this way IMO. I see no reason why both cannot exist and the exchange was never meant to support what you are asking (not to mention it would start a trend that creates more work for Wilbert with no good reason). No file repository supports this that I know of or have submitted to in my years (not even Flashkits repository here which is years old). Once a file is submitted...it's submitted and a done deal.

    I like both your old and new ones Bob and am quietly hoping you simply submit the new to be added to the old. My two cents...take with a grain of salt

  10. #10
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    I hope the old ones remain for users of earlier KM versions.
    They will. I'll put the new ones under AS3 component skins.
    Bob Godwin

  11. #11

  12. #12
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    Chris, thanks for the setExternalPlaylist example at the km-codex site site! I'm making an amp with your name on it.
    Bob Godwin

  13. #13

  14. #14
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    I'll make one for him too! Actually, I'm thinking of adding a Photoshop file to the download so people can add there own logo.
    Bob Godwin

  15. #15
    That web bloke Stoke Laurie's Avatar
    Join Date
    Jan 2006
    Location
    England
    Posts
    869
    Oh, Oh, then I can have one too, was too shy to ask!!!! top bloke bob.

  16. #16
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    Of course Stoke. I'm still working on an AS3 version. But I can do an AS1 version for ya'll.
    Bob Godwin

  17. #17
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    Wondered what the AS3 code is for calling up the playlist from the html. The old code:
    Code:
    myXML = new XML();
    myXML.ignoreWhite = true;
    myXML.onLoad = function(){
      items = new Array();
      c0 = this.childNodes[0];
      if(c0.nodeName == 'media'){
        for (var i=0;i < c0.childNodes.length;i++){
          items.push({'label': c0.childNodes[i].attributes.title, 'value': c0.childNodes[i].attributes.path});
        }
      }
      mediaplayer1.setVolume( initVol );
      if (firstTrack > 1) firstTrack--;
      mediaplayer1.setPlaylist ( items, firstTrack, true );
      mediaplayer1.plSelClose=true;
      mediaplayer1.setListVisibility(false);
    }
    myXML.load( playList );
    stop();
    
    With this in the export settings:
    
    playList=http://www.howardglazer.com/videoPlaylist.xml&ShowPlaylist=1&firstTrack=0&initVol=70
    Doesn't seem to work any more.

    Is there a way to load the playlist as a variable in the export settings anymore?
    Bob Godwin

  18. #18
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    I'm not sure what you are trying to do Bob.
    If you want to load an external playlist, you can use the AS3 function
    mediaPlayer.setExternalXMLPlaylist

    If you want to pass a variable from html to flash and use that, that is also possible but you have to access it in a different way compared to AS1.

  19. #19
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    If you want to pass a variable from html to flash and use that, that is also possible but you have to access it in a different way compared to AS1.
    That's what I' trying to do. I've tried " loaderInfo.parameters.playlistXML;

    var xmlLoader:URLLoader = new URLLoader();
    var playlistURL:URLRequest = new URLRequest(playlistXML);
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    xmlLoader.load(playlistURL);

    function xmlLoaded(evt:Event):void {
    playlistXML = XML(xmlLoader.data);
    }
    }


    mp.setExternalXMLPlaylist(new URLRequest(playlist));

    stop() "

    and various other tries, but I'm guessin' I'm not even close. I would think you could send the variable to the " setExternalXMLPlaylist(new URLRequest(variable)); ", but haven't figured it out yet.
    Bob Godwin

  20. #20
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    This should work
    Code:
    mp.setExternalXMLPlaylist(new URLRequest(loaderInfo.parameters.playlistXML));
    I don't understand why it doesn't work for you.

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