How can I fix my animated picture?

Learn how to use AAO by reading tutorials, and seek help from the AAO community.

Moderator: EN - Forum Moderators

User avatar
Farawyn
Posts: 13
Joined: Sat May 16, 2009 10:51 pm
Gender: Male
Location: Germany

How can I fix my animated picture?

Post by Farawyn »

For my trial I created that animated picture:

Image

At some point in the game a character should type a password in. The problem is that all pictures are loaded in the beginning of the trial, right? So the animated picture started before it appears in the game. When I take this infinite loop version it's left to chance at which moment the player sees the picture. When I take the version, wich plays the animation only one time it's alredy finished when the player sees it.
So what should I do? Is there a feature I didn't saw? Or a trick?
Last edited by Farawyn on Mon May 25, 2009 6:31 pm, edited 1 time in total.
P.S. I am german.

"All hail Unas, the omnipotent!"
Copy this into your signature to help Unas on his way to world domination!
User avatar
Meph
Posts: 13439
Joined: Mon Nov 10, 2008 10:07 pm
Gender: Male
Spoken languages: English
Location: Probably Disneyland Paris... or the UK

Re: Problem with animated picture

Post by Meph »

Unas will fix the problem soon. This has been discussed loads of times. :)

Also, you're image should be 256px x 192px. ;)
User avatar
henke37
Security expert / tools programmer
Posts: 3031
Joined: Wed Mar 04, 2009 9:42 pm
Gender: Male
Spoken languages: Swedish,English
Location: Sweden
Contact:

Re: Problem with animated picture

Post by henke37 »

Btw, there will eventually be an action for interactive text input. Let's hope that it has password support.
Currently working on a redesign of Court-records.net.
User avatar
Farawyn
Posts: 13
Joined: Sat May 16, 2009 10:51 pm
Gender: Male
Location: Germany

Re: Problem with animated picture

Post by Farawyn »

Okay.
(Please fix it until the 15th June, Unas, this trial is for the May/June competition ^_^')
Meph wrote:Also, you're image should be 256px x 192px. ;)
Oh, almost forgot that this is the wrong version.
Thanks for remembering (and for replying of course), Meph :)

Edit:
henke37 wrote:Btw, there will eventually be an action for interactive text input. Let's hope that it has password support.
That would be great!
Go Unas, go Unas!
P.S. I am german.

"All hail Unas, the omnipotent!"
Copy this into your signature to help Unas on his way to world domination!
User avatar
henke37
Security expert / tools programmer
Posts: 3031
Joined: Wed Mar 04, 2009 9:42 pm
Gender: Male
Spoken languages: Swedish,English
Location: Sweden
Contact:

Re: Problem with animated picture

Post by henke37 »

It's already promised, just wait for unas to implement it. He might do it fast. Or not. He didn't say anything about that.
Currently working on a redesign of Court-records.net.
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: Problem with animated picture

Post by Unas »

Meph wrote:Unas will fix the problem soon.
Will I ? :mrgreen:
I mean, I've already used my trick to restart a gif for characters one-time animations support, but I didn't think I would restart every gif on display, as it didn't seem necessary, and possibly cpu resource consuming.
But you are right to ask me that now, it should be very easy to do - considering most of it is already implemented - and performances shouldn't be too much of a problem. I'll run a few tests to be sure, but it should be okay.
Farawyn wrote:(Please fix it until the 15th June, Unas, this trial is for the May/June competition ^_^')
You are lucky it seems easy to do, because I won't have much time until 15th June :P
I'm studying hard again, now that my written tests are over, preparing for the oral tests that will take place for me between June 20th and July 19th. :)
henke37 wrote:Btw, there will eventually be an action for interactive text input. Let's hope that it has password support.
Well, actually making the suggestion is more efficient than hoping, because I'd never have thought about that spontaneously :P
Anyway, the keyword here is "eventually" :mrgreen:
You can never know in advance when I'll be motivated enough to do it. As soon as I decide to do it seriously, it's fast, but since I'm already studying seriously aside from that and can't do two simultaneous things as seriously... :P
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
henke37
Security expert / tools programmer
Posts: 3031
Joined: Wed Mar 04, 2009 9:42 pm
Gender: Male
Spoken languages: Swedish,English
Location: Sweden
Contact:

Re: Problem with animated picture

Post by henke37 »

With a proper layering system, it would be much easier to get everything right.
Or you could just add yet another hack to run the effect from the start to the end, over everything else. Like the gavel smash. Seriously, that needs the run once system too!

Edit: Ops, I seem to have been a bit sidetracked, I was mainly thinking of those pans, but it applies none the less here as well.
Currently working on a redesign of Court-records.net.
User avatar
Meph
Posts: 13439
Joined: Mon Nov 10, 2008 10:07 pm
Gender: Male
Spoken languages: English
Location: Probably Disneyland Paris... or the UK

Re: Problem with animated picture

Post by Meph »

Unas wrote:
Meph wrote:Unas will fix the problem soon.
Will I ? :mrgreen:
Yes, now do as I say :fran: :P
User avatar
Bad Player
Posts: 7228
Joined: Wed May 20, 2009 10:53 pm
Gender: Male
Spoken languages: American
Location: Under a bridge

Re: Problem with animated picture

Post by Bad Player »

Unas wrote:
Meph wrote:Unas will fix the problem soon.
Will I ? :mrgreen:
I mean, I've already used my trick to restart a gif for characters one-time animations support
Uh... Could you tell us about that tric, please? ^^'
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: Problem with animated picture

Post by Unas »

You can't use it in the editor, it's just a technical way of restarting gifs even though Javascript doesn't normally have functions for this. I programmed the game to use it on some sprites that require one-time animations (such as Phoenix raising his arm for an objection, etc), but you can't trigger it yourself, it's automatic :wink:
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
henke37
Security expert / tools programmer
Posts: 3031
Joined: Wed Mar 04, 2009 9:42 pm
Gender: Male
Spoken languages: Swedish,English
Location: Sweden
Contact:

Re: Problem with animated picture

Post by henke37 »

It's probably easier if you just read the source code. Oh, wait, it's in French. Besides, it's always a pain to hunt for stuff in other's code. You better just wait for Unas's reply.
Currently working on a redesign of Court-records.net.
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: Problem with animated picture

Post by Unas »

Well, if you want technical details, it's just that Firefox restarts a gif animation in the whole page when this file is loaded into a JS Image object.

So I have a JS Image object (for henke : it's named "redemarreur_d_anim" in the source code, which means "anim_restarter") that I use only for restarting gifs : each time I need to display a one-time animation, i load this animation in the object before (by "redemarreur_d_anim.src=" the picture's url), and it's restarted.

I can easily program the game to do that on every animation too, I'll have a look.
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
User avatar
Bad Player
Posts: 7228
Joined: Wed May 20, 2009 10:53 pm
Gender: Male
Spoken languages: American
Location: Under a bridge

Re: Problem with animated picture

Post by Bad Player »

If you do that, will it do that for all animations (including customs) or just the ones already loaded into AAO?
User avatar
henke37
Security expert / tools programmer
Posts: 3031
Joined: Wed Mar 04, 2009 9:42 pm
Gender: Male
Spoken languages: Swedish,English
Location: Sweden
Contact:

Re: Problem with animated picture

Post by henke37 »

Well, I can't say that I can think of any case where I wouldn't want this. Only cases where it wouldn't matter to begin with.
Currently working on a redesign of Court-records.net.
User avatar
Unas
Admin / Site programmer
Posts: 8850
Joined: Tue Jul 10, 2007 4:43 pm
Gender: Male
Spoken languages: Français, English, Español
Contact:

Re: How can I fix my animated picture?

Post by Unas »

bad player wrote:If you do that, will it do that for all animations (including customs) or just the ones already loaded into AAO?
All animations - including custom ones - will be restarted on display.

As henke said, I don't think anyone could complain about this :)
ImageImageImage
If knowledge can create problems, it is not through ignorance that we can solve them.
Si le savoir peut créer des problèmes, ce n'est pas l'ignorance qui les résoudra. ( Isaac Asimov )
Post Reply