Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 03:30
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash MX 2004 (Moderators: Flash-db, Musicman, vesa kortelainen, Ronald Wernecke, Andresss, papachan)
| | |-+  2 text boxes 1 scroll bar
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: 2 text boxes 1 scroll bar  (Read 1342 times)
Stonucca
Server what's that
*
Posts: 2


View Profile Email
« on: 04/17/05, 16:02 »

Hi I have managed to get a scroll bar to move 1 text field is it possiable to get it to move 2 text fields

Heres the code

function addItems() {

   myText.multiline          = true;
    myText.wordWrap          = true;
     myText.type          = "dynamic";
      myText.background          = true;
     myText.backgroundColor        = "0x000000";
    myText.border          = false;
   myText.html          = true;

   myText2.multiline          = true;
     myText2.wordWrap          = true;
     myText2.type          = "dynamic";
      myText2.background       = true;
     myText2.backgroundColor        = "0x000000";
    myText2.border          = false;
   myText2.html          = true;

   myText.htmlText = myData.myText;
    ScrollBar.setScrollTarget(myText);
   
   myText2.htmlText = myData.myText2;
    ScrollBar.setScrollTarget(myText2);

   formStyleFormat          = new FStyleFormat;

      formStyleFormat.scrollTrack    = "0x000000";
      formStyleFormat.highlight      = "0x000000";
      formStyleFormat.highlight3D    = "0xffffff";
      formStyleFormat.arrow    = "0xffffff";
      formStyleFormat.face       = "0x000000";
      formStyleFormat.background     = "0x000000";
      formStyleFormat.shadow   = "0x666666";
      formStyleFormat.darkshadow   = "0x333333";
   
   formStyleFormat.addListener(ScrollBar);
   formStyleFormat.applyChanges();
   
   textFormat          = new TextFormat();
   textFormat.color          = "0xffffff";
   textFormat.bullet          = false;
   textFormat.underline          = false;
   textFormat.bullet         = false;
   textFormat.size         = 14;
   textFormat.font         = "arial";
   
   myText.setTextFormat(textFormat);
   myText2.setTextFormat(textFormat);

   }

any help much apprieciated

Ston
Logged
Govinda
Mods
Systems Administrator
*****
Posts: 510

If You Want To Be Big Then Solve Big Problems


View Profile WWW Email
« Reply #1 on: 04/18/05, 00:12 »

You can't give two targets to one scrollbar component. But youcan scroll one text field and onScroller change the other textfields scroll position.

Like:
text1_txt.text "We are pleased to inform you that we shall be opening a new restaurant, `The Spanish Touch', in the posh Greater Kailash locality of New Delhi. `The Spanish Touch' is part of an international chain of restaurants, and has presence in 16 countries worldwide currently (this will be the 17th branch).";
text2_txt.text "We are pleased to inform you that we shall be opening a new restaurant, `The Spanish Touch', in the posh Greater Kailash locality of New Delhi. `The Spanish Touch' is part of an international chain of restaurants, and has presence in 16 countries worldwide currently (this will be the 17th branch).";
text1_txt.onScroller=function(){
	
text2_txt.scroll text1_txt.scroll;
}
Logged

.: Govinda :.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!