Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Incorporating Ssi Into Flash, anyone done this?
geancanach
post Jun 5 2005, 09:19 PM
Post #1


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 12
Joined: 31-May 05
Member No.: 5,632



i was trying to find a way to incorporate SSI output into flash, to no avail. Has anyone else every been able to pull this off, and if so how? my primary intended uses for it are to display the number of times files have been downloaded, a orum, and a guestbook. all assistance is appreciated
Go to the top of the page
 
+Quote Post
signatureimage
post Jun 6 2005, 06:52 AM
Post #2


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 51
Joined: 16-April 05
Member No.: 4,048



Dear geancanach,

You might be wondering how a flash (.SWF) file obtains data from remote files.
Flash can obtain external data from:

* External Text Files (*.txt)
* ASP/PHP Files (*.asp,*.php)
* XML Files (*.xml)

The values from these files has to be sent in a format understandable by Flash.
Flash Actionscript has an XML object to obtain data from XML files.
The Flash player loads variables and their values from any of the remote file into its memory and then uses them as required.


How does Flash get external values?

Variable-Value Format:

1. Flash needs to receive the variables and values in the format below:
For a single variable:
CODE
variable1=value1

2. Similarly for multiple variables it needs the same format, but separated by "&" in between them:
CODE
&variable1=value1
&variable2=value2&variable3=value3&variable4=value


Note:
The variable name should be understandable by you as to what it represents and shouldn't include spaces.
Spaces should not be present between the "&" sign, the variable name, and the "=" sign. The values can have spaces.


A. Loading Variables from External Text File into Flash

1. Flash can call any remote text file by using a command in the Actions Panel called loadVariables ('Load/Unload Movie' in Flash 5).
2. Select its 'Load Variables into location' option and give the URL of your file in the URL box provided. The command will now look like:
CODE
loadVariables("your_file_URL.txt","");

Flash - 5
CODE
Load Variables ("your_file_URL.txt","");

3. The values of the variables can be accessed from Flash with the help of the variable names specified in the external text file into any Dynamic text field in Flash.
4. Let the variable name of the Dynamic text field in Flash be called as 'dyn_txt'. The value of the variable can be obtained as follows:
CODE
dyn_txt = variable1;

5. Obtaining variables and their values into the Flash interface from the text file should be done in a special format as mentioned below. This format can be remembered easily as the Variable-Value format

Variable-Value Format (*.txt file)

1. Flash needs to receive the variables and values in the format below:
For a single variable:
CODE
variable1=value1

2. Similarly for multiple variables it needs the same format, but separated by "&" in between them:
CODE
&variable1=value1
&variable2=value2&variable3=value3&variable4=value



B. Loading Variables from ASP/PHP Files into Flash

1. The ASP page interacts with the Database and gets the required data and sends the retrieved data to Flash. Read more..
2. Flash can call any remote text file by using a command in the Actions Panel called loadVariables ('Load/Unload Movie').
3. Select its 'Load Variables into location' option and give the URL of your file in the URL box provided. The command will now look like:
CODE
loadVariables("your_file_URL.asp","");
     (or)
loadVariables("your_file_URL.php","");

Flash - 5
CODE
Load Variables ("your_file_URL.asp","");
     (or)
Load Variables ("your_file_URL.php","");

4. The values of the variables can be accessed from Flash with the help of the variable names specified in the external text file into any Dynamic text field in Flash.

Variable-Value Format (*.asp file)

Flash needs to receive the variables and values in a similar format form the ASP file as shown below:
CODE
response.write "&name=" & fldName & "&email=" & fldEmail & "&mess=" & fldMess & "&date=" & fldDate


Variable-Value Format (*.php file)

Flash needs to receive the variables and values in a similar format form the PHP file as shown below:
CODE
echo "&name=$fldName&email=$fldEmail&mess=$fldMess&date=$fldDate



C. Loading Data from XML Files into Flash

1. The Flash Actionscript object XML can be used to load the XML document returned by the server into Flash.
2. We first create an instance of the XML object and then load the XML document using the load command as shown below:
CODE
getxmldata=new XML();
getxmldata.load("xmldata.xml","");

3. Create 4 Dynamic textboxes with variable names - xmldoc, node_name, topic, author and write the following code in the 3rd frame as given below:
CODE
if (getxmldata.loaded){
         var p = getxmldata.firstChild;
         xmldoc = getxmldata.childNodes;
         node_name=p.nodeName;
         topic=p.attributes.topic;
         author=p.attributes.author;
}

4. The 'loaded' method is used to check for loading of the XML document, if it is loaded the values are retrieved from the XML document through the methods of XML object.
5. The firstChild method is used to reference the first child of the parent node, nodeName is used to retrieve the name of the XML Node.
6. The attributes if present, can be displayed using the attributes.attribute_name by specifying each attribute_name.


More info on: macromedia
More info on: smart webby
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Edit your animated Gifs(7)
  2. full flash sites(60)
  3. Flash Actionscript Zone(6)
  4. Converting Flash Files To Gif(7)
  5. Help! Problem With My Flash-Drive(2)
  6. How Can I Bind Dynamic Text In Flash Animation?(3)
  7. How Do I Create A Good Fire Animation Using Flash ?(13)
  8. Flash Site Software(14)
  9. Question: Vector Based Animation?(4)
  10. Get Rid Of Stupid Flash/activex-warning(4)
  11. How To Connect MySQL With Flash?(8)
  12. Free Shoutbox? HTML, Flash or PHP Code(24)
  13. Free Flash Chat Room(10)
  14. Free Flash Authoring Programs(2)
  15. Free Flash Authoring Programs(7)
  1. Firefox Update(7)
  2. Free Flash Type Programs(4)
  3. Pre Loader Tutorial For Flash(6)
  4. Flash 8 - Game Tutorials?(8)
  5. Tutorial: Dreamweaver, 3ds Max, Flash, Html, Css(8)
  6. Flash 8/actionscript 2, Platform Game (little Help).(7)
  7. Cruzer Flash Drive (usb)(13)
  8. Creating Flash Image/slideshow(2)
  9. Help! Usb Flash Drive(12)
  10. Flash Flash Revolution(0)
  11. Type Checking Not Work On For .. In Loop(2)
  12. Flash Cs3(3)
  13. Great Software For Building Flash Web Sites(1)


 



- Lo-Fi Version Time is now: 5th December 2008 - 12:22 AM