FORUMS: list search recent posts

how to play video via the netStream when i populate my listbox using tree component.

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
how to play video via the netStream when i populate my listbox using tree component.
on Nov 25, 2005 at 9:40:55 am

Hi, stick with me with this as i try to explain the problem i am facing.

I have to create a listbox to populate my FLV topics. Thus i uses the tree component as there are main topics and sub topics. Thus i follow the scripts given from the flash help document to populate them. I manage to get my tree listbox done. The problem is , the scripts use to done up my tree listbox is in a .as files. Here is the code:

//==========code written in .as file=============//
import mx.controls.Tree;

class TreeNavMenu extends MovieClip { Tree component and acessing object class functionality
var menuTree:Tree;
var menuXML:XML;
var ns:NetStream;//
function TreeNavMenu(){
// set up the appearance of the list box Tree

//load the external .xml
var treeNavMenu = this;
menuXML = new XML();
menuXML.ignoreWhite = true;
menuXML.onLoad = function(){

// create your collapse
function change(event:Object) {
if (menuTree == {
var node = menuTree.selectedItem;
if (menuTree.getIsBranch(node)) {
var urlVideo = node.attributes.url;
if (urlVideo) {; //===========code not working==


function onMenuLoaded() {
menuTree.dataProvider = menuXML.firstChild;

And the rest of the code are written in the action panel. Here is the code:

var nc:NetConnection = new NetConnection();
nc.connect(null); //not connecting to flash communication server
var ns:NetStream = new NetStream(nc);

theVideo.attachVideo(ns); //======play according to my tree listbox selection.===/

volumebar.scrollbar.onPress = function(){
volumebar.scrollbar.onRelease = volumebar.scrollbar.onReleaseOutside = function(){

Thus, how am i going to connect both of the script so that once select on the tree listbox, it will play the selected one?

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved