小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

flex gumbo实例:重复填充BitmapGraphic对象

你首先需要学会在FLEX BUILDER3中编写,编译gumbo的方法: 这里有教程:http://www.cnblogs.com/xxcainiao/archive/2008/11/24/1339865.html

gumbo教程--BitmapGraphic对象

代码:

 

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/12/13/repeating-the-fill-on-a-bitmapgraphic-object-in-flex-gumbo/ -->
<Application name="BitmapGraphic_repeat_test"
        xmlns
="http://ns.adobe.com/mxml/2009"
        layout
="vertical"
        verticalAlign
="middle"
        backgroundColor
="white">

    
<ApplicationControlBar dock="true">
        
<Form styleName="plain">
            
<FormItem label="repeat:">
                
<CheckBox id="checkBox" />
            
</FormItem>
            
<FormItem label="width:">
                
<HSlider id="widthSlider"
                        minimum
="100"
                        maximum
="500"
                        value
="300"
                        snapInterval
="1"
                        tickInterval
="50"
                        liveDragging
="true" />
            
</FormItem>
            
<FormItem label="height:">
                
<HSlider id="heightSlider"
                        minimum
="100"
                        maximum
="300"
                        value
="200"
                        snapInterval
="1"
                        tickInterval
="50"
                        liveDragging
="true" />
            
</FormItem>
        
</Form>
    
</ApplicationControlBar>

    
<Graphic>
        
<BitmapGraphic id="bitmapGr"
                source
="@Embed('assets/fx_appicon-tn.gif')"
                repeat
="{checkBox.selected}"
                width
="{widthSlider.value}"
                height
="{heightSlider.value}" />
    
</Graphic>

</Application>

 

 

原文:http://blog.flexexamples.com/2008/12/13/repeating-the-fill-on-a-bitmapgraphic-object-in-flex-gumbo/

实例提供:小小菜鸟的web菜园子http://xxcainiao.cnblogs.com/

posted on 2008-12-24 15:24  『小小菜鸟』  阅读(672)  评论(0编辑  收藏  举报