English 中文(简体)
在Papervision3D应用程序中使用Flex组件
原标题:
  • 时间:2009-02-03 18:34:02
  •  标签:

I am in the process of designing a 3D panorama viewer using papervision3d for the 3D library. I am coding entirely in ActionScript3 using FlashDevelop. I am at the point now where I need to add simple components (button, dropdown menu, toolbar, etc.) I know that using mxml it is easy to create UIs. Does anyone have any experience with creating UIs in mxml and then using them within a papervision3d object? Basically, I want to put a button specified by an mxml file in the middle of my panorama and I have no idea how to do this. Thanks for any help.

最佳回答

我正在做非常相似的事情:我一直在使用Papervision3D开发 3D 全景查看器,并添加了Flex控件作为界面。(您可以查看现有查看器的状态http://www.panocast.com)。

我在这里做的事情恰恰与您的请求相反:我将Papervision3D视图包装在UI组件中,并将其放置在MXML文件中。 通过将其放入一个Canvas中,我可以将控件放在其上方。 就是这样:

<mx:Canvas width="100%" height="100%">
    <!-- the main panoarama player object -->
    <pp:PanoViewer id="pv" width="100%" height="100%" />

    <!-- horizontal control bar -->
    <mx:HBox id="controls" bottom="10" left="10" right="10">
        <!-- rewind & play/pause buttons -->
        <mx:ButtonBar id="playbackButtons" buttonWidth="26">
            <mx:dataProvider>
                <mx:Array>
                    <mx:Object icon="@Embed(source= ../../../../assets/rewind.png )" toolTip="Rewind video" name="rewind" />
                    <mx:Object icon="{playIcon}" toolTip="Play video (space)" name="play" />
                </mx:Array>
            </mx:dataProvider>
        </mx:ButtonBar>
    ... 

等等。

问题回答

暂无回答




相关问题
热门标签