?
Solved

flash keyboard access html form

Posted on 2012-04-02
15
Medium Priority
?
374 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 1000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

765 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