Here are the specifications for the Flash Actionscript project.
Objective: I need a Flash that will read in a text file generated by a dynamic process (technically, the file will only appear as a text file, but for design purposes, the text file will work the same.). I have simulated the output of this files as [login to view URL] The final Flash should be 520x150 px. The Flash should load the data and images from the [login to view URL] file and display them in the display area. Starting with the first record and continuing for an unlimited number of records, dynamically calculated when the Flash loads from the &rows=4 field. In the example, the number of records is 4, but they many be many more. The Flash should display the first set of records (how ever many fit on the screen at one time) then, begin to scroll left to right until all records have been displayed, then start again with the first record. The images and text are should be clickable and lead to a link based on the MLSnum variable in the file. The link is as follows:
$URL = "[login to view URL];+ [login to view URL] + "&line_start=0"; (record 0 is shown here)
The background color will need to be in a layer by itself so I can set it as needed.
The basic code to load the record will look like:
myLoadbleData = new LoadVars();
[login to view URL]("featured_list.txt");
[login to view URL] = function (success) {
if (success) {
for (var i = 1; i< [login to view URL]; i++) {
[login to view URL] = myLoadbleData.Address+"i";
[login to view URL] = [login to view URL];
[login to view URL] = [login to view URL];
pic1._width = 147;
pic1._height = 111;
[login to view URL]([login to view URL]);
}
}
}
The data file contains the following code:
&rows=4&Image0=http://jaxdou.com/images/homes/309234_0.jpg&MLSnum0=0&Address0=3699 Thousand Oaks Dr &Price0=$699,900&Bed0=Bedrooms: 6 Bathrooms: 5&Image1=http://jaxdou.com/images/noimage.jpg&MLSnum1=0&Address1=1928 Holly Oak Dr &Price1=$453,900&Bed1=Bedrooms: 4 Bathrooms: 2&Image2=http://jaxdou.com/images/homes/330272_0.jpg&MLSnum2=0&Address2=3149 Hearthstone Ln &Price2=$399,999&Bed2=Bedrooms: 5 Bathrooms: 3&Image3=http://jaxdou.com/images/homes/321947_0.jpg&MLSnum3=0&Address3=2457 Den St &Price3=$995,000&Bed3=Bedrooms: 4 Bathrooms: 3
&rows=# //the number of rows in the data file.
&Image# //the full path to images to be used. The image size may vary, so Flash will need to set a specific site. I've suggested 147x111px.
&Address# //the address of the record, to be displayed with the picture
&Price# //price to be displayed with the image. No need to format the price, it is preformatted with dollar sign and commas.
&Bed# //bedrooms and bathrooms, to be displayed with the image.
&MLSnum# //MLS number, this is a non-display variable and is used for linking.
Note: Images are always JPGs and are always present. There is no need to verify image links, they can always be trusted and will always be present at the link specified. This is verified when the data file is created.
There is no need to verify outgoing links, they can always be trusted, failures will be handled at the destination.
Any number of rows may be included, but there is some practical limit, which will be handled at the data file, so no need to limit the Flash.
Outgoing links should always redirect to the new page, don't open a new window, viewers will no need breadcrumbs to return to the Flash.
Sample data file: attached
Here is what needs to be done:
1. Create a blank movie clip object.
2. Load the image and text from memory into the movie clip.
3. Display the movie clip object on the screen and have it move across the screen.
4. Go back to 1 until all of the data is used.
5. Start over with the first image.