EasyNews Tutorial

In order to simplify setting up a search function and customized index with the fCMSPro, two helper components are provided. These components are included inside a separate installation file called: fCMSEasyNews.mxp. This tutorial will take you through the basic steps required to create a search feature using the NewsIndex and NewsSearch components. Please refer to the "Core" section of this userguide for information on building your own custom index and custom search.

 

1. Having installed the fCMSPro components as well as the fCMSEasyNews components using the Macromedia extension manager and having installed the back-end, open Flash and start a new file.

Note that while developing you may wish to copy the modules folder from the fCMSBackend folder into the same folder as your .FLA file, this will allow you to test locally.

 

2. Name the first layer on your timeline fMaster. Select frame 9 on the timeline and press F5 to insert keyframes up to that point.

Press Ctrl+F7 (Windows) or Cmnd+F7 (Mac) to open the components panel and locate the fMaster component inside the fCMSPro folder and drag a copy onto the stage. With the component still selected press Ctrl+F3 (Windows) or Cmnd+F3 (Mac) to open the properties panel and give the fMaster component the instance name myCMS. Note that you can position the component anywhere you choose, as it will not be visible when the file is published.

 

With the component still selected press Alt+F7 to open the Component Inspector panel. Locate the fCMS Server Path parameter and insert the location of your back-end installation. Locate the fCMS Modules Path parameter and insert the location of your modules folder.

 

3. Create a new layer on your timeline named NewsIndex. Select frame 5 and press F6 to insert a new keyframe.

Note that it is vital that the fMaster component initializes before any other component. We place content on frames later than the fMaster component to ensure this happens.

Open the components panel and locate the NewsIndex component inside the fCMSProEasyNews folder. Drag a copy onto frame 5 of the NewsIndex layer. With the component still selected open the properties panel and give the NewsIndex component the instance name index_mc

 

With the component still selected open the Component Inspector panel, locate the recordMC identifier parameter and enter the value index_clip which is the linkage identifier of the clip we are about to create.

 

4. Press Ctrl+F8 (Windows) or Cmnd+F8 (Mac) to open the Create New Symbol dialogue box. Enter a name for the symbol and select Movie clip as its type. If the advanced section is not open click the Advanced button to open it. Tick the Export for Actionscript checkbox (the Export in first frame checkbox will tick itself). In the Identifier field enter the name you specified in step 3 for the NewsIndex's recordMC identifier (index_clip).

 

Inside the new clip's timeline press 'T' to select the Text tool and create three textfields. The NewsIndex component will use these fields to display the results returned by the fCMSPro from your database; you can choose to style these textfields in any way that is appropriate for your design. Open the properties panel, select each text field in turn ensuring that they are dynamic textfields, give them the instance names title, date and summary

 

5. Return to the main timeline and create a new layer named NewsSearch. Select frame 5 and press F6 to insert a keyframe.

Open the components panel and locate the NewsSearch component inside the fCMSProEasyNews folder. Drag a copy of the NewsSearch component onto the stage at frame 5.

 

6. Create a new layer named actions. Select frame 5 and press F6 to insert a keyframe. With the keyframe selected press Alt+F9 to open the actions panel and type stop(); This will stop the timeline from playing once it reaches frame 5.

 

7. Save your file. If you have copied the modules folder into the same folder as your .fla you can test the file in the Flash IDE, if not you must publish your file, upload it to your server and test it in a browser. When your file starts enter a word to search your database for in the NewsSearch textfield and click search, the NewsIndex component will then display any results the database returns.

Note your database contains a basic entry on installation. To fully test your search you will need to save more entries for the fCMSPro to search.