Thank you for the reply.  I see what you are saying, but where I get stuck
is what do I do to get my xml parser to tell the video player which video is
next.

On Mon, Dec 22, 2008 at 1:19 AM, amit shrestha <[email protected]> wrote:

> do _player...autoRewind = false; ...just listen for the
> VideoEvent.COMPLETE, and on that event just change the video source[ur xml
> parser will provide that] and again call play()
>
>
> On Mon, Dec 22, 2008 at 5:16 AM, [email protected] <[email protected]>wrote:
>
>>
>> Hello all,
>>
>> I currently have a FLVPLayback component inside my flex project that's
>> getting it's source from a tree control.  The tree control's data
>> provider is provided by a XML file in e4x.  Everything works great and
>> I can select nodes from the tree and the video player responds
>> appropriately.  I have several depths of nesting inside my XML file.
>>
>> The problem I'm having is getting the videos to loop continuously.
>> I'm afraid this may be above my skill level as I've been trying for
>> the past 2 days to figure out a solution but to no avail.  When one
>> video finishes, I want the next video specified in the next node to
>> begin playing and so on...
>>
>> Any help is greatly appreciate, here is my code:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
>> xmlns:video="fl.video.*" backgroundGradientAlphas="[1.0, 1.0]"
>> backgroundGradientColors="[#FFFFFF, #FFFFFF]" paddingTop="2"
>> applicationComplete="init();" layout="horizontal">
>>
>>        <mx:Script>
>>                <![CDATA[
>>                        import mx.controls.Text;
>>                        import mx.events.VideoEvent;
>>                        import mx.events.ListEvent;
>>                        import mx.collections.XMLListCollection;
>>                        import mx.rpc.events.ResultEvent;
>>                        import mx.core.IUIComponent;
>>
>>                        [Bindable]
>>                        private var xLocations:XMLList;
>>                        [Bindable]
>>                        private var xPhoto:XML;
>>
>>                        [Bindable]
>>            [Embed(source="data/headshot-alon.png")]
>>            public var headshotAlon:Class;
>>                        [Bindable]
>>            [Embed(source="data/headshot-andy.png")]
>>            public var headshotAndy:Class;
>>                        [Bindable]
>>            [Embed(source="data/headshot-coni.png")]
>>            public var headshotConi:Class;
>>                        [Bindable]
>>            [Embed(source="data/headshot-amy.png")]
>>            public var headshotAmy:Class;
>>            [Bindable]
>>            [Embed(source="data/folder.png")]
>>            private var folderClosed:Class;
>>            [Bindable]
>>            [Embed(source="data/folder_open.png")]
>>            private var folderOpen:Class;
>>
>>                        private function init():void
>>                        {
>>                                xmlService.send();
>>                                videoHolder.addChild(flvPlayback);
>>                        }
>>
>>                        private function
>> resultHandler(event:ResultEvent):void
>>                        {
>>                                xLocations = event.result.person;
>>
>>  locationTree.setItemIcon(locationTree.dataProvider.getItemAt(0),
>> headshotAmy, null);
>>
>>  locationTree.setItemIcon(locationTree.dataProvider.getItemAt(1),
>> headshotAndy, null);
>>
>>  locationTree.setItemIcon(locationTree.dataProvider.getItemAt(2),
>> headshotConi, null);
>>
>>  locationTree.setItemIcon(locationTree.dataProvider.getItemAt(3),
>> headshotAlon, null);
>>                        }
>>
>>                        private function
>> changeHandler(event:ListEvent):void
>>                        {
>>                                var selectedXML:XML =
>> event.target.selectedItem as XML;
>>
>>                                if (selectedXML.name() == "video")
>>                                {
>>                                        xPhoto = selectedXML;
>>
>>                                }
>>
>>                        }
>>
>>                        private function clickHandler():void
>>                        {
>>                                if
>> (locationTree.isItemOpen(locationTree.selectedItem))
>>                                {
>>
>>  locationTree.expandItem(locationTree.selectedItem, false, true);
>>                                }
>>                                else
>>                                {
>>
>>  locationTree.expandItem(locationTree.selectedItem, true, true);
>>                                }
>>                        }
>>
>>                        private function nextFLV(e:Event):void
>>                        {
>>
>>                        }
>>                ]]>
>>        </mx:Script>
>>
>>        <mx:HTTPService id="xmlService" url="data/slideshow.xml"
>> result="resultHandler(event)" resultFormat="e4x"/>
>>
>>        <video:FLVPlayback id="flvPlayback" source="data/{xpho...@source}"
>> width="375" height="225" scaleMode="maintainAspectRatio" skin="data/
>> SkinUnderPlayStopSeekMuteVol.swf" skinAutoHide="false"
>> complete="nextFLV(event)"/>
>>
>>        <mx:Panel width="700" height="425" borderStyle="solid"
>> backgroundColor="#CCCCCC" cornerRadius="10" alpha="1.0" paddingTop="0"
>> roundedBottomCorners="true" layout="horizontal" headerHeight="5">
>>                <mx:Panel width="400" height="100%" y="0" right="253"
>> layout="absolute" horizontalAlign="center" verticalAlign="top"
>> status="{xpho...@label}" borderColor="#FFFFFF" cornerRadius="10"
>> roundedBottomCorners="true" backgroundColor="#464646"
>> borderStyle="solid" borderThickness="2" paddingBottom="0"
>> paddingLeft="0" paddingRight="0" paddingTop="0">
>>                        <mx:Panel title="{xpho...@title}" width="100%"
>> height="100%"
>> color="white" paddingTop="0" backgroundColor="#464646"
>> borderColor="#464646" borderStyle="none" layout="horizontal" x="0"
>> y="287" headerHeight="10" fontSize="16">
>>                                <mx:TextArea text="{xpho...@description}"
>> width="100%"
>> height="100%" backgroundColor="#464646" borderStyle="none"
>> fontSize="12" themeColor="#464646" editable="false"/>
>>                        </mx:Panel>
>>                        <mx:UIComponent id="videoHolder" width="375"
>> height="225" x="1"
>> y="6" themeColor="#464646"/>
>>                </mx:Panel>
>>                <mx:Panel height="100%" width="100%" borderStyle="solid"
>> backgroundColor="#464646" cornerRadius="10" paddingTop="0"
>> roundedBottomCorners="true" layout="horizontal" borderColor="#FFFFFF"
>> borderThickness="2" headerHeight="32">
>>                        <mx:Tree id="locationTree"
>> dataProvider="{xLocations}" width="100%"
>> minHeight="350" variableRowHeight="true" labelField="@label"
>> fontFamily="Arial" fontSize="10" doubleClickEnabled="true"
>> itemDoubleClick="clickHandler()" change="changeHandler(event)"
>> cornerRadius="0" borderStyle="none" borderColor="#FFFFFF"
>> showRoot="false" dragEnabled="true" dropEnabled="true"
>> dragMoveEnabled="true" wordWrap="true"
>> folderClosedIcon="{folderClosed}" folderOpenIcon="{folderOpen}"
>> verticalScrollPolicy="on" openDuration="0"/>
>>                </mx:Panel>
>>        </mx:Panel>
>>
>> </mx:Application>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to