This tutorial will explain how to import your comments in Flash
Credit Goes to Chris for this php file! Thanks!
Comments in Flash will only work if you have the .php file and .swf file on the same server. The hard part is finding a server that is free, not filtered by myspace, and works with PHP.
If you do not have your own server then you can make your comments with the method below and upload them
here. Or you can use
Cope's Method and upload to his server.
Upload to Given Server
1. Download the
.fla file
2. Customize the look of the comments however you see fit with the instructions below.
3. Upload file to server and place given code into your profile.
Upload to Your Own Server
1. Download the
.fla file
2. Copy all of
this text and then save it as flash_comments.php
3. Upload the .php file to
a host the supports PHP and get the URL for the file.
4. Open up the comments.fla file then on the main time line click on the first frame and press F9 to go to your actions layer.
5. On line 27 of the code
xmlData.load("
url_to_your_PHP_file.php?id="+_root.friendID+"§ions=comments");
enter the URL for your PHP file where the
Black Bold is
In your embed code for your flash file, you must add the following parameter:
flashVars='id=
FriendID'
**Common Problems**
Problem: You cannot open up the .fla file
Solution: The .fla is for Flash 8 or newer. You must have one of those versions of flash to open the file
Problem: Your comments will not load (undefined)
Solutions:
1. If you are using your own server then it might not support PHP
2. Your profile MUST BE PUBLIC to everyone
Customizing
This section of the tutorial will cover the basics of customizing your flash comments so that they can change from this default version:
to a customized version such as this:
Please refer to the following diagram for the naming of each element.
All elements listed below can be found in the library of the .fla file. All instances will begin with
edit -.
Bg
Go inside
edit - bg then select the shape and change its color to whatever you like.
Scroll Bar
Go inside
edit - scroll bar then select the line and change it to whatever color and height you like.
Dragger
Go inside
edit - dragger then select the shape and border and change its color and size to whatever you like.
Comt Text
Go inside
edit - comments and on the
comment txt layer, select the dynamic text box and change the text size, font, color, and alignment to whatever you like.
Name
Go inside
edit - comments and on the
name txt layer, select the dynamic text box and change the text size, font, color, and alignment to whatever you like.
Divider
Go inside
edit - comments and on the
divider layer, select the line and change it to whatever color you like.
Comt Bg
Go inside
edit - comments and on the
bg layer, select it and change its color to whatever you like.
Numer of Comments Showing
Go inside
edit - number and on the
actions layer, press F9 to open the action panel and on line 2 while (i <
25)
Edit
25 to be how many of your comments display. This can only be a maximum of
50 other wise you will get undefined results.
"name" Said
Go inside
edit - number then select the comment movie clip and hit F9 to open the actions layer.
Then on line 5 postedText_txt.htmlText = _root.commName[nameVar] + "
said"; change the text in between the quotation marks to whatever you want.
Comment Scrolling Height
Go inside
edit - height and on the
edit - height layer, make the mask visible and change its size to however big you want the comments to be. The size of the mask is also how far you will be able to drag the dragger up and down.
Now to make this look better, go inside
edit - scroll bar and resize it to be the same size as the height mask.
If you are planning on having the comments be in an .swf by themselves then don't forget to resize the document height and the
edit - bg height as well.
Loading Comments Text
Go inside
edit - height and on the first frame of the
loading comments layer, select the text and edit the size, font, color, and alignment to whatever you like.
Thank you for reading this tutorial. I hope you find it very helpful with your flash animations. For any help with this tutorial or questions, please post only in this forum thread.
Thanks again to
Chris for the PHP file!!
~Flash Mods