Flex :: When Add A Valid Statement To Code It Will No Longer Compile
Nov 22, 2011
I am having a problem with my build. When I add a valid statement to the code it will no longer complie and it fails with errors from an unrelated file.I experience these issues building with ant or building with mxmlc on the command line.Adding a valid statement to an myLittleBox.mxml will cause this error.All the errors are in ViewerMain.mxml.This file is not the main mxml file but it is referenced from the main mxml file.Before changing myLittleBox.mxml ViewerMain.mxml had no compile errors.There are no errors related to myLittleBox.mxml myLittleBox. mxml has no references to ViewerMain and only uses spark components ViewerMain.mxml has no direct references to myLittleBox.mxml. Its children's children's children would have a reference to myLittleBox.mxml.The valid statement added to myLittleBox.mxml could be many things (they all break it) including a comment.[code]
I noticed that the Model was using a constant in Viewer 1.This was causing all of Viewer 1 to be built when Viewer 2 is built.I moved the constant from Viewer 1 to the the Model (where it really should have been anyways) and my project built successfully since Viewer 1 and Viewer 2 were not being built at the same time.It makes sense that this would resolve the issue however this is just resolving a symptom of the issue.I am still very curious what was causing the the compiler to fail on ViewerMain.mxml when I add a comment to myLittleBox.mxml.I guess that it will remain a mystery for now.
Most JavaScript code is also syntactically valid ActionScript 3.0 code. However, there are some exceptions which leads me to my question:
Which constructs/features in JavaScript are syntactically invalid in ActionScript 3.0? Please provide concrete examples of JavaScript code (basic JavaScript code without DOM API usage) that is NOT valid ActionScript 3.0 code.
I would like to tak emy existing AS3 or Flex project and compile it to run on native C++ code. Is there a way to do this? What sort of solutions exist? I do not want to change my AS3 code.
I am using Flex Builder 3, working on a PC. Everything was working as expected throughout my first day of code updates, but on day 2 Flex started behaving badly.The problem started when I removed a component, and then got an error that it couldn't find the specified component in some accompanying AS3 code. No problem, I updated the reference so it wouldn't look for the old missing component (a form item). When I compiled the project in debugger to check my work, it failed when it got to that part, and gave an error that it couldn't find the component I'd removed. However, my code had fixed the problem, and the error was referencing a line of code that wasn't there any more. I proceeded to change the file around greatly, and even resorted to creating a new file, changing the name of it, and then recompiling it. I did a clean compile as well, rebooted my machine, restarted Flex, but every time it gives an error referencing the bit of code that isn't even there any more. It's as if it's loading a cached project each time (both in debugger and run mode).
For reference, here's the error I'm getting: ReferenceError: Error #1069: Property Winter Cost not found on views.PopupUsage and there is no default value.Well, the file "PopupUsage.mxml" doesn't even exist any more and is not referenced in my project at all, but it's still being referenced by Flex when I compile the files.What can I do to make Flex move on and look at my code?
This on release code has two getURLs and Google Analytics seem isn't tracking the "clicked" ads. I'm wondering if more than one getURL in an event function a valid code or it doesn't work that way? What's alternative solution if this code is not valid?:
Is there a clean and efficient way to import documents in a flash presentation?I have a big number of doc documents to import in a flash presentation and i'm wondering what's the best way to attach them. I've worked passing them to HTML before, but the doc to HTML conversion is messy, ugly and doesn't output valid HTML code, besides, it's a chore to clean the embed CSS style the conversion leaves inside the code. is there a library that allow to use a more portable format? if not, is there a clean way to convert a doc file to valid html code?
I had a forum up a few months ago, and got help getting radio buttons to work with a continue button, causing the movie to gotoAndStop at a particular frame. (This is all being done on the main timeline).Everything was working fine, now, I keep trying to do it again, but regardless of which button I click, it only goes to frame 2 where the Novice radio button is supposed to go.I think the problem is in the line of code that reads:varframeNumber=2+Number(noviceButton.group.selectedData)I know it is set to only go to the novice area, but my understanding was that since these were radio buttons, any button clicked would work, and I only needed to type in one of the unique instance names
Here is the code: stop(); continueButton.enabled=false
There is probably no way for this but does anyone know a method of excluding certain functions from a build by use of a meta tag and or compiler option?I want to expose some functions for testing but not have them bloat the application on production. I could create separate testing classes and test for a complier directive or option and only load them if necessary but I like the idea of having the test function on the actual object (in the class).
I have a container movieclip called cont_mc then inside that I have a series of pins which are called pin1_mc then inside the pins I have a final movie clip the size of the pin head to act as the hit state.You can see what I talking about here: http:[url]... Before I had the pins in the container movie clip I was able to bump them to the top of the display list using this code in the on over function.this.setChildIndex(event.target.parent,this. numChildren-1); Now I have wrapped them in the container mc this code no longer works and I get an error, must be a child of the caller?How can I change this?
Changed AS3 defualt linkage to merged into code, and now my flash file will not load into firefox. It works fine in Chrome, but IE8 and firefox site at frame 1 of my movie, and no code is executed. Works perfectly in chrome. What do I do?the reason i changed to merged into code is because i made an imbeded preloader, and using preloader method as custom preloader loop and setting default linkage to Runtime Shared Library (RSL) borks the file.
I've just finished my work. When I publish or export the file to an swf, it doesn't 'render' the actionscript 3.0 code to an SWF file. So, I've hidden the movieclipes by using the dot syntax. movie-clip.visible = false;, for example. But everything is visible, because its not taking in consideration the actionscript code in frame 1.
i want to check in Adobe AIR if given regex is valid. I'm looking for somtehing similar like here: How to check if a given Regex is valid?
I dont want to compare regex and text-value - i jus want to check if this regex is valid. If someone type invalid regex - for example: "x{5,-3}" or "(((^^$$$)//)" or something like this i just need to communicate to him that this regular expression is not valid - its not proper regular expression.
On my network I have a couple of pc's all running a bespoke server which will return the username of the person logged in when queried.I have the following piece of code.
private function LoopAndList():void { var loopSocket:Socket; var fourthOctet:Number = 6;
[code]....
Now when this runs it doesn't work as I first thought. The iterations go though. the fourthOctet value is decremented. But somethinjg strange happens. You will notice in the above code that I have a hardcoded IP address in the loop. I have put this there to ensure that there is always a valid connection. So am aware it will always be connecting to 192.168.0.4.
But the connection only happens on the last connect call.
The ouput is:
192.168.0.6 Connecting to 192.168.0.6 192.168.0.5 Connecting to 192.168.0.5
i am working with actionscript flex and using UIcomponents i need all the valid arguments for this function for example component.setStyle("borderColor","white");
i need all valid strings for first string parameter and 2nd valid argument for there value setting,
i have some of them that are given below but i need all possible values for this function
I have some code on the main time line which basicially just says when this button is pressed go to this frame indicated by the frame label. In this case "answer". This is done inside a movie clip, which isn't on the main time line.
I've been searching extensively for a way of converting from ordanance survey coords to valid esri coordinates. I've found quite a few pages that convert to lat long (if a little off) but nothing to convert to esri (which I believe is utm.)This is for use in python or JavaScript / actionscript etc - I'm not too worried about syntax more an understanding of the maths involved.
what's the easiest way to cut string in Flex ?I mean, I have a sequence of urls, I want them at most 60 characters length. If they are longer they should be cut and "..." should be added at the end.
I'm pretty new to Flex. Basically, anything I try to build with mxmlc fails to run now, giving me the above three errors depending on what I do. It was working 30 minutes ago, I've been spending that time trying to figure out what has changed. I redownloaded the Flex SDK, cleared my assetcache, have cleared Firefox's cache. (I'm using Linux.) Even if I compile with -static-link-runtime-shared-libraries=false, since it seems like #2048 is a RSL problem, it still refuses to run.
Another strange thing, if I keep <policy-file-url>[URL]> <rsl-url>textLayout_1.0.0.595.swz</rsl-url>
In my flex-config file, then firebug tells me that my swf file is trying to access a copy of that in the app's folder, giving error 2032. And if I stick the one I have in frameworks/rsls/ then it gives me error 2046. I don't know how it could not be properly signed, unless Adobe magically changed a signature and didn't update their flex SDK.
Given a dynamic or non-dynamic class like the following: package { public class MyClass { public var myProperty:String; public var myBooleanProperty:Boolean; public function MyClass() {} }}
Flex 3 allows you to assign a value to myProperty like this: myClassInstance["myProperty"] = "myValue"; myClassInstance["myBooleanProperty"] = true;
I regularly parse XML to get property names and their values then update correlated classes using this technique; however, Flex 4 no longer allows assigning the boolean property. I don't have a work-around.
If you trace the results: trace(myClassInstance.myProperty) // Returns "myValue" trace(myClassInstance.myBooleanProperty) // Returns null
I am using Flash Builder Buritto with the latest "nightly" Flex 4.5 SDK, build 17689. It seems the dropShadowEnabled property is no longer supported with the Hero default skin. I get this compilation error:
The style 'dropShadowVisible' is only supported by type 'spark.components.Panel' with the theme(s) 'spark'.
Is there any way to disable the shadow without making a custom panel skin?
I have a custom component I've developed that's part of a dashboard.It does some polling based on a timer that's part of the component.
When the user navigates away from the view that contains this component I would like to stop the timer and hence stop the polling.I can obviously fire an event when the view's changed and catch it within the component but I was hoping that there might be a way to contain this all within the component.Is there an event or state change within a component that triggers and even when a component is currently be displayed?
I'm using Flash Develop to build an as3 application using the Flex compiler. In the constructor of a particular class I have written the following code
Code: //constructor public function Test(par1:int, arr:/*int*/Array = [1, 2]){ <----- compiler shows error here