Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-08-2006, 05:12 AM   #1
abd
Registered User
 
Join Date: May 2006
Posts: 3
Default linking to .txt files

hi
im trying to load a text file into flash so that im not continually updating the flash file.
is there a way of achieving this, also ive been messing around with scrolling text boxes. please have a look at the one attatched and let me know what ive done wrong.(the text doesnt appear)
also, will it be easy to link the txt file to this file?
Attached Files
File Type: zip blogposter.zip (6.4 KB, 117 views)
abd is offline   Reply With Quote
Old 05-08-2006, 05:32 AM   #2
Saroj
Registered User
 
Saroj's Avatar
 
Join Date: Mar 2006
Posts: 8
Default

hi abd ,

i have attached one zip file just check it and try to incorporate the same thing to your work. i dont have time to go thru your code.

I am sure my attached file will solve your problem.

Cheers!
Saroj
Attached Files
File Type: zip Saroj.zip (12.4 KB, 115 views)
Saroj is offline   Reply With Quote
Old 05-08-2006, 05:48 AM   #3
abd
Registered User
 
Join Date: May 2006
Posts: 3
Default

every time i open your file it crashes flash mx?
abd is offline   Reply With Quote
Old 05-08-2006, 12:53 PM   #4
Saroj
Registered User
 
Saroj's Avatar
 
Join Date: Mar 2006
Posts: 8
Default

Because i made it in Flash 8 and i think you are using Flash MX.
Saroj is offline   Reply With Quote
Old 05-08-2006, 12:55 PM   #5
Saroj
Registered User
 
Saroj's Avatar
 
Join Date: Mar 2006
Posts: 8
Default

this is the code:
ms = textbox.Message.maxscroll;
scale = scrollheight/ms;
if (ms>1) {
if (!dragpress) {
textbox.scrollbar.scrollbox._yscale = 300/textbox.Message.maxscroll;
textbox.scrollbar.scrollbox._y = -(scrollheight/2)+((textbox.Message.scroll-1)*scale);
if (!textbox.scrollbar._visible) {
textbox.scrollbar._visible = true;
}
textbox.scrollbar.scrollbox._y = boxypos
} else if (textbox.scrollbar.scrollbox._y<-(scrollheight/2)+1 and move<0) {
move = 0;
textbox.scrollbar.scrollbox._y = -(scrollheight/2);
} else if (textbox.scrollbar.scrollbox._y+textbox.scrollbar. scrollbox._height>(scrollheight/2)-1 and move>0) {
move = 0;
textbox.scrollbar.scrollbox._y = scrollheight/2;
} else {
scrollfix = textbox.Message.scroll = ((textbox.scrollbar.scrollbox._y+(scrollheight/2))/scale)+1;
boxypos = textbox.scrollbar.scrollbox._y = textbox.scrollbar.scrollbox._y+(move*scale);
}
} else {
if (textbox.scrollbar._visible) {
textbox.scrollbar._visible = false;
}
}
Saroj is offline   Reply With Quote
Old 05-08-2006, 12:58 PM   #6
Saroj
Registered User
 
Saroj's Avatar
 
Join Date: Mar 2006
Posts: 8
Default

//to adjust the height you can add:
scrollheight = textbox.scrollbar.scrolltrack._height;

//Already i given you message.txt file so
//To load the text file
loadVariables("message.txt", "");
stop();

//To move UP

on (press) {
if (_root.textbox.Message.scroll>1) {
_parent._parent.dragpress = 1;
_parent._parent.move = -1;
}
}
on (release) {
_parent._parent.dragpress = 0;
_parent._parent.move = 0;
}

// TO move Down

on (press) {
if (_parent._parent.textbox.Message.scroll<_parent._p arent.textbox.Message.maxscroll) {
_parent._parent.dragpress = 1;
_parent._parent.move = 1;
}
}
on (release) {
_parent._parent.dragpress = 0;
_parent._parent.move = 0;
}

// to scroll on the scroll bar (middle bar)

on (press) {
_parent._parent._parent.dragpress = 1;
startDrag("", false, Math.floor(_x), _parent.scrollboxtop, Math.floor(_x), (_parent.scrolltrack._height+_parent.scrollboxtop)-_height);
}
on (release, releaseOutside) {
_parent._parent._parent.dragpress = 0;
stopDrag();
}
Saroj is offline   Reply With Quote
Old 05-08-2006, 01:03 PM   #7
Saroj
Registered User
 
Saroj's Avatar
 
Join Date: Mar 2006
Posts: 8
Default

I converted my Flash 8 file to MX. Go thru the file which will tell how to attache text file in flash.

Sorry! i dont have time to go thru your code.

If you can open my example then you can better understand and can meet your requirements.

All the best...
Bye
Saroj
Attached Files
File Type: zip scrollbestformx.zip (7.4 KB, 101 views)
Saroj is offline   Reply With Quote
Old 05-08-2006, 09:20 PM   #8
abd
Registered User
 
Join Date: May 2006
Posts: 3
Default

thanks Saroj!
abd is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can .exe and .txt files communicate? ADDBear ActionScript 1.0 (and below) 2 11-19-2003 01:47 PM
randomly loading .txt files binkyboo ActionScript 1.0 (and below) 14 10-17-2002 03:03 PM
loading .txt files belzarrath ActionScript 1.0 (and below) 1 03-29-2002 08:23 AM
Need Help Loading .txt files into a dynamic text box gdeleon101 ActionScript 1.0 (and below) 2 02-26-2002 08:48 PM
weird load variables problem between two domains and external .txt files Jessica lucidiastudios ActionScript 1.0 (and below) 9 09-25-2001 06:31 PM


All times are GMT. The time now is 08:30 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.