ActionScript 2.0 :: Getting Data From Javascript To Flash

Sep 19, 2005

I've built a little test setup that uses ajax to get my data from flash->javascript->php->mysql and back to javascript. I'm hoping to port my poor little web based role playing game into a more effective GUI with drag+drop, animations and all that other good stuff that flash allows. Using fscommand() I can send the stuff to my Ajax client no problems. Works a real treat. But fscommand() returns nothing.

My question is... Am I stuck having to send of a LoadVars request to another php script that's generating XML or formatted vars, or is there a way to tell javascript to pass data directly back to the flash movie?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Sending Data From JavaScript To Flash

Jan 14, 2010

I've got a piece of JavaScript code in an HTML file which detects the height and width of the browser. What I'd like to do is pass the height and width values to Flash. I've followed the Adobe documentation for this using the ExternalInterface class but can't get it to work. For some reason the sendDataToFlash(); function in my JS isn't being called. Here's my code (NB. I'm only trying to pass the height value at the moment as a test):

HTML file with JS:
<script src="Scripts/swfobject_modified.js" type="text/javascript">
</script><script type="text/javascript">
var myWidth = 0, myHeight = 0;
function getDimensions() {
if( typeof( window.innerWidth
[Code] .....

View 3 Replies

Flash :: Persist Application Data Via Javascript Between Browsers?

Feb 23, 2012

I'd like to persist a list of favorited items for all browsers on the user's machine.

Cookies are too volatile, and localStorage, while useful, does not move between browsers.

Are Flash's Local Session Objects my best bet?

View 1 Replies

ActionScript 3.0 :: Loading Javascript Updated Data Into Flash?

Oct 5, 2009

Is it possible to "read" a text from a website that is updated from javascript like currency-quotes on this website directly from flash/AIR?It would be very time consuming to load the whole website each time. Therefore it would be nice to interact directly with the javascript.

View 2 Replies

Flash :: Take A Photo Using The Webcam Then Pass That Data To A JavaScript Function

Feb 17, 2010

I think this is fairly straight forward but my skills lie in JavaScript and Ruby rather than flash so I want to run this past a few other minds :) I have a flash file that will take pictures of the user via their web cam. I want to take that newly created image, base64 encode it then pass it to a JavaScript function. That JavaScript function will essentially take this data then embed it into a hidden form element on the page.

[Code]...

View 1 Replies

Flash :: Arrays - Passing Audio Data ByteArray To Javascript?

Sep 7, 2011

I'm able to record sound with a Flash application embedded in my website, this audio is saved to a ByteArray, which I need to pass to Javascript in order to post to my server along with other required data.

I know I can use AS3 ExternalInterface class to communicate with Flash from Javascript, but what would be the appropriate format or variable type in javascript to hold the ByteArray, and how can I ensure that I won't lose much audio data when doing so?

View 1 Replies

Javascript :: Feed Video Byte Data To Flash Player?

Jan 21, 2012

Is it possible to, using javascript, either create video data on the fly, or more likely download pieces of video data from various sources and feed them to a flash player instance.

Even better, is it possible to feed a html5 video stream from locally executed javascript?

View 1 Replies

Saving HTML Form Data When Running JavaScript Submit In Flash

Apr 16, 2010

I have the following form code in my HTML, basically including a couple of hidden input fields and the Flash object (disregard the missing <object> and <embed> values):

[Code]....

View 1 Replies

ActionScript 2.0 :: Use Data From External Text File For JavaScript Alert Message In Flash?

Sep 14, 2010

Can I Use data from external Text file for JavaScript alert message in flash? I wanted to change the alert message dynamically using the external text file.

1. I created the text file with data as: &Enter=Please Enter

2. And the flash action script i used is as below..

var message1;
message1 = trace(Enter);
loadVariables("temp.txt", "");
getURL("javascript:alert('"+message1+"')");

But this is not working properly. It showing me the alert window but the message it showing as 'undefined'

View 5 Replies

ActionScript 3.0 :: Data From Swf To Javascript

Jun 29, 2009

I now have it so I trace not only the real answer to each question but also what the user punches in and I even have it so that it checks to make sure the user's answer is correct.

What I need now is to find a way to export that data into an html page. I think I can do so with php, but I really need it to go into javascript. Does anyone know how I can send this data, either in a string or as integers to Javascript?

[Code]....

View 0 Replies

ActionScript 2.0 :: Getting Data From JavaScript In IE7

Jan 26, 2007

I'm having a problem with ExternalInterface in IE7/Flash 8: I want to set an ID on a page in JavaScript, then have the .swf grab that ID by calling a function that returns the value. Currently, the JavaScript looks like this:[code]This all works fine in Firefox, but in IE, although getPageID gets called, the value it returns to Flash is always "null".I tried delaying the call by a few frames to make sure everything was loaded, but that didn't help at all.This is hosted on my local Apache install (localhost, in other words), but i tried uploading it to my webserver and that didn't help either.

View 1 Replies

Javascript :: Use HTML/JavaScript And Flash To Build An Desktop AIR Application And Publish It From Flash?

Feb 16, 2011

Is it possible to make desktop Air application by using HTML/JavaScript and Flash?Actually I want to make an Air app (which is for desktop) by using flash and want to use HTML , javascript and CSS as well.Is it possible ?

View 1 Replies

Professional :: Transfer The Data From Swf To Javascript?

Aug 14, 2010

I have a project where i need to transfer the data from swf to javascript, and vice versa, i using flash cs4 and action script 3.0 i can transfer data from  AS to JS without any problem but the other way around doesn't seems to be working i have been trying this from a long time, i even used exact same code from adobe externaInterface example there seems to be some problem.
 
all i want is to transfer data from JS to AS dynamically.

View 18 Replies

Javascript :: Filtering Data In An Array?

Apr 22, 2010

I have an array that has 30 date objects. The date objects are indexed in the array from the minimum date value to the maximum date value. What I would like to do is retrieve only 7 dates from the array. Out of the 7, the first one should be the minDate and the last should be the maxDate, with 5 dates in the middle. The 7 numbers should increment evenly from the minDate to the maxDate.

View 1 Replies

ActionScript 2.0 :: Reload XML Data Using Javascript?

Nov 27, 2008

I have small flash file calling numbers from xml data. Is there a way to reload XML data using javascript? I mean to click on the button and just XML not whole flash reload?

I've seen something with callExternalInterface() but dont really know how to implement that into my code. Here's code of my AS2:

Code:
function loadXMLData(loaded)
{
if (loaded) {

[Code].....

View 3 Replies

Javascript :: Form With Xml Or Excel Data Dropdowns?

Sep 30, 2010

I want to create a form (flash or java/ajax) that allows selection data to be pulled from an xml file.

Example:

A ring builder application - the user selects the ring setting in one dropdown and then they select a diamond in another drop down. But the prices of the diamonds changes every day based upon the market, so we would need to easily update that data - hence an xml or excel file.

It would be even better if the data could be linked - such as selecting a princess cut diamond, then the settings that are only compatible with princess cut show up, and then after selecting a setting, only diamonds that are the right size for the setting show.

View 1 Replies

Javascript :: Libraries For Large Data Visualization?

Feb 16, 2011

Are there javascript libraries that can handle large data visualization? I've seen Protovis, but not sure how much data it can handle. Also, how do Actionscript libraries compare to Javascript in terms of performance?More:I've tried Flare, but seems to be slow for my applictaion. Now I'm yet to figure out if it is the rendering or if it is the shaping of data for rendering. I am looking at interactive graphs like the JobVoyager.

View 1 Replies

Javascript :: Passing Data Into An Adobe Air App Continuously?

Jul 15, 2011

I have an HTML/JavaScript Adobe AIR app which needs to be listening for data coming in from an external process.I could have the AIR app itself invoked by the external process. If anyone knows how this could be done in such a way that AIR would then continue to listen for messages/events from the process which invoked it, then I would like to hear about it.Failing that, can I set up some kind of endpoint in AIR itself to accept data through?'ve experimented with a Native Process, and while having AIR launch the process allows it to read data in, the native process itself to be externally accessible, plus it must be able to write to STDOUT for Adobe AIR to receive.

View 2 Replies

ActionScript 3.0 :: Pass Data To FlashVars With Javascript?

Feb 7, 2009

I am dealing with the HTML page where my flash movie is embedded.

So I have a JavaScript function called getURLVar() that returns a string (a variable passed in the HTML page by the URL). That part works.

What I want to do is call that JavaScript function so I can pass its results into the flashVars property where you embed your .swf.

The following does not work

<embed src="MainPage.swf" flashVars="myFlashVar=<script language="'Javascript'>getURLVar()</script>" quality="high" menu="false" bgcolor="#FFFFFF" width="800" height="600" name="test" align="middle"

[Code]...

View 1 Replies

Javascript :: Insert Javascript Functions To An HTML Document From The Child Flash Swf File?

Jan 29, 2012

I need to execute some javascript string code from flash swf file using actionscript 3.
I read that it could be done by passing the javascript code to the parent html document , using externalinterface.call function. Then I assume it will be faster if I can declare functions in the javascript code in the HTML document in the first use of externalinterface.call funtion ; if flash code calls the javascript code repeatedly. So let me ask you how to do that. For details , any javascript to be loaded is unknown in design time and I can not prepare a javascript file to be loaded.

View 2 Replies

Data Integration :: Get List Of Selected Files From Swf To Javascript?

Jul 23, 2010

i want to make an upload script with swf and javascript. I want to do selecting files via swf then uploading files to server via javascript. I have searched SWFupload plugins but they are not working as i need. I am new here and i do some search, i see it is possible to save list of selected files in FileReferenceList array, but i dont know if is it possible to pass this array into javascript and then make upload progress via javascript ?

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 :: Removing Items From Data Bound Array

Mar 26, 2009

How do I remove an items from a data bound array? My code follows.
for(var i = 0; i < listBox.selectedIndices.length; i++) {
var toRemove = listFiles.selectedIndices[i];
dataArray.splice(toRemove, 1);

Here is my swf. The Add Photos works except when you remove items. [URL]
Add 3 photos different.
Remove 2nd photo.
Add a different photo.
SWF adds the 2nd photo to the end.

Here is my code
private function OnSelectFileRefList(e:Event):void {
Alert.show('addstart:' + arrayQueue.length);
for each (var f:FileReference in fileRefList.fileList) {
var lid:ListItemData = new ListItemData();
lid.fileRef = f;
arrayQueue[arrayQueue.length]=lid;
[Code] .....

View 5 Replies

Javascript :: Facebook Signed_request Data And Some Security Concearns?

Dec 28, 2011

We've just developed a small Facebook puzzle that people win some gifts from our customer. I'd like to ask a few questions since I'm pretty stuck despite tried lots of things. First I'd like to write what we have and then will explain our problems.oot of application (/) checks for signed_request in POST params, extracts information from it to see if we've registered the logged in user into our database. This checks are also used to understand if the request is sent from Facebook or not to prevent requests coming outside of Facebook. (will write why we want this)Once the application is successfully rendered, Facebook JS API takes place, does its checks and sets the fbsr cookie. We use that cookie information while processing ajax requests to check if the request really belongs to the logged in user (e.g.: scores being sent for a user belong to the logged in user).

We implemented CSRF protection and another protection to check if the requests are POST and more specifically AJAX requests and return 40x if not.nd out that some people seem to take advantage of this bug.One way I thought of is to ignore all requests except coming from Facebook. Since the ajax requests are blocked (cross site) we should have been safe. However this leaded to another problem that, once we redirect users to e.g. leaderboard the signed_request data is lost and our index page returns 40x once the user tries to go back since our application thinks that the user tries to visit our application outside of Facebook.

View 1 Replies

Javascript :: Flex - Populate Combobox With ArrayCollection With Data

Mar 7, 2012

I am developing a panel in Photoshop with Flex and Extendscript. I am pretty close to getting this to work, but with my Flex skills I am having a little issue with the Array I am pulling in from the jsx file. The array is displayed fine in the alert box, but somewhere between my split and creating new collection something is wrong.

Here is my Flex

protected function loadData():void {
var grabFolderNames:SyncRequestResult = CSXSInterface.instance.evalScript("labNames");
var list:String = grabFolderNames.data;

[Code]....

View 2 Replies

Javascript :: Passing File Paths From Flash To JavaScript For Upload?

Sep 29, 2010

Is it possible to pass file names from a running Flash application, which only purpose is to enable multiple-file-selection, to a JavaScript application which handles upload of all files to the server?I have examined various Flash upload solutions (like SWFUpload, Uploadify, etc.) and none of them meets my needs. I want an easy to implement solution (like Uploadify) which also lets me specify various parts of the HTTP request.

The reason I need this is because my upload form uses session cookies (for user authentication) and an CSRF token both passed to the server when uploading files.Is it technically possible to pass filenames (+ paths) to a JavaScript application which then handles the upload?

View 1 Replies

Javascript 3 :: Can A JavaScript Function Detect Which Flash DOM Object Called It

May 20, 2011

Here's the challenge: I have a Flash movie which will be embedded in a page using an unknown DOM ID that I want to be able to identify/store for callback in a JS function. My ideal user flow would be: User clicks button in Flash. Flash pauses any animations / video / sounds / etc. Flash calls an injected JS function to display a page-covering overlay experience. When user closes overlay experience, a callback method on the Flash object is called. Flash resumes playback.

The problem is, when AS3 uses the ExternalInterface.call("functionName", args...) method, there doesn't seem to be a DOM event triggered, and thus it is impossible to tell which object called a JS function, so having a "registerMe()" function doesn't seem to work. Basically, the injected JS function has no way to determine which DOM object to call, because the ID of the Flash object is unknown.

[Code]...

View 3 Replies

Javascript :: Flash - Call A Javascript Function From An Embedded .swf File

Apr 16, 2009

I'd like to call a javascript function from an embedded .swf file. Specifically, I'd like to call a function in one of my externally linked javascript files from within: function loadTrack(){

[Code]...

which is in an .as file which I assume somehow becomes the swf file. How would I go about this and 're-compile' the .as file?

View 3 Replies

Javascript :: Cross-domain Browsing Javascript, Silverlight Flash?

Oct 2, 2011

I'm trying to write a web application that searches google and then downloads the result sites and parses them.The search has to be done on the client side. Without implementing a server side proxy.Can this be done using javascript/sliverlight/flash?

View 1 Replies

Actionscript 3 :: Javascript: Calling JavaScript Function From Flash (swfObject)?

Feb 29, 2012

let suppose i have a object named "data" which has a callBack function named "closeItem" which does something. So i have flash file which has a close button. on click of that i am calling this function which closes this item. So issue is? If i pass this "closeItemFunction" as global function this works fine. but if a pass this function as a "data.closeItem" this doesn;t work throwing some falsh error. so i just wanna ask that "does flash only call gobal scoped javascript function" ??

View 2 Replies







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