Hey Ali

have you tried setting your scale and align properties on the stage? If you
want to have a 100% x 100% flash window in teh browser, your best setting is
to tpe something like:

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

does that solve the problem?

Rob



On Sat, May 15, 2010 at 1:46 PM, Ali <[email protected]> wrote:

> Thanks for your help toshmosh. But it does't work still I got this 4:3
> screen
>
> http://www.riyasatali.com/images/error.jpg
>
> here is the jpg what i m getting in result.
>
> Is there any thing I am missing ?
>
> On May 15, 1:36 pm, toshmosh <[email protected]> wrote:
> > import import flash.system.*;
> >
> > then type  Capabilities.screenResolutionX and this will give you the
> > screen res x
> > for Y is Capabilities.screenResolutionY.
> >
> > Hope it helps:)
> >
> > On 15 Май, 02:41, Ali <[email protected]> wrote:
> >
> >
> >
> > > Hi,
> >
> > > I am trying to make one background that can fill the complete view
> > > port but when it starts rendering it only display 4:3 ratio screen not
> > > 16:9. I want to make bg adjust automatically according to the users
> > > screen resolution. Here is a code I am trying to work with
> >
> > > //
> > >
> ***************************************************************************
> ******//
> > > package
> > > {
> > >         import away3d.cameras.HoverCamera3D;
> > >         import away3d.containers.View3D;
> > >         import away3d.materials.TransformBitmapMaterial;
> > >         import away3d.primitives.Plane;
> > >         import away3d.primitives.Sphere;
> >
> > >         import flash.display.Bitmap;
> > >         import flash.display.Sprite;
> > >         import flash.events.Event;
> >
> > >         [SWF( backgroundColor="#0a0a0a")]
> >
> > >         public class bgtry extends Sprite
> > >         {
> > >                 [Embed("../assets/bg.jpg")]
> > >                 private var bg:Class;
> >
> > >                 private var bgPlane:Plane;
> > >                 private var cam:HoverCamera3D=new HoverCamera3D();
> > >                 private var sphr:Sphere;
> > >                 private var view:View3D;
> >
> > >                 private var bmpMat:Bitmap=new bg() as Bitmap;
> > >                 private var stMat:TransformBitmapMaterial=new
> > > TransformBitmapMaterial(bmpMat.bitmapData,{scaleX:1,scaleY:1});
> > >                 public function bgtry()
> > >                 {
> >
> > >                         init();
> > >                 }
> > >                 private function init():void{
> > >                         view = new View3D();
> > >                         view.x=stage.stageWidth/2;
> > >                         view.y=stage.stageHeight/2;
> >
> > >                         bgPlane=new Plane({material:"orange#black"});
> > >                         bgPlane.width=stage.stageWidth*2;
> > >                         bgPlane.height=stage.stageWidth*0.5;
> >
> > >                         bgPlane.material=stMat;
> > >                         bgPlane.segmentsH=5;
> > >                         bgPlane.segmentsW=5;
> >
> > >                         this.addChild(view);
> >
> > >                         view.scene.addChild(bgPlane);
> > >                         view.camera=cam;
> > > //                      cam.zoom=10;
> > >
> this.addEventListener(Event.ENTER_FRAME,entFrm);
> > >                         view.render();
> > >                 }
> > >                 private function entFrm(e:Event):void{
> > >                         //bgPlane.x-=0.5;
> > >                         view.render();
> > >                 }
> > >         }
> >
> > > }
> >
> > > //***********************************************************//
> >
> > > I am a beginner please help me how to solve this issue. Thanks in
> > > advance
>



-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to