<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:controls="com.renaun.controls.*"
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    backgroundImage=""
    backgroundColor="#EEEEEE"
    width="100%" height="100%"
    layout="absolute" viewSourceURL="repeatingimage/index.html">

    <mx:Script>
        <![CDATA[
            private function changeImageBackground():void
            {
                imgRepeat.source = (imgRepeat.source == 'assets/arrowBlueUp.png' ) ? 'assets/wood.jpg' : 'assets/arrowBlueUp.png';
                imgRepeat2.source = (imgRepeat.source == 'assets/wood.jpg' ) ? 'assets/arrowBlueUp.png' : 'assets/wood.jpg';
            }
        ]]>
    </mx:Script>

    <controls:RepeatingImage 
        id="imgRepeat2" 
        source="assets/wood.jpg"
        width="100%"
        height="100%"
        repeatX="false" repeatY="true" />
    
    <controls:RepeatingImage 
        id="imgRepeat" 
        source="assets/arrowBlueUp.png"
        right="100" 
        left="100"
        bottom="100"
        top="100" 
        repeatX="true" repeatY="true" />

    
    <mx:Button
        id="btnChange"
        label="Change Image Background"
        click="changeImageBackground()" />
    
</mx:Application>