Hi. Hopefully this is in the appropriate section…
In my current website (which I want to redo, making it mobile friendly and not requiring Flash), I had a Flash animation header which consisted of a background, and an Actionscript routine which would constantly pick a random number between 1 and 200. if the number was greater than 1, it would just loop back (nothnig happens). If it was 1, then it would move to the next section of the timeline, where it would pick a number from 1 to 20, and then it would go to an actionscript section consisting of a series of if/thens, which would jump swf to different parts in the timeline, based on the chosen number. Each of these parts was an animated segment, which then had a gotoAndPlay bringing it back to the very start (where it would be picking a number between 1 and 200).
With this, I had an animated header with occassional random animations occurring.
Now that I’m abandoning Flash, I’m looking into what is the current proper method for doing this sort of thing.
Problem is… there’s no scripting, so the animation would just be a linear loop of the same animated frames, so I’m trying to figure out if there’s some (compatible, smart) way to do the same kind of randomized animation in HTML5.
I am hoping is that someone can give me some guidence on a few things:
-Is there some way I can have an animation or image loaded onto the web page, and then have some sort of random number generator that then drives the loading or playback of separate clips… so that it is usually is displaying that image/animation, but then sometimes randomly plays from a library of other quick clips (…I’m assuming loading it to replace the regular one, as we are no longer jumping around the timeline of a swf…unless there IS some way of jumping around a movie file or something!).
As an example, the header shows an image of a creature (non-moving image, or looping ‘rest’ pose)… every once in a while (random), it loads a very short (action) clip, such as a blink, head move, stretch, etc, and when that clip finishes, it loads the regular (rest) clip. I’m again, assuming we’d be loading and replacing clips, since I’m assuming we can’t jump around a movie clip or some sort.
I was comfortable doing actionscript and all this stuff using Flash and HTML4, but now with HTML5 and the alternate animation formats, I’m kind of in very new territory, so I’m really not sure how to go about things.
Hope someone can point me in the right direction…