The general description:
I have a dynamic textfield, where are loaded different contents, on button's
release action.
This contents are a list of link, where any row have an asfunction like link
call.
1st problem.
The textfield is created runtime, with this code:
_root.lists.submain.createTextField("main",1,0,0,300,100);
_root.lists.submain.main.multiline = true;
_root.lists.submain.main.variable = "main";
_root.lists.submain.main.wordWrap = false;
_root.lists.submain.main.border = false;
_root.lists.submain.main.autoSize = "left";
_root.lists.submain.main.html = true;
_root.lists.submain.main.selectable= false;
Since default is Times New Roman font, and I want instead Verdana, I have
add this code:
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Verdana";
_root.lists.submain.main.setTextFormat(my_fmt);
but the textfield show anyway the text with Times font.
Where is the mistake? How can I solve the problem?
2nd problem.
The lists can be very long, but the vertical space where it can be showed is
delimited, so I need to give to the user the opportunity to scroll it. I
want do this without scrollbar or arrows, but just with mouse move.
So, I use this code (applied at mc with textfield inside):
onClipEvent (mouseMove) {
this._y = 0+(_ymouse-this._y)*-0.35;
}
and it works fine. However, this create some other problems.
The mc with textfield to scroll is, by default, at _y 62 on stage. The
buttons that load the text is on its left side, close to it. When the button
is pressed, the mc move immediately, accordling to mouse position - and this
is no good.
Moreover, the top position of mc, after first move, go behind _y 62, and
don't come to this position never more, independently by mouse position.
I should like that, moving mouse, the default position can be reached.
More, the last numeric value of code above can be good for a list, but
not for another, maybe more short...
So, my need (presumably) are:
- a code that can get the high of list and generate the appropriate value
for
increasing scroll
- a way to stop the scroll down, when the top of mc reach the _y 62
postion
- or, otherwise, another solution that give to user the chance to scroll
in other way; something like...
"if _y.mouse is > of X (numeric value, related to stage), scroll mc up, and
if _y.mouse < of Y (other numeric value, related to stage), scroll mc down
but no more down than _y = 62"
Any suggest? Any tip will be really appreciate...
* Enrico Tomaselli
* web designer
[EMAIL PROTECTED]
http://www.metatad.it
* Skype: MetaArt
RSS: http://www.metatad.it/mnfeeder.php
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com