Hi fabrice,
im really sorry but i try what you say, and i get the result i
except...the movieMaterial are tilled...
here is my code:
var topMatClip = new Rectangle(0,0,1182,525)
var bottomMatClip = new Rectangle(0,525,1182,1050)
var rainningMatTop:MovieMaterial = new MovieMaterial(rainningPlan,
{smooth:true,precision:2,lockH:525,clipRect:topMatClip});
var rainningMatBottom:MovieMaterial = new MovieMaterial(rainningPlan,
{smooth:true,precision:2,lockH:525,clipRect:bottomMatClip,offsetY:
525});
var topPlane = new
Plane({material:summerMatTop,back:rainningMatBottom,bothsides:true,width:
1182,height:525,segmentsW:3,segmentsH:3});
var bottomPlane = new
Plane({material:summerMatBottomBack,back:summerMatBottom,bothsides:true,width:
1182,height:525,segmentsW:3,segmentsH:3});
wahts wrong with this ?
thanks you very much
On 24 avr, 14:59, Fabrice3D <[email protected]> wrote:
> MovieMaterial has LockH and W and a clipRect. Both planes with
> 500,500 locks. On clip rect with 0,500 on H, the other 500,1000. Set
> on second material offsetY to .5.
> So you have two materials using same mc but clipping is different.
>
> Note that cliprect defines the region that will be updated.
>
> Fabrice
>
> On Apr 24, 2010, at 10:00, Colir <[email protected]> wrote:
>
> > so the only solution i found is this one:
>
> > context :
> > i have 2 plane and one texture as MovieMaterial to use on it. i want
> > to split my texture.
>
> > my planes is 500px height and my Movie material is 1000px height.
> > I want my bottom texture to be 180° flipped
>
> > here is my code for the texture :
>
> > var summerMatTop:MovieMaterial = new MovieMaterial(summerPlan,
> > {smooth:true,precision:2,lockH:747});
> > var summerMatBottom:MovieMaterial = new MovieMaterial(summerPlan,
> > {smooth:true,precision:2,scaleY:-2,offsetY:2988});
>
> > i dont know if is the best way to do this.
>
> > Can you give me your feedback ?
>
> > On 22 avr, 19:04, Colir <[email protected]> wrote:
> >> hello,
> >> i'm looking for a solution to give an negative offsetY value to a
> >> movieMaterial that i use on a plane.
>
> >> i have two MovieMaterial and one plane.
> >> My plane is half height from the movieMaterial
>
> >> The idea is to use the top part of the first MovieMaterial for the
> >> front, and use the bottom part of the second for the back.
>
> >> MoviesMaterials must be bigger than the plan (2x plane height),
> >> because i will invert the part of them during the animation i create
>
> >> The problem is that when i setup a negativeoffset, the texture is
> >> tilled, cause i also setup the lockH property to keep aspect ratio of
> >> the movie clip
>
> >> here is my code :
>
> >> var summerPlan:MovieClip = new SummerPlan() as MovieClip;
> >> var rainningPlan:MovieClip = new RainningPlan() as MovieClip;
>
> >> var summerMatTop:MovieMaterial = new MovieMaterial(summerPlan,
> >> {smooth:true,precision:2,lockH:742});
> >> var rainningMatBottom:MovieMaterial = new MovieMaterial(rainningPlan,
> >> {smooth:true,precision:2,lockH:742,offsetY:-742});
>
> >> How i can fix this please?
>
> >> thank you very much.
>
> >> --
> >> Subscription settings:http://groups.google.com/group/away3d-dev/
> >> subscribe?hl=en