Solved

flash keyboard access html form

Posted on 2012-04-02
15
343 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Add 'birds singing' to homepage 5 100
bandwidth 5 67
Renaming file after uploading in Coldfusion 4 221
Problem witih Adobe Flash Player with a W7 machine 21 51
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

910 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

25 Experts available now in Live!

Get 1:1 Help Now