Solved

flash keyboard access html form

Posted on 2012-04-02
15
337 Views
Last Modified: 2012-08-13
How can I set a bridge between my flash key pressing function to a html form?
0
Comment
Question by:Angha110
  • 6
  • 5
  • 3
15 Comments
 
LVL 11

Accepted Solution

by:
petiex earned 250 total points
ID: 37801440
Assuming your html form and swf file are on the same html page, you can put a javascript function on that page to do the form interaction, and use the ExternalInterface call() method to invoke that function.

 http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html
0
 

Author Comment

by:Angha110
ID: 37803171
Thank you for responding. But my flash is not on the same html page (unfortunately). I have an AIR application (my keyboard is there) which can call html pages in it. I want to be able to use my keyboard (the flash keyboard) to fill up the form. Sorry, I should have been more clear on my question.
0
 
LVL 11

Expert Comment

by:petiex
ID: 37805748
It turns out I was wrong about the swf needing to be on the same page as the javascript . . .
From the ExternalInterface docs:
Note for AIR applications: In Adobe AIR, the ExternalInterface class can be used to communicate between JavaScript in an HTML page loaded in the HTMLLoader control and ActionScript in SWF content embedded in that HTML page.
I'm not sure that solves your problem, unless what you mean by "call html pages in it" is by using HTMLLoader, which, actually, I'll bet that's what you mean. Is it?
0
 
LVL 11

Expert Comment

by:petiex
ID: 37805788
Shoot, never mind. They're talking about the swf in the html in the html loader communicating with javascript, not the AIR application communicating with the javascript in the loaded html. I'm dizzy now.

The only other idea that presents itself is passing the characters that you enter using the AIR keyboard to the html page in a query string, reloading the html with every keystroke. Is that feasible?
0
 

Author Comment

by:Angha110
ID: 37817190
Please note that I don't have any control on the html page where the form is. I am loading that html page to my program. So, just to be clear, that html page with the form could be any body webpage. SO I can not put any code on it. The flash part is mine and I do have control on the keyboard...
0
 
LVL 37

Assisted Solution

by:CyanBlue
CyanBlue earned 250 total points
ID: 37843988
I want to say that it is not possible for your AIR app to fill up a form in some other site.

CyanBlue
0
 

Author Comment

by:Angha110
ID: 37844030
Thank you for your opinion.
But, I believe everything is possible if you know the right way to do it.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 37

Expert Comment

by:CyanBlue
ID: 37844055
Don't we all dream about that?  But the reality can be different than what we hope for because sometimes it is hard to define what is right way or not.

Love to be proven wrong at any case.  :)

CyanBlue
0
 

Author Comment

by:Angha110
ID: 37844192
I agree, but I would like to do more research before giving up just based on your opinion.
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37844249
Oh, I hear you.  I am only answering based on my knowledge and there always are more information that I am not aware of.  Just make it in a reasonable time and we are all good.

CyanBlue
0
 

Author Comment

by:Angha110
ID: 37844326
As far as the Expert Exchange policy goes,  What should do with this question?
Closing it? accept your answer as a solution?

Please advice!
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37844690
I believe we have two weeks to determine the faith of the topic.  If the topic does not get resolved in that time period, it goes into the cleanup queue where cleanup volunteers will decide what is appropriate closure of the topic.

So, why not take a week and see if you can find anything other than what petiex and I have said.  You can decide what this topic should be after your research.

Generally speaking, if you find the topic useful to you one way or another, you'd want to split the points.  If you find the answers not helping you at all, you'd want to close it without awarding points.  If you decide not to take any action, you are leaving the cleanup volunteers to take care of it.  It's all up to you. (Mind you that I happened to be the cleanup volunteer for this topic area.)

Well, good luck with your research.

CyanBlue
0
 

Author Comment

by:Angha110
ID: 37844719
Thank you for taking the time giving me these information.
Your help/tips are always appreciated.

Best Regards
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 37899134
I think that's wrong.  I've spent some time to see if this is possible and I am sure you've done the same.  
I know that it is possible to do what you are asking if you have an access to the target site and have power to update it with JS, but you do not have an access to those, so my answer is that it is not possible.

Now, you are saying that it there might be a solution to this so you are just closing this.  That sounds like this question: Does the tooth fairy exist?
I know it does not exist because I have not found a single dime under my pillow. But you are saying that I might be wrong because it might just be the case where I've been a bad boy.  

Well, you can keep your hope as high as you can, but the record should say that your answer is that it is not possible until you provide the actual fact not just hope.  That's my 2 cents.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now