AS3 - Keeping scrollbars on empty ScrollPane - actionscript-3

In my app I'm using a ScrollPane. I can load a DisplayObject into it, and it works fine. The thing is that when it's empty, i.e. I haven't loaded anything into it, there aren't any scrollbars on the pane. This makes sense, since there's no scrolling to do, but I'd like there to be "greyed out" scrollbars if possible.
It's not necessary or anything but most programs have it (open an empty .txt file in Notepad and you'll see what I mean), I'd just like to know if my app can do this.
If it helps at all, it's an AIR app made using FlashDevelop with the open-source Flex 4 SDK. I'm getting my components (ScrollPane, etc.) from a SWC.

Set the vertical or horizontal scroll policy according to what you want.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/containers/BaseScrollPane.html#verticalScrollPolicy
scrollPane.verticalScrollPolicy=ScrollPolicy.ON;
scrollPane.horizontalScrollPolicy=ScrollPolicy.ON;

Related

JavaFX8 external canvas in a pane

My application calls for a canvas to be rendered externally. Imagine a BorderPane where the centre pane is a canvas. This canvas needs to be rendered from a combination of an external .html, a .js and a .css file. My JavaFX app will write these files as a result of what the user chooses in the left pane, right pane etc. of the BorderPane. In other words, much like a paint program, the user can create a design.
Then my thoughts were to execute a browser in the centre pane and use something like liveReload to monitor the underlying file system. That works, but I have no control over the browser window e.g. Chrome in kiosk mode expands to the screen and not to the centre pane.
Then I looked at external renderers such as Mozilla XUL, but that seems to be close to deprecation.
The reason for needing this, is that the final files (html, js and css) will be rendered in kiosk mode by a totally separate system that does not support JavaFX, but does support HTML canvas.
Should I forget about JavaFX alltogether and write the whole app in some other language/system/framework or can anyone throw some ideas into the pot?

Use AS3 to open an swf. in a browser without the browser toolbar (forward / back buttons)

I have developed a very large swf. that will only be accessed in-house. There are over 100 scenes & 10000 frames (I had no idea the project would grow this large). I have developed a navigation system within the swf., but I have found that many users are clicking the forward / back buttons in the browser toolbar (IE8). This is a big issue for me, because the user then has no way to return to the location in the swf. that they were in before hitting the back button. Is there a way to code into the swf. using AS3 to ensure that the browser toolbar is disabled?
Disabling the parts of the user interface that the users are using a lot is a very bad idea.
Instead, simply use the browser buttons for navigation.
SWFAddress let's you do that
You can have deep linking, too. (allows users to send a link of where they are to other people)
Take a look at this answer:
How to make the browser back button work for a Flash-based Website?

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.

Flex Textfield doesnot gain focus when cursor is in text field of iframe

I have a web page which has a SWF file embeded. I have an issue with the focus.
Steps to reproduce:
1)Click on a HTML Text Field which is inside a Iframe
2)Click on a Flex Field.
3)Begin to type some text.
Expected Result is the entered text should go in the Flex TextInput field but the actual Result is it goes into HTML text field.
This is the bug which was filed but closed without any resolution. The workaround suggested there doesnt work. ( bugs.adobe.com/jira/browse/SDK-12377 )
This is happening only in IE 6.0 and IE 7.0. Below is the live example.
http://drumbeatinsight.com/examples/htmlcomponent/iframe/HTMLFrameInApplication.html
Any Suggestions or workaround to solve this problem are requested.
Your browser is maintaining focus instead of giving it back to the flash player. I ran into this issue when trying to 'embed' html content inside my flex app ... accomplished by floating html iframe above the flash player.
I have to hide and restore the iframe if I want to interact with flex because the iframe needs to be on top of the flash player, but all that is easy. I would find, even if I hid the iframe, flash player was never getting keyboard focus back. You need to tell the browser to give keyboard focus back to the flash player.
Now there is no really good way to determine if you need to instruct the browser to give keyboard focus back, I end up executing this javascript on every mouse down, rather inefficient, but it was the only way to gaurentee whenever my user clicked on flash player content, that the browser gave keyboard focus back.
Execute a javascript method that looks up the embeded content by name and call focus().
Basically - document.getElementById('flexEmbedID').focus();
Use the external interface to call that on stage.mouseDown(). Lots of overhead as it executes a lot, but it will fix your problem.

How to Make Flash Builder Package Explorer emulate Flex Builder's Navigator window?

Does anyone know if there is a way to make the new Package Explorer window in Flash Builder emulate Flex Builders 'Flex navigator' window?
Bottom line is I don't always need to peer into SWC's, and I don't like having a 'default package' automatically created for me. Not sure why the interface wasn't made simpler, allowing access to more power and complexity only if necessary. I want to focus on the code, not on how to navigate and use the bells and whistles in the coding environment.
The original "Navigator" view is still available. From the FB menu choose "Window" -> "Other views..." Open up the the "General" tree and select "Navigator" This might put the Navigator window as a tab in the bottom panel (that's where it showed up for me). You can then drag and drop the tab to place it right next to the Package Explorer. Then you can easily switch back and forth between both views.