Flash :: Konami Code In Flex?
Oct 9, 2009What would be the best way to implement the konami code into a flex application?
I want to create a component to add it on all my proyects, just for fun.
[Code]...
What would be the best way to implement the konami code into a flex application?
I want to create a component to add it on all my proyects, just for fun.
[Code]...
I have this code creates a function at runtime (yes, this IS needed):
PHP Code:
var createdFunction = function():void {
trace("Function Created");
}
createdFunction();
Putting in in to the actions panel in Flash CS4 and compiling works fine, tracing the message "Function Created"...However, the Flex compiler gives me this
Quote:
Error: Call to a possibly undefined method createdFunction.
createdFunction();
Build halted with errors (fcsh).
Are there any examples on how to use the code found in the OSM framework in Flex? I would also need the player to be skinnable .
View 1 RepliesHow do I change the application state in code, using a variable? when I provide a static string it works fine, but not with a variable.
[Code]...
I converted a .swf file into .fla file using Sothink SWF Decompiler. I can open the file with Adobe Flash Professional CS5, but I cant see the source code. The only thing that I see is the timeline layers. I want to change the background picture of the Flash and save it as .swf.
View 1 Repliesdifference between key code and character code. For example, the number 1 (one) and the character ! (bang) both have the same key code but different character codes. Likewise, the number 7 from the row of numbers and the number 7 from the numpad have different key codes but the same character codes.
I'm programming a music rhythm game in Adobe Flex and would like to bind keyboard keys. This isn't a problem, but I certainly would have a problem, say, setting the default keys to A, S, D, and F and telling the user that this is the case.If you take a look at the documentation for flash.ui.Keyboard, you'll see that there are constants for keyboard keys to key codes. However, these are only available in Adobe AIR and not the browser. This makes sense since not all operating systems and keyboards are alike (or present!), so key codes can vary.
So, how can I assign default keys that have meaning instead of picking key codes and praying?My only sane thought is to store the character codes for the key bindings and then provide an character code to String mapping so I can tell the user what to press. However, my gut tells me that this will break in subtle or not-so-subtle ways. Like CAPSLOCK.
what's the size of the bootstrap code for cairngorm framework which is based on flex?
View 1 RepliesI use the HTTPService() method to post a variable value to a SQL Server database. The suggestion came from someone with some past experience in Flash but nothing specifically related to posting variables to a database.
This person sent me the following code snippet that he found in a Flex forum (and changed a bit), with a suggestion that maybe it will work with a bit of massaging.
PHP Code:
private function start():void {
service = new HTTPService();
service.url = "http://webServer.aspx";
[code]....
My biggest problem is that I'm using Flash instead of Flex. What is the Flash (non-Flex) equivalent of HTTPService() method in the following code snippet?
As stupid as my question might sound, i have spent the last 2 weeks reading oop books; but could use some guidance. I have a flash project that is basically a supped up slide show. On the stage i have the following: main_mc (instance name = images_mc) = movieclip which holds "pictures" ui1 (instance name = ui1_mc) = user interface that allows user to draw on picture (when drawing is enabled) ui2 (instance name = ui2_mc) = activates invisible hit areas (buttons) on select pics, when hit area is clicked, we jump to another pic in the main_mc.
I accomplished all of this on the timeline, but am updating the code to OOP. I am having A HELL OF A TIME trying to figure out how to store references to the instances (images_mc etc..), so i can control them from varying class files. I have found it is easy to control the instances from the documentclass, but not from unrelated class files. Example: images_mc.stop(); works in document class; but ovieclip(Parent).images_mc.stop() doesn't seem to work from any class file.(ui2 class file for example);
[Code]...
I'm looking for a workaround to the "AdSense does not let you choose only images but no flash" issue. I'm rather a newbie to JS, but is there any way for one script to prevent other scripts embedded in a site from detecting the presence of the flash plugin? Even if it doesn't work with AdSense, it would be nice to know if there's a hack to do this that might work in other settings.By the way, I suppose I wouldn't care if it failed to work on IE or obsolete browser versions.
View 1 RepliesGot to the point where the hole in my AS3 knowledge is getting large!Realising I have confusion about the relationship of:Body of code on first frame of AS3 file.(Which I have so far used to create instances of library objects using addchild and make calls to class code).Is this code called the document code? What do people call it?Numerous classes linked together by extending each other etc.Library objects (usually graphical objects)Should it be done differently? have the following problems due to lack of understanding:Addchild complicated from a class but straight forward in main body code.Cant call functions on the main body code from classes, because class code does not know the main body code exists?
View 1 RepliesWhat library/API or even a program for converting flash code into html 5 code automatically do you recommend me?
View 2 RepliesI was editing a very basic mobile Flex project, and after I debugged the master (application) mxml file, Design View stopped working (blank screen displayed, no Design View errors) for all files. Creating new projects, either mobile or else, or testing old, working projects, doesn't work either. Out of the related issues I've found info on, most concern earlier versions of the IDE, and deal with either Design View errors (got none), use of certain functions or custom components (I get the error even on a new project), or are solved by changing styles back-and-forth (tried already, to no avail).
I can't drag and drop components to the design area, either (a "prohibited" symbol appears and nothing happens when I drop); so I'm pretty sure it's not code-related or a bug, but probably something stupid, like a configuration issue, so I definitely need someone to take a fresh look at it.
I've been trying for hours to make sense of this problem. When I run my code through the Flash IDE, everthing is fine. However, when I run it through the command line compiler or Flex itself t doesn't work. This is after setting up all the required Flex bits to create a Flash stage and display content. it keeps giving me an "Access of undefined property" error though I've clearly defined those properties in question a line or two before.
[Code]...
What the heck is going on?? I'm stumped. Embed seems to work fine, but I'd prefer to change it this way. I think there's something about XML dynamism if you use embed instead.
I'm looking for some help converting as3 code to pixelbender code in an attempt to improve the performance of my application. This as3 code goes as follows. I scan through the Number values of a bytearray in chunks. Lets say this chunk lenght was 100 numbers I read 2 numbers (left and right) and try find the maximum values. The numbers in my bytearray are PCM data so there is millions of them and this code can often take a long time to execute, especially on a low spec machine.
The whole aim of this is to render a waveform as quickly as possible. I know very little about pixel bender. I can basically make a new file and create a shaderJob of it in flash but I'm really uncertain how to approach this...
[Code]...
I have seen a few blog entries on this and have had a discussion or two with my team mates but I would like to see what the stack overflow community thinks.
So why does the Adobe Alchemy Tool create so much faster running flash byte code than the flex compiler?
Also, when will the flex compiler be able to make similar performance gains? Will it require programmer specific use of special Array's or something of that nature to get the same performance?
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 want to give a good look and feel to the flex line charts. How to show it more attractive. I have done everything, now i want to show it more attractive/rich look and feel. can you guys provide me any samples.
View 3 RepliesI just need a simple code of drawing a text curve in flex
View 2 RepliesIn the main file, I would write[code]...
But if I want the component to have that behaviour innately, where do I write it in the mybutton mxml file to have it reference itself?[code]...
Here is code for drag. i want to change as3 class to normal code as3
View 6 RepliesI have an Actionscript coded flash file which run perfectly without any error. I am not getting why it shows an error after i do insert a scene before or a frame before the current frames;
[Code]...
I am developing a Flex / Flash application which talks to an ASP.Net / C# backend. Is there any way I can share code between the two?The server provides a reasonably interesting domain model which the client is designed to maniuplate. Ideally I would like to be able to define this domain model once and have both sides use it for consistency. I am after all the benefits that come with being DRY.I'm new to Flex but the sort of thing I had in mind was some intermediate language that compile to both C# and ActionScript.
Update:I currently have a basic REST style web service which sends XML serialized versions of the objects down the wire to Flex. This works fine but what I am really interested in is being able to share simple business logic that goes along with these objects. There are certain business rules that need to be processed on both the server and the client and is possible I would prefer not to have to call back to the server for performance reasons.
As you know, we could build a RIA application based on flex. Also, we could build an desktop application based on AIR. I have a question, If we want to build web & desktop application simultaneously. Could we use the same codes to ship our production to web & desktop?
View 3 RepliesI have an issue working with the setStyle() on the modalTransprancyColor property. The module did not run on different variations of hexadecimal code, only one that seems to work is 0xDDDDDD. Anything else, this line of code will crash Flash.
Application.application.setStyle('modalTransparencyColor', '0xDDDDDD');
PopUpManager.removePopUp(this);
Tried: 'black', '0xff0000', '0xFF0000', '0x0116FC'
I'm using Flex 3.6v16995 with Flash Builder 4
Lets say I have two swfs A and B, and at runtime, swf A loads swf B, and I wish to share code between them, to minimize file size and download times.
If swf B has some code (say. com.blah.HelloWorld), I tell the compiler to have swf B's source in swf A's classpath, but only do a compile-time link and not actually compile com.blah.HelloWorld into swf A
This works, and I have tried it, using a the -includes and -externs compiler options.
However, My problem is that I wish to do this the other way. i.e. swf A and B (and potentially swf C) all need com.blah.HelloWorld, but I want com.blah.HelloWorld to be compiled into just swf A, have it as an external reference in swf B ( and potentially C as well.)
I tried doing this using the externs and includes, but I get ReferenceErrors when I do this.
I want to do this without a having a separate rsl, so I can reduce the number of http requests.
I do a lot of work with GWT but don't have experience of Flex. I was talking to a guy today who was looking at moving some large Flex based applications to GWT due to the Flex application getting too big and using too much memory in the browser. This is a problem I have had before with GWT - browser apps using lots of memory as all the code gets loaded when it starts.
However, in GWT 2.0 there is now a code splitting feature to overcome the problem of the client code getting too big. This allows all the code (javascript) not to be loaded as one big file on start up but instead code split into different files that can be loaded when required.
I was thinking as to if there is anything similar in Flex. I assume the Flex application code all lives in one single SWF file which loads at start-up so this approach is not possible but thought there might be other solutions.
As part of a nightly build i want to automate the generation of action script classes like Flex does but in an automated fashion. So I'm looking for an equivalent tool to flex builder 3's Import Web Service functionality, but accesable to a Hudson nightly build using ant.
View 1 RepliesCan you recommend articles,books and best practices on designing Flex applications? (both AIR and web).I've read Creating components and enforcing separation of concerns with Flex and Building components by using code behind.Does the application always have to start on the Main MXML? Can't I instantiate the first view from an ActionScript class?How would you add a handler to the first MXML and give the flow control to it?I'm trying to write zero code on my MXML files to keep the view decoupled from code. Is this possible in Flex?
View 3 RepliesThere is such a wonderful source http[url]....but it does not get integrated into Flex. Are there other examples of an animated tag cloud?
View 1 Replies