Loading all text all without variables - SWiSHMax Tutorials
 
  Buy Ebooks, Video Games, DVDs, Electronics and more !
Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads Make Money Online Blog . Free Image and Photo Sharing and Hosting

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Free image hosting
   Web Design Pakistan
   Swish Templates
   SWiSH Climax
   Talkfreelance Community
   Template Desire
   Lite boards
   Script Sector
   GimpTalk
   13dots
   Idea Designs
   PHP Cafe
   Sposatoettore
   Free swishmax templates
   Swishzone

Manage your site with Flax Article Content Management System
Loading all text all without variables
Category : SWiSHMax | Level : Intermediate | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

one tutorials already is for loading data using function loadVariables here
http://www.swish-db.com/forum/index.php?sh...=25&#entry76194

Description:

This tutorial demonstrates you how to load entire text file, even if it does not contain any variable, but you can still assign the loaded data to some swish max variable. This will also display the total bytes of the text file.

This tutorial is based on Object 'loadVars()' not Function 'loadVariables()'

Assumption:
1.you can create a dynamic text box and attach target variable to it

let us get started
steps:

1.create a dynamic text box name the object, and
2.attach target variable to it 'myVar'
3.put following code in main timeline of your movie

CODE
onLoad() {
    l = new loadVars();
    l.load("textFile.txt");
    l.onLoad = function(success) {
          if(success) {
               myVar="Total bytes:"+ this.getBytesTotal()+
                           "\n" + this.toString();
          } else {
               myVar="Eror Loading File..";
          }
    }
}


that's it
you can also test it on your local computer
4.upload textFile.txt and the swf to server and test it.

I hope it helps.
Post replies if you need further assistance.

regards


download attached example

NOTE : if you do not know how to encode special characters please Click here
Download Example


© 2002-2005 Flaxweb Network | Article Manager | Gimp Tutorials Library | RAD C++ Library | Free C/C++ Sourcecode |
Sites of interest : Web Design Blog | Swish Templates | Swishmax Ebook | Photoshop Templates | Gimp Tutorials | Text Forum | Make Money Online