Welcome Guest [Log In] [Register]
Welcome to Brackenwood. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Argh! @#%ing Flash!; Flash 7 ain't cooperating.
Topic Started: Jun 17 2005, 07:49 PM (131 Views)
KWarp
Member Avatar
Brackenwood Middleweight
Here's the deal, I went through this text tutorial so I could run my website more efficiently through an external text file and flash interface.

Problem is:
-I can't change the color of the scroll bar
-I can't render the text in html
-And it double spaces every new line I make. :yfok:


Seems the text wont show up this way. Click Here and Hope it works on your computer

Download FLA

Someone PLEASE HELP. :worry:
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
KWarp
Jun 17 2005, 07:49 PM
Seems the text wont show up this way. Click Here and Hope it works on your computer

I can tell you now about that bit i just quoted.

When you say textfield.text = .....;
make it textfield.htmlText instead... that will render the text in html format, ie colours, <b><i><u> tags, etc.

as for scrolling, you can make your own buttons... there's a textfield.scroll property i think. In whole numbers, it starts at 0, and as you scroll down further the number increases. so to make scroll buttons or something similar:

buttonup.onRelease = function() {
if (textfield.scroll > 0) {
textfield.scroll -= 1;
}
}

buttondown.onRelease = function() {
if (textfield.scroll < textfield.maxscroll) {
textfield.scroll += 1;
}
}

I think maxscroll is the property for the most that you can scroll... from memory :/
Any probs just post back. :)
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
That solves 2 problems. 1 to go. How do I make new lines single spaced?

Code:
 
t

h

i

s

Is how it is now

Code:
 
t
h
i
s

Is what I want.

Any ideas?
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
erm.. not sure how or why that one's happening...

The only thing that i can think of is if you are using <p></p> tags just try using <br /> tags instead. <br /> means break. ie, not a new paragraph, but a line break.

to use this all you do is put it where you want the new line. just like <br />.. no "opening and closing tags" like <p> </p> etc...

anyway that's all i can thinkey-dinkey of for the moment...
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
Flash seems to double space any new lines I make in the text file, and single space any <br> statements. Single-line paragraphs will be difficult to read, but I suppose I can deal with that. :fpbls:
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
Success!!

New problem though. The little dots kinda stop darting around the screen after 20 seconds or so (I want them to go forever). I can't quite figure out why. Here's the code:

Code:
 
//this code is in the first and only frame of the movie clip file
acc = 20;
newpos = function () {//pick a random spot to dart too
ranx = Math.round((Math.random()*450));
rany = 100 + Math.round((Math.random()*400));
};
newpos();
//dart to the random spot
this.onEnterFrame = function() {
this._x += ((ranx-this._x)/acc);
this._y += ((rany-this._y)/acc);
if (Math.round(this._x) == ranx || Math.round(this._y) == rany) {
 newpos();
}
};

Do movie clips self-terminate or something?
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
ungh.... I can't really tell without seeing the whole project.. :/

Nothing wrong with that code tho..

<edit> Actually looking at it again, I think they might be reaching their destination but not quite, resulting in them moving really really really damn slowly but still just moving none-the-less. Ie they never quite reach their destination so they never have to pick a new one...

In order to fix this change

if (Math.round(this._x) == ranx || Math.round(this._y) == rany) {

to

if (Math.round(this._x) == Math.round(ranx) || Math.round(this._y) == Math.round(rany)) {
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
No dice. The code probably helped, but didn't solve the problem. You were right though, they were just moving really slowly. Good news though, I just lowered the acc variable to 10 and poof it works. :lol:
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
Ummm...

I updated my website with the external textfile. The new text shows up immediately in Internet Explorer, but not (yet?) in Firefox. Can someone explain? :worry:

http://www.kwarp.com
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
I'm using firefox and it worked fine for me :worry:
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
I'm still not seeing it on my own Firefox browser. How bothersome. Maybe it has something to do with how flash "remembers" where it has loaded before.
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
If that's the case try clearing out your cache

(Tools > Options.... Security Tab > Cache > Clear)
Offline Profile Quote Post Goto Top
 
KWarp
Member Avatar
Brackenwood Middleweight
That did the trick. Thanks Vec. Now back to that custom scrollbar difficulty.... nevermind finally got it. :D
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Actionscript · Next Topic »
Add Reply