Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
RE: Scrollpane problem

RE: Scrollpane problem

2004-02-24       - By Nivesh Rajbhandari

 Back
Here are a few suggestions if you are using an MX2004 ScrollPane:

ScrollPane has a .content property which returns a reference to the loaded
content. It looks like you are trying to access the text field in the
loaded content incorrectly. If view_swf is the instance name of the
ScrollPane, then view_swf.txt_field1 is undefined.
view_swf.content.txt_field1 is what you want to access.

ScrollPane also has a "complete " event to signal that the content has been
fully loaded. You could have a timing issue as well. Maybe you are trying
to set a control 's value in the loaded content before that control is
available.

Try the following example:

_global.greetingText = "hello ";

// define a handler for the complete event
CompleteObj = new Object;
CompleteObj.complete = function(eventObj)
{
   //eventObj.target is the ScrollPane which emitted this event
   eventObj.target.content.textfield1.text = greetingText;
}
myScrollPane.addEventListener( "complete ", CompleteObj);

// toLoad.swf has a dynamic text field with the instance name textfield1
myScrollPane.contentPath = "toLoad.swf ";


-Nivesh

-- --Original Message-- --
From: Sajid Saiyed [mailto:SajidS@(protected)]
Sent: Tuesday, February 24, 2004 7:32 PM
To: 'flashcoders@(protected) '
Subject: RE: [Flashcoders] Scrollpane problem

'txt_field1 ' is an instance name and it was a typo error, i am refering it
as view_swf.txt_field1.text=_global.text1;

I want to know wether is this the right way to go about targeting a text
field inside a scrollpane??

--sajid

=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:105103
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)