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


Similar Posts:


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

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

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

ActionScript 1/2 :: ShowSettings Event Handler?

Apr 2, 2009

I would like to use System.showSettings(0) up front and trapwhen the user chooses Deny instead of Allow in an onStatus eventhandler as I show in attached code.

View 1 Replies

Flex :: Callback To Model Object?

Jul 23, 2010

I am trying to figure out how to define a callback to my model object, via the Mate Frameworks LocalEventMap.

<EventHandlers type="{WebServiceEvent.RT_GET}" debug="true">
<HTTPServiceInvoker url="/services/rtGet.asp">
<resultHandlers>

[Code]....

I get essentially the same error if I try to make method="model.rtGetHandleResult"

So, in keeping with the presentation model... how do I have the event map get this to the model to execute?

View 2 Replies

Javascript :: MediaElement Player "success" Callback Is Not Being Executed And Possibly The "ended" Event Does Not Fire If Flash Fallback Is Used

Mar 11, 2011

i use the following code to embed a video:

$('#trailer-dialog').mediaelementplayer({
enablePluginDebug: false,
// remove or reorder to change plugin priority
plugins: ['flash','silverlight'],
// specify to force MediaElement to use a particular video or audio type

[Code]...

View 1 Replies

Flex :: Not Receiving Event.Complete Callback

Feb 12, 2010

I created an image uploader for an app I am working on. I first used php for the server side script, and everything worked fine. I found out afterwards I had to use .net, so I created new serverside scripts. The problem I am having is that my event.COMPLETE listener is never firing. I can receive data back using a DATAEVENT listener, but then it stops at this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2036: Load Never Completed.

Here is how I am sending my file.
var fileRefReq:URLRequest = new URLRequest(FILE_UPLOAD_TEMP);
var fileReqVars:URLVariables = new URLVariables();
fileReqVars.subdir = "Temp";
fileRefReq.data = fileReqVars;
fileRefReq.method = URLRequestMethod.POST;
fileRef.upload(fileRefReq);

The file definitely gets uploaded to the first TEMP directory, but then it breaks with the above error.

View 2 Replies

Flex :: Event Listener Callback Not Firing?

Jun 17, 2011

In our app, I am periodically noticing that a particular event handler is not firing. 99% of the time, it works fine, but, every so often, it just dies. How can I find out whats happening? Is the DispatchEvent() not happening/working somehow? Is my listener still listening? Did something else catch the event, and not pass it along so that the 'right' listener can get to it ?

Here's a little bit of the code...

Thats a somewhat pruned down version of what the real code is, but I don't think I trimmed out anything important. The key, as I see it is that we fire up the params dialog, then start to listen for the closed event. Then, we show the param dialogs close function. What happens when it fails is that the trace message "caught close event.." is never generated, and, consequently, the closeHandler is not getting called at all.

View 1 Replies

Flex :: Implement Wcf Callback Functionality In Client?

Jan 26, 2012

I want to send notification from wcf to flex client, how to do as flex client only provides client socket functionality.

View 1 Replies

Flex :: Execute A Callback After A Set Of Asynchronous Service Calls Complete?

Dec 6, 2010

In Flex, I'm making a set of asynchronous calls:

service.method1.send().addResponder(responder1);
service.method2.send().addResponder(responder2);
service.method3.send().addResponder(responder3);

I want to execute some code after all of these service calls have returned (either success or failure, I don't care which). How can I do this?

View 1 Replies

Flex :: Pass An Extra Parameter To Callback Event And Have It Evaluate Early?

Jun 30, 2011

For example:

for(var i:int=0; i<someArray.length; i++)
{
var loader:Loader=new Loader();
loader.load(new URLRequest("http://testurl.com/test.jpg"));

[Code]....

The second paramter (i) for imageLoaded is always 1, I guess because i no longer exists and is defaulting to 1. Is it possible to get that second paramter to be evaluated when the load is started rather than on complete?

View 2 Replies

Actionscript 3 :: Flex Adding Event Listeners With Callback Functions Which Have No Arguments

Jun 10, 2009

fileReference.addEventListener(Event.COMPLETE, uploadCompleteHandler);
private function uploadCompleteHandler(event:Event):void {}

Above is one way to add an event listener in Actionscript. By default the callback function needs to have an argument with name event and type Event. Is there a way to declare this function without any arguments :

private function uploadCompleteHandler():void {}

Edit : It's possible to add an event handler without any arguments in mxml. So one student wanted to know, why isn't it possible to do the same in actionscript?

View 2 Replies

Flash :: Flex - Registering A Function As Callback Using CreationComplete Event Fail On Linux?

Jan 13, 2011

I have created a flex project on flash builder 4. In the MXML I have

xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init();"

And to check if it runs

[Code]...

View 2 Replies

Flex - Delay A Screen Component To Be Drawn Until HttpService Response Callback Returns?

Jun 4, 2011

I have a Group screen component with some Path elements inside. The Group has a (default) style, and the Path has a (default) stroke. When the program starts, (on initialize) loads from a server (via HTTPService) some data that includes different styles for the Group, and it may also include different color/width for the Path stroke. If the styles/stroke attributes are not included in the server response, then the component will be shown with the defaults.

[Code]...

View 1 Replies

Javascript :: Unable To Communicate With Javascript From Flex After Dymanically Loading A Swf?

Aug 1, 2009

for some reason, whenever I dynamically load a swf on a $(document).ready() by writing to a div, I am unable to make javascript calls to the browser. Specifically, all calls to the browser return "null". This does not occur when embedding the swf normally on the page load, but I would like to prevent loading of the swf until a specified point in time.

What the heck is going on here? Is there something special about dynamically embedding a swf that prevents the swf from talking to the browser? The methods ARE called (I've proven such by showing alerts), but all return values to any function, regardless of type returned, shows as null when it gets to flash.

View 3 Replies

Javascript :: Best HTML/JavaScript Framework For A Flex Application?

Oct 23, 2009

We're currently building a Flex application using the PureMVC framework with a shell.swf which loads/unloads modules dynamically. We're experiencing issues with memory and we're looking to replace the shell.swf with a JavaScript-based loader.Two questions:What would be a good framework to dynamically load the Flex components and allow the modules to communicate between each other?Would dynamically loading/unloading the modules via JavaScript take care of the typical memory problems associated with Flex/Flash applications?

View 1 Replies

Javascript :: Flex Datagrids - Alternatives In Non-flex/flash Environment?

Jul 29, 2009

I did some work that used Flex datagrids previously. It was smooth for the users and developers alike.

In my current project, I have to implement the same grids but not using Flex / Flash.

I have taken a look at extJS and YUI but they don't seem to measure up.

Are there other packages I should be looking at ?

View 3 Replies

ActionScript 1/2 :: Callback For Xml-rpc Module

Feb 12, 2010

I am integrating a flash module with Drupal using XMLRPC module. I am currently calling a node.save on Drupal(which creates a page in drupal), using Actionscript 2.0. On a flash button click, I am currently calling the node.save function. But ideally, I would like the function to be called first and only after the success of node.save, forward to the confirmation url. Right now, I am being forwarded to the page even without node.save being completed. I then have to refresh the page in order to see the results.

[Code]...

View 3 Replies

ActionScript 3.0 :: Callback Functions Bug In OsX 10.7 Cs5

Aug 3, 2011

My as3 code ( build in cs5 osX 10.6 )  doesn't work in flash cs5 osX 10.7!
 
When I store a callback function in a parent class variable the refrence is weak and no more avaiable for other calls!
 
exemple:
 
parent class:
-----------------------------
 
public class Foo
{
protected var _fct:Function;
}

[Code]....

View 1 Replies







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