Professional :: JSON.parse Works In Swf, Not In Projector
Jan 12, 2012
I am running flash cs5.5 and attempting to use the JSON calls that are in flash player 11. I patched my install so that I could select flash 11 as the target. When I run in a browser, everything is fine. When I publish to a macos projector, the JSON pieces do not work.
Is there any way to make it work?
Here is my code:
private static function on_complete(e : Event):void
{
trace ("Http on_complete!");
[Code]....
This works as expected in the browser, however in the projector it never gets beyond the ob=JSON.parse call. I can tell where it gets by uncommenting the amount=xxx lines
I cant tell what it is doing because as far as I know the debugger in cs5.5 is flash 10, so it doesnt work for debugging. I am wondering if whatever it uses to cram into a projector file is running flash player 10 as well?
View 1 Replies
Similar Posts:
Feb 19, 2010
I've been developing a fairly simple presentation in CS4, AS3, OSX, which runs as a standalone projector.Everything was working for a while, but now for no apparent reason, any file I publish as a projector starts the Flash Player app, but the projector does not appear or play.Older versions that I had already published will play correctly, but if I re-publish them they do not work any more.
View 2 Replies
Feb 11, 2011
I could succesfully open a external pdf with the following command in Flash cs3 on a Mac: fscommand("exec", "test.app");test.app (inside an fscommand folder) is an apple script that opens the pdf inside the fscommand folder, to make it work I needed to copy the fscommand folder into the MacOs Folder of the Mac Projector File. The same steps don't seem to work with Flash cs5. I can't downgrade my cs5 project to cs3.Is this problem a bug in Flash cs5?
View 9 Replies
Apr 11, 2012
What I want to do is make a get request to this URL: [url]... which should return some JSON and then parse out certain information from it.
How would I go about doing this in Actionscript 3? I'm more concerned with figuring out how to get the data to feed to a JSON parser rather than parsing the JSON, since there seem to be plenty of questions about parsing JSON. The reason I want to do this in AS3 is that I have a 3D flash visualization set up and I want to get this data, parse out the relevant bits, and then display the parsed bits in the visualization.
View 3 Replies
May 11, 2011
I have dates in JSON which are generated from ASP.NET pages using the JSON.NET library. [code]...
How do I parse these with ActionScript from Flex 3 Professional? I'd like to have this in a native data format.
View 3 Replies
Aug 5, 2009
I am trying to return results from my SQL database, using PHP to convert it into JSON, which is then read by Flex. Here is the parse error I receive -
JSONParseError: Unexpected < encountered
at com.adobe.serialization.json::JSONTokenizer/parseError()[/Users/mesh/src/as3corelib/src/com/adobe/serialization/json/JSONTokenizer.as:579]
at com.adobe.serialization.json::JSONTokenizer/getNextToken()[/Users/mesh/src/as3corelib/src/com/adobe/serialization/json/JSONTokenizer.as:168]
at com.adobe.serialization.json::JSONDecoder/nextToken()[/Users/mesh/src/as3corelib/src/com/adobe/serialization/json/JSONDecoder.as:83]
[Code] .....
View 2 Replies
Jun 1, 2011
I am attempting to parse some JSON from a URL via Flash/AS3. Here's my code so far:
> import com.adobe.serialization.json.JSON;
> import com.adobe.serialization.json.JSONDecoder;
>
> var loader:URLLoader = new URLLoader();
[code]...
The trace(loader.data.toString() + "
") outputs a bunch of HTML.
View 1 Replies
Oct 21, 2010
I need to parse a large trace file (up to 200-300 MB) in a Flex application. I started using JSON instead of XML hoping to avoid these problems, but it did not help much. When the file is bigger than 50MB, JSON decoder can't handle it (I am using the as3corelib).
Try to split the file: I would really like to avoid this; I don't want to change the current format of the trace files and, in addition, it would be very uncomfortable to handle.Use a database: I was thinking of writing the trace into a SQLite database and then reading from there, but that would force me to modify the program that creates the trace file.
View 3 Replies
Feb 18, 2010
I am using JSON to parse HTML data with customized html tags in Flex. Flex's support for HTML is pretty minimal, so I am wondering if it's possible to do a simple font color change rollover effect on these links. Currently I have found that Flex only supports a few HTML tags, but also supports CSS through Flex's whack CSS methods. Can I manipulate HTML that is written in my JSON files through an external CSS file? Or better still using a simple tag with the JSON file?
View 2 Replies
Aug 8, 2011
I want to parse JSON string to some my custom object in Action script 3. Is there some libs to do this.[code]...
View 3 Replies
Jun 2, 2011
I have a project whose final deliverable is a Windows projector, but is also published as a swf so the client can proof it remotely online. The projector has the following line of code: stage.displayState = StageDisplayState.FULL_SCREEN; which, of course, makes the projector go to full screen automatically upon launching it. Unfortunately, it prevents the swf from playing at all (not sure why). So I am constantly commenting and uncommenting that line, since I usually publish to both swf and projector. Is there a way to rewrite that so that it works in the projector, but does not stop the swf from playing?
One idea I had was to do something like: "If (I am not a swf) {stage.displayState = StageDisplayState.FULL_SCREEN;}" Or alternately: "If (I am a projector) {stage.displayState = StageDisplayState.FULL_SCREEN;}" I'm not sure this is possible, or, if it is, what the as3 code would be for it.
View 3 Replies
Sep 9, 2009
I'm using Flash MX, AS 2, Projector 6, working on a PC. I saved two versions of my project -- one .exe for Windows and one .hqx for Mac. The .exe works fine when burned onto a CD. When opening the .hqx from a CD on a Mac, I got a message that the file is on a locked volume. I discovered that the reason for this is that an .hqx is essentially a zipped file which has to be extracted, and when a file is extracted, the unzipped files are written onto the same location as the original. When the original files are on a CD, Stuffit (Mac's zip extractor program) can't write onto that location. [So if anyone at Adobe looks at these forum posts, let me say that I think its absolutely ridiculous that the Mac version of Flash's projector files have to be extracted in order to be viewed!]
To get around this problem, I saved the .hqx on my PC, put it on a portable hard drive and brought it over to a Mac (because Stuffit for PC converts it into an .exe for PC), and unzipped it. When I'd test it on the portable hard drive or on a USB drive, the extracted file would work. When I'd bring it back over to the PC and burn a CD with both versions on it, and then test that CD on the Mac, it wouldn't work.
View 1 Replies
Nov 28, 2011
Created an editable flex grid which exposes a method called getGridData() to javascript. I am using the JSON.encode() method of the [url]....library to convert the grid object's dataProvider into JSON before returning it.
ExternalInterface.addCallback("getGridData", getGridData);
public function getGridData():String
{[code].....
However, when I sort a column in the user interface, the encode method is failing throwing the following error
Property usingCustomCompareFunction not found on mx.collections.SortField and there is no default value.
View 1 Replies
Nov 5, 2010
I'm working on a Flash AS2 application that needs to post JSON data to a web service.In previous projects, I've used LoadVars.send() or LoadVars.sendAndLoad() successfully to manage this:
var send_lv:LoadVars = new LoadVars();
send_lv.data = JSON.stringify({some json object});
var response_lv:LoadVars = new LoadVars();
response_lv.onData = function(rawdata) {
[code]....
In somepage.php, I can grab that JSON data using $_POST['data'].However, on this project, the developer of the web service requires the JSON content to be the BODY of the request (i.e., not a name/value pair). Is this possible with LoadVars?
View 1 Replies
Oct 14, 2011
I'm new to JSON. This is the .json I want to decode but I always get this error:
[Code]...
View 1 Replies
Feb 23, 2012
I have a pure ActionScript 3 problem, but the simplified test case I've prepared is in Flex 4 for better visibility (the source code is below): Since Flash Player 11 / AIR 3 support JSON natively, I've decided to move a multiplayer game, which used XML for communicating with server, to JSON. But I have a frustrating problem, that given two Objects like
[Code]...
View 1 Replies
Sep 28, 2011
I am sending a request to a server, and in return I get a long block of JSON.
{
"response":"success",
"assignments":{
"17733":{
"asnid":"17733",
[code]....
Is there a way to do this? I checked if the property was enumerated and it returned true, but I cant find a way to access this data.
View 1 Replies
Dec 13, 2011
I have to work with webservices in Actionscript. I found the following code that allows me to use JSON URLs that implement only the GET method. However, it doesn't work for POST methods (doesn't even enter the "onComplete" method). How can i "POST" JSON data using Actionscript 3.0?
package
{
import flash.display.Sprite;
import flash.net.URLRequest;
[code]....
View 1 Replies
Oct 1, 2011
question 1:I know I can use:var string = FLfile.read( fileURL);to get the content of a text file, but is there a way to read this text file line by linesuch as:var string1=fileReadLine( fileURL);var string2=fileReadLine( fileURL);question 2:Is there a way to parser(or tokenize) the above string?
View 8 Replies
Jan 15, 2012
I was wondering if someone could explain or point me in the direction of how to implement an API that uses JSON in ActionScript 3.0. What I specifically want to know is how would I grab specific information. The following is how I do it in XML but I don't know how I would do something similar in JSON as in getting the equivalent of an XML tag. For example with the twitter API I'd like to grab the text [URL]
[Code]....
View 1 Replies
Oct 27, 2010
I have a reproducible error: I am being forced to fix corrupted flash files that give the "Flash can not parse this document" error. But shortly after I fix the problem, the files are re-corrupted.
Here is how the problem is reproduced: when I update a custom component that is used in other symbols in the library. When a new version of a custom component symbol added to the library, replacing an older version, the symbols that contained the old symbol are corrupted in the XML. This is tedious and time consuming to work around.
View 2 Replies
Jan 26, 2010
Ever since I`ve changed to flash cs4, every windows projector publish I make takes a really long time to open and play an animation.I`ts just very slow. When I created stuff on flash cs3, I had no problems running published projects.
Can anyone help me here? It`s just that I searched for a lot of forum questions just like mine on other web sites and none could . Since your the developers os this product I would like to see what you`ve got to say about this.
View 3 Replies
Jan 30, 2010
I seem to be having a problem with the TransitionManager effects in Flash Projector flash.[code]Where mediaViewer (a movieclip on the timeline) is a TileList component that I extended and...when visible = true Will do a Zoom in transition. The problem is that while the above code works fine in a SWF file it doesn't in the EXE file. The component is not shown nor is there any transition taking place. If I remove the Transition effect it works as expected.
View 1 Replies
Aug 16, 2010
I just downloaded the Release and Debugger updates for the Mac CS5 Flash. However, the zip files only contained the Mac projector. Wouldn't I need to update the Windows EXE projectors as well? When I publish dual platform projectors I would like both to be up to date. How do I update the Windows EXE projectors on my CS5 Flash installation on my Mac?
View 1 Replies
Sep 4, 2010
I would like to know if it is possible to view a PDF document WITHIN an offline Flash Projector.exe? Just like when you have the ability to access the Acrobat toolbar within a web browser.
I have 45 PDF booklets that I can already open from a Flash Projector into Acrobat Reader for printing, but I would prefer not to leave the Flash Projector at all.
View 2 Replies
Feb 27, 2012
I have a Flash GUI loading in external SWFs, published as a projector file and the functionality seems to be working perfectly...however, for some inexplicable reason, when I press Ctrl + F to view in fullscreen mode...the stage snaps to the top left corner.[code]just to see what would happen...the result...well, the above code worked...for about a half-a-second...then the main movie (i.e. the stage) snapped right back to the top left corner.
View 3 Replies
Nov 25, 2007
I have a Mac (intel) CS3 flash fla that I am exporting asprojector. The exported Mac projector and windows exe file will notopen full screen w/o the flashplayer's top toolbar. I have testedthe projector file on Mac 10.4 and Windows XP and all show theflashplayer's top tool bar. The only way to go full screen is tomanually select view/full screen in the player toolbar. I havetried the fscommand("fullscreen", "true"); toggle (true/false/true)workaround w/o any success. Any other workarounds I can try
View 4 Replies
May 17, 2007
I create a projector for Linux by executing a swf file in flash player and chosing "create projector" from the file menu. The initial swf loads external resources (using MovieClip Loader.loadClip for example). In the swf this works fine but in the projector this fails. The projector seems to always execute in the users home directory no matter where it is in the file system, thus to find the external resources the path should be relevant to the users home directory. The problem i now have is that my application will be packaged and distributed on a cd rom. At development time i have no idea of the path to where the cd-rom will be mounted in the end users machine.For what motive does the projector execute in the users home directory and not in its real location?
View 1 Replies
Jul 2, 2009
I'm trying to create a Macintosh full screen projector. Easy, I know.WHY the hell doesn't it go full screen... I keep getting the title bar at the top of the projector.
Windows projector works perfectly.Some software called Zinc will provide me with the solution to this problem but it's expensive and the free version adds a watermark to the file, which is not good.
I'm using the standard... fscommand("fullscreen", "true");
I found a thread which suggests a workaround of adding
Frame 1 - fscommand("fullscreen", "true");
[code].....
View 2 Replies
Jan 30, 2010
I have an instance of an FLV video in a movie clip on the main timeline. Withing the movie clip, I have it masked to fit into a custom shape on-screen, and I am publishing this as a Macintosh projector app. When I view the projector in its native size (1024x768), the masking works fine. But when I switch to full-screen mode (Command-F), the masking disappears, and all I see is the video. It also kind of screws up the navigation from this mc to the next, i.e., the cuepoint stops working.
View 2 Replies