(Flash) Dynamic text on buttons? - actionscript-3

In Adobe Flash, I added dynamic text on top of some buttons. However, the dynamic text in front of the buttons blocks my mouse and I cannot click on the button. Is there any way (Any Actionscript 3.0 code I can write, etc.?) I can get the program to allow me to click through the text and onto the button? I also cannot change the dynamic text to static because I programmed my system to change the text based on certain conditions.

Related

ADF RichTextEditor autosubmit doesn't work in Google Chrome

I'm facing a problem when using the RichTextEditor with autosubmit="true" in JDev 12c. The component is added programmatically on a form.
In Firefox the autosubmit fires correctly for any  kind of action (e.g.: typing, changing text style, etc)
On the other side in Chrome, not every action fires the autosubmit. For example, typing some text would fire the autosubmit, but then selecting the text and changing the color or the font size for example, doesn't fire a value change event / autosubmit.
Has anyone else encountered this type of behavior before?
Thanks in advance!
I had the same problem as well, RichTextEditor's text is very difficult to erase the content or reset programatically too,
I advise to use other text tools like the very known RichTextArea:
// Create a rich text area
final RichTextArea rtArea = new RichTextArea();
rtArea .setCaption("My Rich Text Area");
// Set initial content as HTML
rtArea .setValue("<h1>Hello</h1>\n" +
"<p>This rich text area contains some text.</p>");
Then you could resize it to the size of the RichTextEditor and give it the same visual color by some tricks through js and css as usual.

dragging text along with cursor while mouse is clicked angular2

is it possible dragging a text along with cursor while mouse is clicked on angular2? I'm designing a web "painter" app and want to be able to click on a textbox and drag it around the page as long as the mouse is still pressed, like you could do in any simple editing app.
snippets of code or links to websites that have examples would be helpful as I'm a visual learner! Assume I know my way around angular 2 (which I like to believe I do, to an extent)
You dont need angular for this you can do it simply in HTML5 with the 'draggable' property:
<div draggable>My draggable text</div>

Flash - AS3 - TextInput - Slow

I am using Adobe Flash CS6 to create a form that the user fills out. There are 3 text input fields an a submit button. For the text input I am using the TextInput component (fl.controls.TextInput). When the flash first loads the background, labels, and button display and about a second later the 3 text input fields show up. Also when typing into the text fields there is a delay where I can type in something like "92683" and it seems to wait till I am done typing before the characters appear all at once. Any ideas on what could be causing these problems?
I have 2 layers. 1 layer has the button, textinput and labels. The other layer is the background that rotates between 3 background images every 10 seconds.
Try to use compressed bitmap images as background (don't use vectors).
You can compress here: File -> Publish Settings -> JPEG Quality.
If you are creating this in air for mobile phones then,
be sure you set render mode to GPU (Application Settings -> General -> Render Mode : GPU)
Hope this helps!

Losing focus on TLF Text

I have embedded my SWF file to an HTML. I am using a TLF text in my AS3 application for the chatbox, but the problem is that the application loses its focus on TLF text while I switch to other pages, and switch back on my application. Please note that I do not face this problem while I run the SWF file using flash player on my desktop.
I have tried to use following code to re-focus on the TLF text but it does not work on my case.
addEventListener(Event.ACTIVATE, infocus);
function infocus(e:Event):void {
myTLF.textFlow.interactionManager = new EditManager();
myTLF.textFlow.interactionManager.selectRange(myTLF.text.length, myTLF.text.length);
myTLF.textFlow.interactionManager.setFocus();
}
My question is how we can resolve this? because it really bothers people since they have to click on the chatbox every times that they switch to other pages.
There are few ways to do so. You can manually put focus on your desired objects either by:
listening to MouseEvent.ROLL_OVER on your stage make a handler that will return the focus to your text field
if you want to make it to return focus on switch back to the page, you'll need to write a JS script that will tell SWF via ExternalInterface to put focus on your text field.

How to create hyperlink in Canvas

I am able to add given text into canvas using jcollage ( http://radikalfx.com/files/collage-with-text/demo.html) plugin but when user entered a text such as: www.example.com, it should automatically be converted to a hyperlink.
Some body please help how to figure that user entered text is hyperlink and how to find hyperlink position because i am converting that canvas as image and showing in web view in Titanium there also if user clicked on hyperlink i have to transfer it to that page.
That's not as simple as you might think.
The canvas doesn't actually "store" the text, it's just a grid of pixels. It's not aware of elements drawn on the canvas or anything. As such, the canvas can't "hyperlink" a text element.
One of the options would be to add a click event listener to the canvas, get the x/y of the event, and if you hit the text, redirect to the url. To do this you would need to keep track of the text's position (rotation?) and size, manually.
Another, possibly easier option, would be to simply add a element on top of the image that contains the text. Then, you can simply add a hyperlink.
Working example of a link overlaying the canvas
It's not possible.
In order to make a "hyperlink", you would have to create your own box, fill it with text, keep tabs of its position (in 3D -- to make sure that it's not covered by another layer), style the text in a specific format, and THEN check to make sure that if a person clicks on the canvas, and the click happened on the box, AND the box was the top-most layer, that you'd set the user's window.location to be equal to whatever they typed in (if you validated that it was, indeed a correctly-written URL).