Javascript :: Flex ExternalInterface Callback?

Dec 5, 2011

Flex:

public function callFromJavaScript():String
{
test.label='dfdsfsdf';
return "1";
}
public function init():void {

[Code]...

I have no clue wich one are crossbrowser compatible (cant install IE to test out)I have tried multiple but i cant get them to work(in any browser), im probably using the wrong id, ive been trial & erroring for a couple of hours but i don't have anything working.(i heard there was a problem with ExternalInterface.addCallback on a local file system?, should i upload the swf? < is the flex code right& problem = javascript/html side?)

View 1 Replies


Similar Posts:


Javascript :: ExternalInterface Callback Not Working

Oct 26, 2011

I'm trying to call a function in my ActionScript from my JavaScript, I've managed to successfully do this with another flash file but in the current one it's failing for some reason. I'm using jQuery SWFEmbed, this is my JS code:[code]The ExternalInterface.call work, and the trace outputs true, I have no idea what's going on.If you could also tell me how I can pass parameters to a ExternalInterface callback.

View 1 Replies

Javascript :: Error Accessing Class Variables Within An ExternalInterface Callback

Aug 28, 2011

Here's my actionscript (compiled with mxmlc, embedded into html, and the functions are called with js):

[Code]...

View 1 Replies

AS3 :: Calling A Flex Callback From Javascript

Sep 28, 2009

I have a Javascript API, which should be usable with GWT and Flex. Using the FABridge it is really easy to call Javascript methods from AS3 and vice versa. But when I try to register a callback to an AS3 method in my Javascript API I get stuck. Here is a short code sample:

[Code]...

View 2 Replies

Javascript :: ShowSettings Callback In Flex?

Mar 24, 2010

I am pretty new to flex, so forgive me if this is an obvious question.Is there a way to open the Security.showSettings (flash.system.Security) with a callback? or at least to detect if it is currently open or not? My flex application is used for streaming audio, and is normally controlled by javascript, so I keep it hidden for normal use (via absolute positioning it off the page).

When I need microphone access I need to make the flash settings dialog visible, which works fine, I move it into view and open the dialog. When the user closes it, I need to move it back off the screen so they don't see an empty flex app sitting there after they change their settings.

View 2 Replies

JavaScript :: Passing Object To Flex Using Callback Function

Jul 11, 2011

My web application pass a javascript object to flex application using addCallback function.
when the flex application is in modal dialog in safari browser, the object in the flex application is null and when I open the flex application just in a new window, the object is passed correctly. But, I need the showmodaldialog to show the flex application.

The flex code:
ExternalInterface.addCallback( "handleEvent", handleEvent );
override public function handleEvent( event:Object ):Object {
Alert.show(String(event)); .....

View 1 Replies

Javascript :: Flex - Flash Callback Method Produces Error UNLESS Alert() First?

Jan 11, 2010

I have a flex app and I am adding a callback method like this:

private function init():void
{
ExternalInterface.addCallback( "playVideo", playVideo );
}

[code].....

However if I uncomment and run the alert first. I get no error and it works perfectly.My first thought was that the alert was buying time until the script could execute, so i tried to run the script inside a setTimeout() but did not work.

View 1 Replies

ActionScript :: ExternalInterface - Cannot Access MovieClips From Callback

Dec 4, 2010

Basically, 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?

View 1 Replies

Javascript :: Use Flex's ExternalInterface With IFrames?

Jan 20, 2010

I have a simple html doc with a flex app and an iframe side-by-side (using a 1x2 table).There is a button in the flex app that, when clicked, sets the "src" property of the iframe to a URL by using the ExnternalInterface.call method to call a javascript function "doNavClick(url)".Or that's the idea.When I comment out the iframe object declaration in the html, the call to doNavClick works (I pop up an alert to test)....yet when the iframe declaration is present, it doesn't even receive the call. It's as if the iframe has somehow broken the call dispatching mechanism.Is there a workaraound for this?The problematic code is as follows:

--- Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

[code].....

View 1 Replies

JavaScript :: Does ExternalInterface In Flex 3 Have Data Size Limitation?

Dec 7, 2009

I am using the ExternalInterface on Flex 3. We are actually using flex to compress a large amount of DOM data, so this is specifically being used with LARGE data. To further investigate, if there is a limitation, is this universal? (IE. Silverlight) First, let me state that this is being done with an application that was made by inexperienced software engineers. This is an app that we need to buy time by compressing the data so that we can build a long-term solution. We have no other options, unfortunately. Background: This is an application that is actually a web-spreadsheet. Our long term solution is to make a Office Business Application.

View 2 Replies

Javascript :: How Could The FLEX ExternalInterface.available Check Fail But Still Be Unavailable

Mar 23, 2012

We have several flash objects written in FLEX and being rendered inside a single HTML page.We are using javascript to communicate between the objects and perform other page related operations.

Execution Flow:

In the creationComplete event of the FLEX code of our objects we execute the following (pseudo-ish) code:
if (ExternalInterface.available) {
ExternalInterface.addCallBack("initialize");
ExternalInterface.callMethod("ready");

[code]....

Sometimes the last javascript function outlined is never called. When this happens none of the error alerts appear, the final code is just not executed but everything up to this point has executed successfully.

This happens about 1/100+ times in Chrome/Firefox

This happens about 1/10 times in IE8

This happens about 9/10 times in IE7 (full disclosure - the only machine we have to use for testing this is also much slower)

Since the problem is intermittent and becomes more apparent in slower browsers/machines my suspicion is that it is timing related. If I stop the first flex 'intiailize' call from happening until I click a button in the UI instead of automatically on what is essentially 'creationComplete' everything ALWAYS works.

View 1 Replies

Javascript :: Flex ExternalInterface Not Firing In Safari (works Everwhere Else)?

Aug 7, 2010

I know there have been other questions on getting JavaScript / Flex ExternalInterface to play nicely, but I've what I think is a weird one. It works perfectly in every browser except Safari (on a Mac). Chrome, IE, Firefox - all ok, but Safari, nope it just wont fire.I've copied my code below, can anyone see why it doesn't work in Safari pls ?(the 'are you sure' dialog window appears in Safari but the method in the Flex app just doesn't get called)

Flex code :
if(ExternalInterface.available){
ExternalInterface.addCallback("flexShutdownHandler",flexShutdownHandler);

[code].....

View 1 Replies

Javascript :: Run In Flex Mobile Project - Error #2067: The ExternalInterface Is Not Available In This Container

Dec 21, 2011

From what Ive seen, most of the examples of using Javascript in Flex are designed for for the full desktop version (or for the browser) and not Flex mobile. For example using ExternalInterface in a Flex mobile project gives the error: Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime. Is it possible to call Javascript (such as the Google Maps Javascript API) in a Flex mobile project?

View 1 Replies

Actionscript 3 :: Javascript Callback In Chrome

Jun 18, 2011

I'm making a callback from javascript to a method on my swf. It works in Firefox with no problems, but in chrome the second parameter that's passed is always received as null? I've debugged my javascript and found that everything is working fine and the two values that are passed to the swf are correct at the point where the callback to the swf is made. At first i thought this might be a cross domain issue, but have ruled that out as if it were the case then the method on swf would just not be called at all. The second value is a binary string representation of an image and the length of the string that is passed is 101601, so i'm wondering whether there's possibly a limitation on the amount of data that can be passed? The first parameter is a much smaller string representing the file type and this always gets received successfully.

[CODE]...

View 2 Replies

Javascript :: IE Onbeforeunload Not Firing ExtenralInterface Callback

Feb 12, 2010

I have a Flash movie embeded with swfobject in a html container. Through ExternalInterface I have registered a javascript function to fire callback to my flash app.

ExternalInterface.addCallback("notifyClose", notifyOnClose );

The javascript function is added as an event listerner to fire onbeforeunload.

<script language="JavaScript">
function getSWF(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1){

[Code].....

I have tested in FF and IE. Firefox works as expected but not in IE. In IE I get notified in Flash with the onload message, but not onbeforeunload.

View 1 Replies

Javascript :: External Interface Callback Not Listening?

Jul 14, 2011

I'm trying to get javascript to talk to flash, but I haven't been able to get it to work.I've gotten flash to talk to javascript, but not the other way around. It seems as thought flash isn't listening to the javascript, or I'm doing something wrongPart of the AS3 to initially call the js:

ExternalInterface.call("showGal", slastSelectedNumber);

The js i'm trying to use is:

function showGal(dPicture) {
document.getElementById('fullsizegallery').style.display = 'block';
document.getElementById("flashGalleryContent").someFunctionName(dPicture);

[code].....

View 1 Replies

Javascript :: Reinstate Jquery Features After Flash Callback?

Dec 20, 2009

I have a page that uses the jQuery.swfobject plugin to embed 5 flash items into a page and each flash item has a callback using externalInterface. The callbacks work when I have the js function outside of $(document).ready(function() but the jQuery animations do not fire - the ajax load however does. Does anyone know how to get the animations working too, code below:

function pageLoader(galID) {
$('#menu').hide();
$('#holder_gallery').load("feeds.php", {gallery: galID}, function(){

[code]......

View 1 Replies

Javascript :: Exactly Are Flash External Callback Methods Triggered?

Jun 6, 2010

I have a flash application using callbacks to javascript functions (eg. when it receives some data over a socket, it'll call a js script which would change the content of a div according to that given data).

Afaik, there is no actual mutual exclusion in javascript so I'm not sure if I can/need to simulate something like :

[code]...

So, the question is, when are those callbacks called ? Are they simply queued to be executed right after the browser finishes its task or are they triggered randomly ?

View 1 Replies

Actionscript :: Call Flash Callback Method From Javascript?

Oct 5, 2011

I tried to call a flash callback method from JavaScript. But it seems not working. The flash action script example code is like below [Simplified]:

import flash.events.ActivityEvent;
import flash.events.StatusEvent;
import flash.external.ExternalInterface;

var test_var = ExternalInterface.addCallback("js_method_to_call", flash_method

[Code]...

It is always display the error in fire bug console "flashFile.js_method_to_call is not a function".

View 5 Replies

Javascript :: Soundmanager2 IE Playback - 'onload' Callback Function Is Defined As Null

Apr 5, 2012

I'm currently working with soundmanager2 in an IE/flash context (not html5). The issue is that audio playback of mp3 content does not occur for the following case where the 'onload' callback function is defined as null OR as a function that does almost nothing.

[Code]...

View 1 Replies

Javascript :: Flash - Get A VAR With ExternalInterface?

Nov 5, 2010

I 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].....

View 5 Replies

Javascript :: ExternalInterface Not Working In Ie9

Feb 6, 2012

I am having problems with External interface and IE9. The swf objects play fine but none of the information input is transferred to the cookies that should be set. I have seen that there are other questions similar to this but have not been able to solve my problem using them. THis is the html we are using

<div id="flashcentre">
<object type="application/x-shockwave-flash"data="http://workingflashlink" width="600" height="450">

[Code].....

View 1 Replies

Professional :: ExternalInterface To Javascript/Html ?

Aug 4, 2010

AdobeTV showed a way to allow Flash to "talk" to an HTML page via javascript using the ExternalInterface method. There seems to be a catch. You need to use the ID of the swf in the parameters to have it all fit together and you can only put the ID="swf" into the IE section of the Dreamweaver generated javascript or into the non-IE section. Putting it in both didn't work and the author mentioned only putting in one of them specifically.Is there a way to do this that would work in both sets of generated Javascript?

View 3 Replies

Javascript :: ExternalInterface.addCallback Is Not Working?

Nov 4, 2009

This is my AC3 code

private function uploadet( dosya:String ):void {
var uploader:URLRequest = new URLRequest(dosya);
localFile.upload(uploader);

[code].....

View 4 Replies

Javascript :: Linking Flash To OOP Using ExternalInterface?

Dec 6, 2009

I'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].....

View 1 Replies

Javascript :: ExternalInterface On Loadup With FireFox?

Jun 10, 2010

I have an issue with my ExternalInterface. The way it is currently set up is, on the page load up, a boolean is set to true in JavaScript and then checked by ActionScript constructors (using a timer) until it is true. This marks that JavaScript is ready to get calls from AS3.

At this point, AS3 will add the callback and do some internal stuff, and at the end of the constructor I call JavaScript. So far so good. JavaScript will at this point call a function in AS3 (that was defined in the callback described above), and this is where it all messes up.

On IE this works perfectly fine. On FireFox though, it does not. When I debug it, I see that the javascript function is called but when it tries to call AS3, nothing happens. I also tried to add a timer, but for some reason the function STILL executes straight away (in IE).

[Code]...

View 1 Replies

Javascript :: Can't Get ExternalInterface.addCallback To Work?

Jun 15, 2010

I'm trying to use ExternalInterface.addCallback to allow js to call an as3 method. My code is as follows:

AS:

ExternalInterface.addCallback("sendToActionscript", callFromJavaScript);

function callFromJavaScript():void{
circle_mc.gotoAndStop("finish"); [code]....

It's not working. What am I doing wrong?

View 3 Replies

Actionscript 3 :: ExternalInterface Not Linking Javascript

Jan 25, 2011

None of the similar answered questions fixed my problem, so here it goes. I want to call actionscript 3 function from JavaScript but in FF error console it says that the function I'm calling from JS does not exist. It says functions mover and mout are not defined. Here is the JS functions in JS file

[Code]...

View 1 Replies

Javascript :: Swf In Lightbox Encounters With ExternalInterface When Using IE

Mar 11, 2011

I am having a problem with Internet Explorer and various lightbox programs (PrettyPhoto, TopUp, and Bumpbox). Essentially I want to make a call using Flash's ExternalInterface class from a swf that has been loaded into a lightbox. It works in firefox but not in IE (8). Here is my working example using PrettyPhoto and here is my working example using TopUp. When the exact same swf is embedded in the top of the page the ExternalInterface call works fine (you can click it on that page). But when the swf is opened in the lightbox by clicking the image it will not work in IE.

[Code]...

View 1 Replies

Javascript :: Get ExternalInterface Working With All Browsers?

Apr 12, 2011

I want to call a function inside a Flash movie from javascript, using the ExternalInterface class. The problem is that to get it to work with Firefox I need to use the embed element and with the rest I have to get the object element. To solve it, I gave different ids to that two elements and depending on the user agent I select one or the other:

function getMovie(movieName) {
alert(navigator.userAgent);
if (navigator.userAgent.indexOf("Firefox") != -1) {

[Code].....

This works, but it is not very elegant and it may not work with other browsers..

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved