Hi all,
First time poster, so hello!
Thanks to all who take the time to read this.
Background:
I am a software developer, primarily .NET and Java, I have little experience with Flash and I am planning to develop an application using AS 3.0 targetting FP 10.
Business requirements:
Develop numerous “slideshow” like movies (web delivery) which are easy to create (by designers) and easy to localize. Each “slideshow” will contain a number of slides. Each slide could be a static graphic or an animation. The slide will contain text labels. A slide will be accompanied by a piece of instruct text and an MP3. A user can navigate between the slide (back, forward) and pause.
That’s basically it…
Design:
ContentController class
The ContentController class will be responsible for loading the required assets (swf, xml, mp3)
The ContentController swf will contain all the UI components required for controlling the slideshow (back, forward, pause etc), all events will be handled in the ContenController class .pause(), .next(), .prev() etc
I want to keep as much of the code base as possible in the ContentController class (or other objects controlled by it) to avoid rebuilding individual slide show files if code changes are required
Each slideshow will be contained in their own folder with a unique ID
Within the unique folder there will be a single swf file, multiple culture folders (“en-us” etc)
Each culture folder will contain an XML file and a number of MP3s (possible separated into different folders, XML and MP3)
I will create a template fla file for creating the slide show content –
This file will look as follows:
• The first frame will be empty with a stop command
• The second frame (label Slide1) will contain a movieclip with the first slide animation with an instance name of mcSlide1 or similar, the second frame will contain a movieclip mcSlide3 etc
• Each slide will contain a number of label components
[INDENT]o I plan to develop a simple component which uses the flash.text.engine classes to display the text. The creator would drag an instance onto the stage and specify a slide ID and label ID for the component
o I want to keep the code for creating and displaying the text within class which would be [COLOR=black]instantiated[/COLOR] by ContentController class to avoid having to rebuild all slide show flas if any updates are made
o So this “component” is essentially a place holder
o Something like, controller.textCreator.createLabel(this); and a function which would take the object and use its slide ID, lable ID, xPos, yPos etc to render the text on screen
o Is this a sensible way to go about this in flash? Any other suggestions/ tips here?
[/INDENT]I will also create an XML template to accompany the fla file –
The file will contain a structure similar to (this is top of my head and will be refined):
<slideShow>
<slide id="1">
<instruct>Here is some instruct text<instruct>
<mp3>sound.mp3</mp3>
<labels>
<label id="1">Some text goes here</label>
<label id="2">Some text goes here</label>
<label id="3">Some text goes here</label>
<label id="4">Some text goes here</label>
</labels>
</slide>
<slide id="2"></slide>
<slide id="3"></slide>
<slide id="4"></slide>
</slideShow>
A slide show will be launched via a URL passing a unique slideshow ID (folder name above) and a culture
The Controller class will pick up on the parameters and use them to load the correct content
The XML file will be loaded and parsed and the appropriate variables will be set up, array of scene objects etc etc.
The swf file will then be instructed to go to slideN, the associated instruct text displayed, MP3 loaded and played
QUESTION: if I have a movieClip with a timeline animation and only a stop() command on the last frame, is there an event raised when this completes movie clip plays through or will I have create my own?
The Controller class will then move the slides along using the UI controls and calling the relevant scene obj to display
Do you think that the above is a good overall design, do you have any comments or suggestions?
Thanks for your time, all constructive [COLOR=black]criticism [/COLOR]welcome.
D