Jump to content

Javascript-Problem....


erich.wanker

Recommended Posts

Hello,

 

i use TweenLite for animations...

 

i want to slide a form from top:-1000 to the middle of the screen with alpha 0-100% ...

 

 

 

i use ClientEvent-ExtEvent:

function window.show(sender, eOpts)
{
   function FixMe()
   {
    V_FRAME_VERTRAG_STRUKTUR.UniDBGrid3.doLayout( );
    V_FRAME_VERTRAG_STRUKTUR.UniDBGrid2.doLayout( );
   }
   TweenLite.set('#'+sender.getId()+'', {y:-1000,autoAlpha:0,display:"block"});
   setTimeout(function() {
TweenLite.to('#'+sender.getId()+'', 0.4, {autoAlpha:1, y:0, ease:Back.easeOut.config(1), delay:0.15, clearProps:"transform",onComplete:FixMe});   
   }, 200);     
}

the problem ist the last "tweetLite.to":

 

y:=0    should be      trunc( screen-height - formheight /2)

 

how can i make this in Javascript?

 

 

 

And suggestions?

 

ThanX

Link to comment
Share on other sites

WORKS PERFECT !!

 

THANX :-)

function window.show(sender, eOpts)
{     
   function FixMe()
   {
    V_FRAME_VERTRAG_STRUKTUR.UniDBGrid3.doLayout( );
    V_FRAME_VERTRAG_STRUKTUR.UniDBGrid2.doLayout( );
   }
   var posi = Math.trunc(($(window).height() - this.getHeight())/2);
   
   TweenLite.set('#'+sender.getId()+'',     {autoAlpha:0,y:-1000,display:"block"});
   setTimeout(function() {
TweenLite.to('#'+sender.getId()+'', 0.5, {autoAlpha:1,y: posi,   display:"block", ease:Back.easeOut.config(1), onComplete:FixMe});   
   }, 200);     
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...