Solved

flash keyboard access html form

Posted on 2012-04-02
15
367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

729 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