Dynamic and Input text
Project 1. Postcard Factory
During this course you will complete several small projects. All of them may give you "food for thoughts" and be laid as the conceptual basis of your own Web site or desktop application. Take those project seriously because they represent the coding techniques, which are common among Flash designers.
As a prerequisite for this project (and other project) you will need to complete a final project of our basic Flash course or be able to create a small Flash site with page-to-page navigation.
So… let's start.
Postcard Factory is a small application which allows user to enter the greeting, text and signature and display them on the artistic "postcard" of the choice. Once text is entered user may browse through the postcard options and choose appropriate. Later we may learn how to print the postcards.
- Create a new file and set up the stage size as 450X300 px
- Extend the timeline up to a couple dozens frame
- Insert several layers. Make sure that layer ACTIONS, LABELS and several layers for the content such as "background" "text" "pictures", "buttons" exist
- Separate a timeline into three four or more intervals with the keyframes.
- In the ACTIONS layer place stop()script
- In the LABELS layer mark frame intervals like "home", "romantic", "official" and others
- In the first frame interval ("home") add buttons that will redirect to the content pages. Manually enter code like the example below for the buttons in Expert mode. Be sure that you use frame labels to navigate.
on (release) { goToAndStop("romantic"); } - For other pages add button which will lead back to the home page. Make this button very large (even as big as the stage) and invisible. You should remember that to achieve this effect you need delete everything Up, Over and Down state frames, leaving only Hit stage. Button will be invisible yet clickable.
- Add an appropriate graphics to the content page – it may be flowers for "romantic", city view for "travel" and so on.
- Enter three textboxes in the "home" frame interval. Make them Input and assign variables varTitle, varText, varSignature through the var textbox
- On each content page add three textboxes and make them Dynamic. Assign the same variable names to their var textboxes.
- On content pages select artistic fonts for texts, rotate texts if necessary. Make text multilane for the varText textbox. Refine your design.
- As a result you should make the file that is close by concept to the example below. If you enter the text it will be instantly reflected on the postcards. When you click buttons – you will see that. Make sure that variable names for input textboxes are the same as for dynamic textboxes.