Flash :: Access ExternalInterface From QWebView?
Jan 2, 2012Is it possible to access Flash's ExternalInterface from QWebView? If so, how can it be done?
View 1 RepliesIs it possible to access Flash's ExternalInterface from QWebView? If so, how can it be done?
View 1 RepliesWhat is the simplest way to make QWebView recognize and properly load Flash on the web page?
View 1 RepliesWe have a Flash app (AS3).This is a desktop application that runs in our own projector.No Air.The projector is written in C++.The projector gives Flash part an indirect access to Windows API via ExternalInterface.Now we want to let our community to create plugins.Just to let them make a small animated picture with a bit of Action Script 3.A plugin is going to be loaded as external .swf file at runtime.And, of course, we would like our users to distribute the plugins on the net.But, we have a security concern.What if some bad person would take advantage of the indirect access to Win API?I have made a small test.A child .swf loaded into the program tries to call ExternalInterface methods.It turned out the child.swf was able to do this.So every .swf file loaded into our program will automatically has an access to Win API.Downloading plugins for our program becomes as dangerous as an .exe file.Can we forbid ExternalInterface access to the loaded .swf?If not - how would you implement plugin system in AS3 with security in mind
View 3 RepliesI've rarely used AIR in the past, but have call for it now and have a kind of odd situation. A lot of the functionality for the .swf I've made (which needs to be a standalone) exists in a VBScript which the client has provided. if the VBScript can be embedded in an AIR app rather than using an html wrapper?
View 2 RepliesBasically, I have some functions in my as file. Some of them play with a mc instance. The instance is not available when calling the function that uses it as callback.
AS
function B(){
ExternalInterface.call('console.log','ok')//OK!!!
} //italy is a MovieClip on the Main timeline
function A(){ B();
ExternalInterface.call('console.log',italy)//Error!
} ExternalInterface.addCallback('test',A);
JS
$('flash').test();//flash is my html swf object
The error I get trying to reference italy from A (only) whem called from javascript:
Uncaught exception: Error in Actionscript.
Basically, the italy movieclip is available through the AS functions. But it isn't available if I call an AS function from javascript. As you can see though, I see B from A. It's only Italy that I can't see. why?
I am trying to use javascript to run AS3 functions. When I attempt to compile I'm getting an "Access of undefined property" error message. I've read a few things online about this but I'm still not understanding it. I want to have the flash file always listening for javascript.
[Code]...
I am trying to write C++ code to interface to arbitrary instances of flash player 10 contained in arbitrary web pages from IE. All I need to be able to do is:
1) determine if the player is playing,
2) start playback, and
3) stop playback.
I am searching for a way to so this programmatically, without resorting to simulating user input to the control.
I have played around with the IShockwaveFlash COM interface which works OK on some sites but not others (e.g. not on YouTube). I am wondering if it is possible to use IShockwaveFlash::CallFunction() with the appropriate XML string to invoke predefined functions in ActionScript that have not been explicitly exported using ExternalInterface.addCallback().
Or perhaps there is enough functionaly using accessibility and the IAccessible interface?
I need to fetch a flex application from a process in C#.
How can i get access to the externalInterfaceAPI when the flex application is running as a Application?
EDIT: After further reading it looks like it is possible, as from what i understood, a flex stand alone application is a ActiveX "container", so what i need is to get access to the ActiveX container, and from there the externalInterface API.)
I am having an issues with ExternalInterface.call to return a value in IE. It is working fine in Firefox. Eventhough I changed the "allowscript access" to "always", still it is not working. Is there any thing that I need to change in Flex or the HTML to make this work? or this is a security setting in IE?
View 1 RepliesI am trying to use the ExternalInterface.call function in my ActionScript(2.0) to get a javascript var value set in the wrapping document. The following seems to work in FireFox and in Chrome but, naturally, it does not work in IE(8). getting the value stored at this variable?
var linkPath = ExternalInterface.call("function(){return window.customLinkLocation;}", null);
[Code].....
The problem is this: I have an swf embedded in an html. I must call a js function in the page from the swf via ExternalInteface. Ok. But it must work locally, for any user, without doing nothing. That's because this thing must be distributed in cdroms.
View 4 RepliesI'm looking to call a flash method from a method in javascript and recieve a result:Example:Flash -
ExternalInterface.addCallback("getProgress", getProgress) // Javascript to flash
public function getProgress():void {
ExternalInterface.call("getProgress", progress); // Send progress back to javascript from
[code].....
Is there a way to get a list of the exposed functions from a Flash object? For example, you could get a list of all methods in an object by executing[code]...
The only issue is that this won't expose any methods registered through the ExternalInterfaces API. I can try and see if the function exists (object['method']) and it tells me it is a function, but I would have to guess every existing method in this manner..
I trying to pomp showPermissionDialog for allow the user to post something in a friend Wall.I have the flowing javascript code:
<script type="text/javascript">
function showStreamPermissions() {
FB.Connect.showPermissionDialog("publish_stream", doResult);
[code].....
I'm communicating from a flash application using a command like the following: ExternalInterface.call("hello", "world") This is handled on the C# end by something like:
[Code]...
The axFlash_FlashCal is called fine, as long as there is a textbox on screen that's set to use TLF text. (any textbox will do, no specific ID). Without the textbox the even will not fire. (Even though ExternalInterface.Avaliable is set to true) I've tried using CS4 and CS5 to publish, using both Flash 10 and 9 as output.
I'm trying to call a function declared with ExternalInterface in a Flash swf, using JavaScript.It worked once, but all of a sudden, it stopped working.I have a debug version of the Flash Player, but no errors occur in Flash.Not even a "Security Sandbox Error" or something. The only error I get is the following error in JavaScript Error: Error in Actionscript. Use a try/catch block to find error.I'm using AS3, exporting for Flash Player 10 and testing on Firefox 3/Safari 4, on a Mac.
View 4 RepliesI'm using the XSPF music player (the slim version found here [URL], written in AS2) to play through a list of mp3s on a website. I need to make a javascript call each time it loads a track. I'm attempting to do this through ExternalInterface, but so far with no luck. Here's my setup: I'm writing the site on a linux machine which also houses the testing server, but editing the flash in windows. I'm testing the site on the same linux box with firefox 3.0.10. The html and actionscript are posted here[URL]). Does anyone see anything wrong with my code? why it's not working? I feel like it's something in my basic setup...
View 1 Repliesi'm currently trying to call a javascript function and pass values to it. but i'm not really familiar in using the addcallback since i only tested on calling a function from flash without passing anything to the function.
Basically, i'm going to retrieve the values of a node from xml. and then i will assign those values to a variable in flash. now what i'm going to do next is pass this value to a javascript parameter..is it done using externalinterface?
I just need to throw the value to the javascript function parameter and no return values to the actionscript. The event is that whenever an image is click, the corresponding value for each image is passed to the javascript function.
[Code]....
Im trying to use JS to send data to my Flash AS2.0 music player with ExternalInterface, except there are no good tutorials or guides on ExternalInterface that I can find. I want to be able to change the current song in the player by clicking a JavaScript link, and on page / window load without clicking, play a default song.
I dont need a super complicated answer on loading sounds in flash, etc., I am just having a lot of difficulties getting JS to send anything to Flash, and when I get that to work - would I need to put some if / else into the flash to determine if the link has been clicked or not?
[Code]....
I have a SWF file emedded withing a HTML page. Trying to do a simple operation - go to and play certain frame in SWF using javascript. I'm using ExternalInterface to do this but for the life of me can't get the two to communicate. I add all the code but when clicking on the link which calls javascript, it says my flash object is undefined?
[Code]...
Flash has the ExternalInterface class which can communicate to JavaScript running in the browser Can you use the ExternalInterface.available property to check if JavaScript is enabled?
View 2 RepliesI can't call a javascript function from flash, when the flash object is added within an OOP structure in javascript. In short the code:
In flash:
if (ExternalInterface.available) {
ExternalInterface.call("flashMessages", "ready");
}
[Code]....
Flash gets loaded, but the call to the javascript function isn't received.
I have a custom container (C#) for the Flash ActiveX control and am passing data back and forth. Previously I would use ExternalInterface.call and pass an Array as a parameter. I would prefer to use the Vector class now that it is available, but it appears that when I do that the call is never made.
It is however made if it is embedded in IE. It appears that when in IE, Flash will send out JavaScript to execute rather than serializing to XML. My guess is that the Vector XML serialization isn't baked in, so Flash just ignores the call.
Other than just going back to using Array, I've already done that for now.
Can anyone confirm that ExternalInterface works on the file: protocol, or point to some docs that say that it will not?
View 3 RepliesI have avoided adobe products like the plague from when I was developing myself since it costs a fortune to buy and of their products, but big employers love it and pay for it so here I am. Our "Flash" guy just left the team and I inherited this issue. If you read my other post you know what is going on so I will move on. I want to make a simple call from actionscript to my javascript taht is referenced in my other post. I specifically want to call the CheckboxCollection function from inside of actionscript. I don't need to pass it any args or anything of the such from inside of actionscript.
All I need it to do is run that function once the flash is done loading. The javascript function will take care of everything I need, I just HAVE TO HAVE IT called from actionscript to make everything work in harmony. I am in the middle of teaching myself all things adobe and actionscript(much to my dismay), but I really have no clue where top go from here to make this work. I have reviewed adobe documentation, but until I have a better grasp of the language as a whole I am still lost. I copied most of my actionscript on to here, but I did leave out everything that had to deal with mouseover events, since my issue is not about a mouseover and they all work like a charm.
UPDATE: I had to stop working on this to get some other things done, but I am back to step one. NO matter what I do I am having no luck making this work. I have tried all suggestions on here, and tried everything I KNOW how to do, but I am having no luck. If anyone could take a look at this post and the one that I link to (It is the companion javascript for this) and see if they can come up with anything. I have tried so many different iterations of my code there is no use putting all of my trials up for example of what doesn't work,
/*
JavaScript External Calls
*/
function RegisterExternalCalls():void
{
if(ExternalInterface.available)
[code]....
My Flex application generates a sanbox error SecurityError: Error #2060: Violation securtity sanbox : ExternalInterface file:///C:/Documents and Settings/test/Bureau/FPtest/4.5/flashProspectus.swf cannot access file:///C:/Documents and Settings/test/Bureau/FPtest/4.5/flashProspectus.html.
1) this works when I do publish it on the web, does not work when I open the HTML file as file://
2) params.allowscriptaccess = "always";
3) I tested with c:flashProspectus.html (to avoid having SPACES in the file path)
4) in my flex init, I added: Security.allowDomain('*');
5) in my flex init I got
[CODE]..
[URL] BUT it got moved to components (I do understand why) , however, someone in another forum said to look at ExternalInterface to fix the problem above which seems to now be more appropriate to this forum.
I just dont understand how this >>> ExternalInterface / getURL to send scroll events to/from flash, would fix this>>> [URL].
I've got a weird problem with my Flash CS3 in which I can no longer access ExternalInterface.marshallExcceptions. I can place the following code on frame 1 of an otherwise empty fla:
ActionScript Code:
import flash.external.ExternalInterface;
ExternalInterface.marshallExceptions = true;[code].....
I have never had any particular issue with ExternalInterface.marshallExceptions before, and this appears to be CS3 exclusive. I can compile this code in CS5, regardless of whether I try to target FP9 or FP10
I'm trying to have two flash menus talk to one another via ExternalInterface, but for whatever reason the javascript function isn't being called.
I have two menus, topMenu and tabMenu. The idea is for clicking on one to, among other things, send a message to the other.
[Code]...
Obviously I haven't put the code in for two-way communication, but I want to get this working. As of now, clicking the button on topBit does absolutely nothing. No errors from Firebug, and the alert doesn't come up, so goBetween() isn't being called.
AS3 (part of it). Flash Externalinterface VS Internet Explorer
[Code]....