Hi John,

I've just been dabbling in the same sort of thing, but basically just using
bitmapfill, it's very simple, check this out:
http://www.innerdrivestudios.com/blog/articles/actionscript-3/gfx-actionscript-3-articles/wrapping-bitmapdata-in-actionscript-3

And an application of the principle:
http://www.innerdrivestudios.com/blog/articles/actionscript-3/gfx-actionscript-3-articles/flag-effect-in-actionscript-3

Click and the flag and the clouds will start moving using the technique
described in the first post.

HTH
JC

On Mon, Apr 26, 2010 at 4:02 PM, John Singleton
<johnsingleton...@yahoo.com>wrote:

> Hi;
> I would like to have a background image of clouds loop infinitely.Here's my
> code:
>
>        function BigPic():void
>        {
>            parent_container2 = new MovieClip();
>            var square:Sprite = new Sprite();
>            parent_container2.mask = square;
>            addChild(square);
>            square.graphics.lineStyle(3,0x065566);
>            square.graphics.beginFill(0xffffff);
>
> square.graphics.drawRoundRect(22, 22, 966, 146, 20);
>
> square.graphics.endFill();
>            addChild(parent_container2)
>            var path:String = "images/clouds.png";
>            var
> req:URLRequest = new URLRequest(path);
>            var loader:Loader = new Loader();
>            loader.load(req);
>
> loader.addEventListener(IOErrorEvent.IO_ERROR,
> function(e:IOErrorEvent):void{ trace(e) });
>
> loader.contentLoaderInfo.addEventListener(Event.COMPLETE, BigPicLoaded);
>        }
>
>        function BigPicLoaded(evt:Event):void
>        {
>            var
> loaderInfo:LoaderInfo = evt.target as LoaderInfo;
>            var
> displayObject:DisplayObject = loaderInfo.content;
>
> displayObject.width = 2000;
>            displayObject.height = 150;
>            displayObject.x = 20;
>            displayObject.y = 20;
>            parent_container2.addChild(displayObject);
> //
> TweenLite.to(parent_container2, 50, {x:-1000});
>
> cloudTween.addEventListener(TweenEvent.MOTION_FINISH, restartAnimation);
>        }
>
>        function restartAnimation(oEvent:Event):void
>        {
>            cloudTween.start();
>        }
>
> But it ain't working. Ideas?
> TIA,
> John
>
>
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to