1 person found this helpful
Are you showing a slideshow? Basically showing an image for a certain duration, then fading to the next image, rinse repeat?
I would do this in all code but you're new to flash so let's deal with it your way, timeline. Also 3rd party plugins are available rampantly around the net for showing slideshows. At that point you'd just need to play your audio.
Otherwise you can use a simple script to stop the playhead for a duration of time rather than extending the frames of each image. That should cut your frames down to a fraction of what I'm assuming you're using now. 16,000 is crazy!
Also most people won't notice the difference between 24 frames per second and 30 frames per second. Typically people up the FPS to 30 so reducing it back down to 24 will give you more frames to work with but still have smooth transitions.
If you set your document to 24fps and want it to pause for 5 seconds on each image then a script to pause for 5 seconds would look like this in AS3:
Import on the first frame:
Stop for 5 seconds:
// stop the playhead
// wait 5000 milliseconds (5 seconds), then play()
Your timeline fading between images would then look like this:
This doesn't include an audio layer to keep it simple. The first frame script would contain the import above, and also the pause script. Then each [a] frame script you see would only be the pause script.
In that picture an image fades in for 1 second (24 frames) while the previous image fades out for 1 second at the same time, overlapping (a dissolve).
The [a] frame script stops the playhead for 5 seconds each time you see it. So by the time the 95th frame is hit you have shown 5 pictures for 5 seconds. If you did that all on the timeline without the script you'd have to extend the timeline out (5 pics for 5 seconds) 25 seconds, or (24fps x 25 seconds) 600 frames.
Simple scripts like that will save you a lot of time and effort. If you reduce the fade time by half (12 frames instead of 24, half a second) you'd get about 10 pictures in the same space and most people wouldn't notice the difference, except the fade is quicker.
It's a lot to take in so I'll stop there for now.
The script version would be a bit too complex if you're not a coder. There's a so many ways to code it I don't want to go down any bunny trails ahead of myself.
Thats correct, its a form of slide show however it isnt a pre preped one, I had 40ish images on a single document and a single large audio file, I cut up a large audio file to the specific sections per slide and photoshopped the images.
The reason it exceeds 16,000 is for example the first piece of audio is 1:30 seconds long so for the frame rate needed (Im running at 24 fps) would be 24x90 = 2160 frames for the first slide and with 40ish slides the frame numbers built up quickly.
So am I right in thinking that the action script would stop the timeline, when it hits the script, on the image for the duration mentioned? and if so wouldnt this then effect the audio stream?
I currently have a small fade between them using a classic tween and the alpha transparancy.
Im not a AS3 coder but I am confidant in HTML, CSS, a bit of PHP and Jquery
Syncing will be the biggest challenge then. Is this audio a seamless song?
With the SoundChannel class you can load a sound from the library (or filesystem with Sound class). It's pretty easy and it has an event when the sound is finished playing.
e.g. Loading/playing a library sound:
// get an actionscript linked instance of the library sound
var mySound:SomeLibrarySound = new SomeLibrarySound1();
// load it into a SoundChannel, play it
var mySoundChannel:SoundChannel = mySound.play();
An event is dispatched when that sound is done. That's where you could tell yourself to load the next sound.
Using the code above:
// sound is finished, load something else, sound 2..
mySound = new SomeLibrarySound2();
mySoundChannel = mySound.play();
Again if you're not froggy on going the code route I don't want to go too far down that bunny trail but you can see here that code is being used to play the sound which removes your need to use the timeline to play it.
How fast a users computer is would dictate how much time it would take to swap sounds and there's faster ways to have other sounds "preloaded" so they play back to back more efficiently.
Alternatively, keep in mind if you make a new MovieClip in the library, you can put the audio inside a layer. If you drop that MovieClip on the timeline it will take up 1 frame yet it will play the audio inside it (which can be up to 16,000 frames of audio). Nesting things inside MovieClips lets you take something that would normally take a large number of frames and condense it down to 1 frame. Then you can use the above mentioned timeline example and place the sounds on the timeline but not need to extend it just for the audio. Make sense?
Yes I think I understand, thank you you've been an amazing help
You're welcome and good luck!