[Moo] long fade out

14 messages Options
Embed this post
Permalink
hamburger

[Moo] long fade out

Reply Threaded More More options
Print post
Permalink

How to make a long fade out and fade in.
I have the follwing code. It does everything without fading


window.addEvent('domready', function()
{

var path = 'http://www.opteynde.com/';
var writehere = $('jsonText');

writehere.set('tween', {duration: '200000000'});
writehere.tween('opacity', 0); //fade out

//writehere.fade('out');

var request = new Request.JSON(
{
  url: path + 'ask.php',
  onComplete: function(htmlText)  {
  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
vorhandenes  und trägt neues ein.
  }
}).send();

});
Ryan Florence

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

Isn't that a 55 hour fade?

have you watched for at least 5 hours to see that it's fading?

Ryan Florence

[Writing TextMate Snippets] ( http://blog.flobro.com/ )

On Nov 2, 2009, at 11:21 AM, hamburger wrote:

>
> How to make a long fade out and fade in.
> I have the follwing code. It does everything without fading
>
>
> window.addEvent('domready', function()
> {
>
> var path = 'http://www.opteynde.com/';
> var writehere = $('jsonText');
>
> writehere.set('tween', {duration: '200000000'});
> writehere.tween('opacity', 0); //fade out
>
> //writehere.fade('out');
>
> var request = new Request.JSON(
> {
>  url: path + 'ask.php',
>  onComplete: function(htmlText)  {
>  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> vorhandenes  und trägt neues ein.
>  }
> }).send();
>
> });

hamburger

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

That's the problem its not a 5 hour one its change immediately.

On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:

> Isn't that a 55 hour fade?
>
> have you watched for at least 5 hours to see that it's fading?
>
> Ryan Florence
>
> [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
>
>
>
>
> > How to make a long fade out and fade in.
> > I have the follwing code. It does everything without fading
>
> > window.addEvent('domready', function()
> > {
>
> > var path = 'http://www.opteynde.com/';
> > var writehere = $('jsonText');
>
> > writehere.set('tween', {duration: '200000000'});
> > writehere.tween('opacity', 0); //fade out
>
> > //writehere.fade('out');
>
> > var request = new Request.JSON(
> > {
> >  url: path + 'ask.php',
> >  onComplete: function(htmlText)  {
> >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > vorhandenes  und trägt neues ein.
> >  }
> > }).send();
>
> > });- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
Oskar Krawczyk

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink
Once again, put it in a MooShell - http://mooshell.net/

___

Oskar Krawczyk
http://nouincolor.com


On Mon, Nov 2, 2009 at 18:30, hamburger <[hidden email]> wrote:

That's the problem its not a 5 hour one its change immediately.

On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
> Isn't that a 55 hour fade?
>
> have you watched for at least 5 hours to see that it's fading?
>
> Ryan Florence
>
> [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
>
>
>
>
> > How to make a long fade out and fade in.
> > I have the follwing code. It does everything without fading
>
> > window.addEvent('domready', function()
> > {
>
> > var path = 'http://www.opteynde.com/';
> > var writehere = $('jsonText');
>
> > writehere.set('tween', {duration: '200000000'});
> > writehere.tween('opacity', 0); //fade out
>
> > //writehere.fade('out');
>
> > var request = new Request.JSON(
> > {
> >  url: path + 'ask.php',
> >  onComplete: function(htmlText)  {
> >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > vorhandenes  und trägt neues ein.
> >  }
> > }).send();
>
> > });- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

anutron

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink
In reply to this post by hamburger
um. have you tried a shorter duration? like, say, 20 seconds?

On Mon, Nov 2, 2009 at 11:30 AM, hamburger <[hidden email]> wrote:

That's the problem its not a 5 hour one its change immediately.

On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
> Isn't that a 55 hour fade?
>
> have you watched for at least 5 hours to see that it's fading?
>
> Ryan Florence
>
> [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
>
>
>
>
> > How to make a long fade out and fade in.
> > I have the follwing code. It does everything without fading
>
> > window.addEvent('domready', function()
> > {
>
> > var path = 'http://www.opteynde.com/';
> > var writehere = $('jsonText');
>
> > writehere.set('tween', {duration: '200000000'});
> > writehere.tween('opacity', 0); //fade out
>
> > //writehere.fade('out');
>
> > var request = new Request.JSON(
> > {
> >  url: path + 'ask.php',
> >  onComplete: function(htmlText)  {
> >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > vorhandenes  und trägt neues ein.
> >  }
> > }).send();
>
> > });- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

The MooTools Tutorial: www.mootorial.com Clientcide: www.clientcide.com
hamburger

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

of course i tried a shorter time. all times are ignored.
Oskar i know you like the mooshell. But there i have security problems
with json ..

On 2 Nov., 19:48, Aaron Newton <[hidden email]> wrote:

> um. have you tried a shorter duration? like, say, 20 seconds?
>
>
>
> On Mon, Nov 2, 2009 at 11:30 AM, hamburger <[hidden email]> wrote:
>
> > That's the problem its not a 5 hour one its change immediately.
>
> > On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
> > > Isn't that a 55 hour fade?
>
> > > have you watched for at least 5 hours to see that it's fading?
>
> > > Ryan Florence
>
> > > [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> > > On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
> > > > How to make a long fade out and fade in.
> > > > I have the follwing code. It does everything without fading
>
> > > > window.addEvent('domready', function()
> > > > {
>
> > > > var path = 'http://www.opteynde.com/';
> > > > var writehere = $('jsonText');
>
> > > > writehere.set('tween', {duration: '200000000'});
> > > > writehere.tween('opacity', 0); //fade out
>
> > > > //writehere.fade('out');
>
> > > > var request = new Request.JSON(
> > > > {
> > > >  url: path + 'ask.php',
> > > >  onComplete: function(htmlText)  {
> > > >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > > > vorhandenes  und trägt neues ein.
> > > >  }
> > > > }).send();
>
> > > > });- Zitierten Text ausblenden -
>
> > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
Paul Saukas

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink
try setting the duration to say 5000 milliseconds.  200000000 milliseconds seems just a touch much.

writehere.set('tween', {duration: '5000'});

On Mon, Nov 2, 2009 at 1:53 PM, hamburger <[hidden email]> wrote:

of course i tried a shorter time. all times are ignored.
Oskar i know you like the mooshell. But there i have security problems
with json ..

On 2 Nov., 19:48, Aaron Newton <[hidden email]> wrote:
> um. have you tried a shorter duration? like, say, 20 seconds?
>
>
>
> On Mon, Nov 2, 2009 at 11:30 AM, hamburger <[hidden email]> wrote:
>
> > That's the problem its not a 5 hour one its change immediately.
>
> > On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
> > > Isn't that a 55 hour fade?
>
> > > have you watched for at least 5 hours to see that it's fading?
>
> > > Ryan Florence
>
> > > [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> > > On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
> > > > How to make a long fade out and fade in.
> > > > I have the follwing code. It does everything without fading
>
> > > > window.addEvent('domready', function()
> > > > {
>
> > > > var path = 'http://www.opteynde.com/';
> > > > var writehere = $('jsonText');
>
> > > > writehere.set('tween', {duration: '200000000'});
> > > > writehere.tween('opacity', 0); //fade out
>
> > > > //writehere.fade('out');
>
> > > > var request = new Request.JSON(
> > > > {
> > > >  url: path + 'ask.php',
> > > >  onComplete: function(htmlText)  {
> > > >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > > > vorhandenes  und trägt neues ein.
> > > >  }
> > > > }).send();
>
> > > > });- Zitierten Text ausblenden -
>
> > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

hamburger

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

i did same thing its ignored

On 2 Nov., 20:08, Paul Saukas <[hidden email]> wrote:

> try setting the duration to say 5000 milliseconds.  200000000 milliseconds
> seems just a touch much.
>
> writehere.set('tween', {duration: '5000'});
>
>
>
> On Mon, Nov 2, 2009 at 1:53 PM, hamburger <[hidden email]> wrote:
>
> > of course i tried a shorter time. all times are ignored.
> > Oskar i know you like the mooshell. But there i have security problems
> > with json ..
>
> > On 2 Nov., 19:48, Aaron Newton <[hidden email]> wrote:
> > > um. have you tried a shorter duration? like, say, 20 seconds?
>
> > > On Mon, Nov 2, 2009 at 11:30 AM, hamburger <[hidden email]> wrote:
>
> > > > That's the problem its not a 5 hour one its change immediately.
>
> > > > On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
> > > > > Isn't that a 55 hour fade?
>
> > > > > have you watched for at least 5 hours to see that it's fading?
>
> > > > > Ryan Florence
>
> > > > > [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> > > > > On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
> > > > > > How to make a long fade out and fade in.
> > > > > > I have the follwing code. It does everything without fading
>
> > > > > > window.addEvent('domready', function()
> > > > > > {
>
> > > > > > var path = 'http://www.opteynde.com/';
> > > > > > var writehere = $('jsonText');
>
> > > > > > writehere.set('tween', {duration: '200000000'});
> > > > > > writehere.tween('opacity', 0); //fade out
>
> > > > > > //writehere.fade('out');
>
> > > > > > var request = new Request.JSON(
> > > > > > {
> > > > > >  url: path + 'ask.php',
> > > > > >  onComplete: function(htmlText)  {
> > > > > >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > > > > > vorhandenes  und trägt neues ein.
> > > > > >  }
> > > > > > }).send();
>
> > > > > > });- Zitierten Text ausblenden -
>
> > > > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
hamburger

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

if i delete the request part it works
witch problem do i have there?
the ask.php gives only the string 100

On 2 Nov., 20:11, hamburger <[hidden email]> wrote:

> i did same thing its ignored
>
> On 2 Nov., 20:08, Paul Saukas <[hidden email]> wrote:
>
>
>
> > try setting the duration to say 5000 milliseconds.  200000000 milliseconds
> > seems just a touch much.
>
> > writehere.set('tween', {duration: '5000'});
>
> > On Mon, Nov 2, 2009 at 1:53 PM, hamburger <[hidden email]> wrote:
>
> > > of course i tried a shorter time. all times are ignored.
> > > Oskar i know you like the mooshell. But there i have security problems
> > > with json ..
>
> > > On 2 Nov., 19:48, Aaron Newton <[hidden email]> wrote:
> > > > um. have you tried a shorter duration? like, say, 20 seconds?
>
> > > > On Mon, Nov 2, 2009 at 11:30 AM, hamburger <[hidden email]> wrote:
>
> > > > > That's the problem its not a 5 hour one its change immediately.
>
> > > > > On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
> > > > > > Isn't that a 55 hour fade?
>
> > > > > > have you watched for at least 5 hours to see that it's fading?
>
> > > > > > Ryan Florence
>
> > > > > > [Writing TextMate Snippets] (http://blog.flobro.com/)
>
> > > > > > On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>
> > > > > > > How to make a long fade out and fade in.
> > > > > > > I have the follwing code. It does everything without fading
>
> > > > > > > window.addEvent('domready', function()
> > > > > > > {
>
> > > > > > > var path = 'http://www.opteynde.com/';
> > > > > > > var writehere = $('jsonText');
>
> > > > > > > writehere.set('tween', {duration: '200000000'});
> > > > > > > writehere.tween('opacity', 0); //fade out
>
> > > > > > > //writehere.fade('out');
>
> > > > > > > var request = new Request.JSON(
> > > > > > > {
> > > > > > >  url: path + 'ask.php',
> > > > > > >  onComplete: function(htmlText)  {
> > > > > > >  writehere.set('html', htmlText).tween('opacity', 100);  //löscht
> > > > > > > vorhandenes  und trägt neues ein.
> > > > > > >  }
> > > > > > > }).send();
>
> > > > > > > });- Zitierten Text ausblenden -
>
> > > > > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> > > > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> > - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
Ryan Florence

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

100 is 100 times the acceptable value for 'opacity'.

Change it to:

onComplete: function(htmlText)  {
  writehere.set('html', htmlText).tween('opacity', 1);
}

Ryan Florence

[Writing TextMate Snippets] ( http://blog.flobro.com/ )

On Nov 2, 2009, at 12:14 PM, hamburger wrote:

>
> if i delete the request part it works
> witch problem do i have there?
> the ask.php gives only the string 100
>
> On 2 Nov., 20:11, hamburger <[hidden email]> wrote:
>> i did same thing its ignored
>>
>> On 2 Nov., 20:08, Paul Saukas <[hidden email]> wrote:
>>
>>
>>
>>> try setting the duration to say 5000 milliseconds.  200000000  
>>> milliseconds
>>> seems just a touch much.
>>
>>> writehere.set('tween', {duration: '5000'});
>>
>>> On Mon, Nov 2, 2009 at 1:53 PM, hamburger <[hidden email]> wrote:
>>
>>>> of course i tried a shorter time. all times are ignored.
>>>> Oskar i know you like the mooshell. But there i have security  
>>>> problems
>>>> with json ..
>>
>>>> On 2 Nov., 19:48, Aaron Newton <[hidden email]> wrote:
>>>>> um. have you tried a shorter duration? like, say, 20 seconds?
>>
>>>>> On Mon, Nov 2, 2009 at 11:30 AM, hamburger <[hidden email]>  
>>>>> wrote:
>>
>>>>>> That's the problem its not a 5 hour one its change immediately.
>>
>>>>>> On 2 Nov., 19:26, Ryan Florence <[hidden email]> wrote:
>>>>>>> Isn't that a 55 hour fade?
>>
>>>>>>> have you watched for at least 5 hours to see that it's fading?
>>
>>>>>>> Ryan Florence
>>
>>>>>>> [Writing TextMate Snippets] (http://blog.flobro.com/)
>>
>>>>>>> On Nov 2, 2009, at 11:21 AM, hamburger wrote:
>>
>>>>>>>> How to make a long fade out and fade in.
>>>>>>>> I have the follwing code. It does everything without fading
>>
>>>>>>>> window.addEvent('domready', function()
>>>>>>>> {
>>
>>>>>>>> var path = 'http://www.opteynde.com/';
>>>>>>>> var writehere = $('jsonText');
>>
>>>>>>>> writehere.set('tween', {duration: '200000000'});
>>>>>>>> writehere.tween('opacity', 0); //fade out
>>
>>>>>>>> //writehere.fade('out');
>>
>>>>>>>> var request = new Request.JSON(
>>>>>>>> {
>>>>>>>>  url: path + 'ask.php',
>>>>>>>>  onComplete: function(htmlText)  {
>>>>>>>>  writehere.set('html', htmlText).tween('opacity', 100);  //
>>>>>>>> löscht
>>>>>>>> vorhandenes  und trägt neues ein.
>>>>>>>>  }
>>>>>>>> }).send();
>>
>>>>>>>> });- Zitierten Text ausblenden -
>>
>>>>>>> - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>>
>>>>> - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>>
>>> - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>>
>> - Zitierten Text anzeigen -

Piotr Zalewa

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink
This is working:
http://mooshell.net/vGxaC/1

* full opacity is for 1, not 100 (as it was adviced already)
* Request.JSON.onSuccess is returning an json object not html content - use Request.HTML for that (example http://mooshell.net/html/)
* you may use mooshell with Request.JSON, but certainly not with other domains.

zalun
--
London, UK
hamburger

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

thx for the answers.
sorry for the wrong posted opacity value. It doesnt work with 1
either.

i change the complete code to an hml Request with the same result.
I think the request dont wait until the fadeout is done and is so fast
that it overrides the writehere.

Here my new code:

window.addEvent('domready', function()
{

var path = 'http://www.opteynde.com/';
var writehere = $('jsonText');

writehere.set('tween', {duration: '50000'});

writehere.tween('opacity', 0); //fade out



new Request.HTML({
  url: path + 'ask3.php',
  data: {'html': "<p>A paragraph</p>" +
                 "<script type='text/javascript'>alert('called from
request')<\/script>"},
  method: 'post',
  update: 'jsonText',
  onSuccess: function(response) {
    $('jsonText').tween('opacity', 1);
  }
}).send();

});


On 3 Nov., 00:28, Piotr Zalewa <[hidden email]> wrote:

> This is working:http://mooshell.net/vGxaC/1
>
> * full opacity is for 1, not 100 (as it was adviced already)
> * Request.JSON.onSuccess is returning an json object not html content - use
> Request.HTML for that (examplehttp://mooshell.net/html/)
> * you may use mooshell with Request.JSON, but certainly not with other
> domains.
>
> zalun
> --
> London, UK
Piotr Zalewa

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink
If you want to have the request happen after the tween is finished - you'd have to chain it
I.e. like this: http://mooshell.net/vGxaC/3

2009/11/3 hamburger <[hidden email]>
I think the request dont wait until the fadeout is done and is so fast
that it overrides the writehere.

zalun
--
London, UK
hamburger

[Moo] Re: long fade out

Reply Threaded More More options
Print post
Permalink

thanks Piotr it works fine now!

On 3 Nov., 15:37, Piotr Zalewa <[hidden email]> wrote:

> If you want to have the request happen after the tween is finished - you'd
> have to chain it
> I.e. like this:http://mooshell.net/vGxaC/3
>
> 2009/11/3 hamburger <[hidden email]>
>
> > I think the request dont wait until the fadeout is done and is so fast
> > that it overrides the writehere.
>
> zalun
> --
> London, UK