Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-23-2009, 01:40 PM   #1
madcat
Trying People
 
madcat's Avatar
 
Join Date: Mar 2002
Location: Atlanta
Posts: 269
Default Dynamic Content Scroller (from XML) with Hover State

Hey guys, I've been having a hell of a time trying to do this with a TextArea, so I thought I better try a different approach... any advice is appreciated. With some help I was able to get the links working as they should but i can find no way to get the hover effect (not even the doopingTextArea class)

I have content coming in through XML (a list of words and link)... I'm trying to create a menu where when you rollover the word the entire background area of that menu item changes color. Just like a CSS menu that creates a hover state that fills the entire background area of that item. Since the content is dynamic, it would need to have a scrollbar that expands/contracts etc.

If this was you, what might be an option or scenario to achieve such effect?

Again, any help appreciated!
__________________
http://www.myspace.com/qwl
madcat is offline   Reply With Quote
Old 10-23-2009, 02:45 PM   #2
laurits
Registered User
 
Join Date: Oct 2009
Location: Riga
Posts: 32
Send a message via Skype™ to laurits
Default

Hi,

I think I would make it into a TextField and set the TextField width and height to whatever is necessary according to the amount of text.

Put a Rectangle behind the TextField and add an eventListener to the TextField which does the MovieClip color change on MOUSE_OVER.

Does this make sense in your situation?
laurits is offline   Reply With Quote
Old 10-23-2009, 03:00 PM   #3
madcat
Trying People
 
madcat's Avatar
 
Join Date: Mar 2002
Location: Atlanta
Posts: 269
Default

Thanks laurits, I'm just wondering though... do you mean apply this to one large TextField... or each item from the XML goes into its own TextField?

Also, here's an example of my XML:
Code:
<data>
	<word ID="1">
		<copy>Link 1</copy>
		<link>http://www.google.com</link>
	</word>
	<word ID="2">
		<copy>Link 2</copy>
		<link>http://www.cnn.com</link>
	</word>

        etc...
</data>
> Each link above is put into its own TextField, then the TextField is added to its own Movie Clip. The clips height & width is expanded so that the mouse rolls over it & an image is pulled from the library to create the hover. Everything works so far...

Now all of this is put into an MC called mcMenu.

Since mcMenu holds the XML ... it doesn't expand. My list gets cut off.

If I could figure a way to just add a scroll bar to mcMenu (created dynamically) I could go on with my life

I've found that the UIScrollBar can be added only to TextFields. Can't really wrap my ahead around why you can't do an MC as easily but ya know... nothing is easy I suppose.
__________________
http://www.myspace.com/qwl

Last edited by madcat; 10-23-2009 at 03:04 PM.
madcat 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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:54 AM.

///
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.