Using the standard Flash AS3 scrollbar class - actionscript-3

Flash has a scrollbar class, documented here:
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/fl/controls/ScrollBar.html
However, besides listing functions and variables, there's no real explanation of how to hook an instance of this class to a textfield.
Everything I've tried either ends up in errors or the scrollbar not showing. The documentation lacks a clear way of how you should bind the textfield and the scrollbar toghether, and CS4 isn't providing any help either.
Can someone explain, or link to an example of how scrollbars work with textfield?

if your question is how to attach scrollbar to textfiled in design view
then just add textfiled to the stage, make sure the textfiled is multiline
drag a scrollbar component over it, add some lines to the textfiled then run it.

If you just want a textfield with a scrollbar attached, you can use the premade "TextArea" component which already provides this functionality.

Related

Disable the collapse action from a Material-UI Stepper component

I am building a react site using Material-UI, specifically, the Stepper component.
Is there any way to disable the collapse and expand of each StepContent for vertically oriented Stepper? I want to keep the styles of the component, but I essentually want all content of the stepper to be visible.
An example of a "collapsing" Stepper is here. I simple need to figure out how to disable the collapsing.
I've read the docs back to back and haven't found an obvious way to do this, yet it seems like it should be doable.
Adding TransitionProps={{in: true}} works better and does not produce error in the console because TransitionComponent should to be object, not a string.
It basically sets the collapse component to be always open.
Found the answer Adding TransitionComponent="None" to the StepContent element does exactly this.

Flash buttons flicker continuously when compiled

I am looking for some help with Flash (CS5 version). I have a situation where if try to put a button on the stage with visible differences in the up/over/down/hit states, when I compile the document into a .swf, the button will continuously flicker through each state in order very quickly. Also, if I break the AS3 code in the Main class file, hidden parts of a slider bar component will flicker between visible and not. I'm talking Japanese-style, seizure-inducing flicker here. I've searched my code for recursive function calls and tried deleting and re-adding components and buttons, but to no avail. Any ideas on what could be up?
Well, it seems to me you aren't using stop() to stop the button at the frame you want.
If it isn't this, then there is some error with your ActionScript, which will show up in the output panel, so check that.
When you say 'button' is it an instance of the Button Class and have you set the instance type to Button?
i.e.
Select the button in your library panel, right click and choose 'Properties'. Then set the Type to Button.
Next, select the instance of the button on the stage, open the Properties panel and just underneath where you type the instance name you should see a drop down menu containing MovieClip, Button and Graphic. Set it to Button.

Monodevelop: can't drag widgets

I am trying to use monodevelop. Just at the beginning I came across an issue:
I was following a tutorial on building a Gtk application (http://monodevelop.com/Stetic_GUI_Designer). I was trying to drag a button from the Widgets Palette. Nothing happened. I'd been trying quite a few times without any luck.
After a break I launched monodevelop again and I simply placed a button on the window of the application. After that I removed it, dragged VBox container, and placed menu bar on the window, according to the tutorial instructions. I was pleasantly surprised.
By the second try the same problem occurred - I was not able to drag any widgets. Dragging was beginning, there was a “+” sign at the cursor and then - nothing was happening. I cannot figure out what happened by the first time, what the difference was. Have anyone had a similar problem? Monodevelop looks promising, but I can't go on with it. (I tried placing 'Fixed' container on the window, with no result - I could not drag it.)
(monodevelop v. 2.4, ubuntu 11.04, Polish language.
I did look for an answer to my problem, without much luck, that is why I post this question. The problem is described quite precisely. There is a probability that others encountered the same issue.)
You need to drag a container on the form first before you can add widgets to it. The VBox container is an example of a place where you can put your widgets.
If you want to place widgets where ever you want you can use the Fixed container. If you want things to align you can use the VBox, HBox or Table containers. Placing in a widget in one of the fields will automatically adjust the size of this field to fit the widget you have dragged into it.
So basically,
Create a form
Drag a container on the form
Drag a widget inside the container.
These widgets are not to be confused with the custom made widgets (in your Solution browser, right click the folder User Interfaces and click Add Widget...). These are like forms. I use these to create GUI's in advance so I can call these while the program is running.
FYI: if you want to create code for a widget (like a button) you can't just double click it like in Visual Studio. You need to select it, the go to the properties pane, and change the tab from Properties to Signals. You can then double click the "signal" to create the event for which you want to create code. For a button this is usually the Clicked event (somewhere at the bottom of the list, you'll need to open the Button Signals)
You can always visit the IRC channel of Monodevelop on irc://irc.gimp.org/monodevelop (IRC.Gimp.org #monodevelop)
I also sit in this channel and can help with smaller problems and I also still use Monodevelop 2.4.

What is the best approach to building a popup inside of Flash AS3

I am trying to accomplish an "imagemap" in flash where you click on different areas in the image and when you click on it, a popup (within flash) comes up showing more information about the object that was clicked on. The popup has a close button that can will then close the popup.
My biggest trouble is the way I have my code right now is when you click on a region of the map, it creates a popup on the fly, and then I use addChild(_myPopup) to add it to the display list. The problem with this approach for me, is that the Popup is now a Child of the button I just pressed, but this object organization doesn't really make sense to me. I'd like to have the popup not be a child of the button and it be on it's own layer or a child of the stage directly.
What is a good approach and code architecture for building such an organization of objects? I'm fairly new to AS3 and I've built some small applications but my knowledge is limited.
Thanks
UPDATE
ok looks like calling stage.addChild(myPopup) from inside the button works pretty well. Is this good practice?
Assuming you have a hierarchy that looks something like this:
stage
Main class
Image class
Button
It's good practice to never call upwards in the displaylist, every object only deals with it's children. Events however, are a nice way of communicating upwards. Have the Button dispatch an event, preferrably a custom one, then handle that using a listener in the main class that then deals with creating a popup on top of everything.
An often encountered practise to organize the layers of the visible application is:
stage
main class with all children
popup container
tooltip container
mouse cursor container (apparently not longer necessary since player 10 supports custom cursors)
So you create your popups always in the popup container above the main class. If you would have tooltips, they should go into the tooltip container. This approach guarantees that popups are always visible above the main app and tooltips are always visible on top of everything.

Custom Scrollbar in GWT

I would like to put in my own graphics instead of the OS dependent boring scrollbars for the website I'm building. Is there a way to do this in GWT?
The best solution i found is to create my own scroll panel. The scroll bar is wrapped around a Focus panel. I've added Mousedown, mousemove and mouseout handlers to the focus panel. Recording the mouse movements and moving the contents accordingly.
I agree with Slaks. Best bet is to use the Jquery plugin JScrollpane.
http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html
I have posted my answer in fallowing link GWT CustomScrollPanel example. But this won't work for IE just like gmail.