ActionScript 3.0 :: When Typed Many J's.only First Looks Wrong?
Mar 13, 2009when I type j in the input box (or grid) component it looks like i. is it bug? when typed many j's.only first looks wrong.
View 2 Replieswhen I type j in the input box (or grid) component it looks like i. is it bug? when typed many j's.only first looks wrong.
View 2 Replieshow do you get the URL thats in the browsers address bar?
Code:
function getURLFromAB():void
{
var urladdress:String = // some command goes here
trace(urlAddress);
}
I'm making a game like in impossible quiz, how would you make it so, if a word is typed, it advances to the next frame. EX 3+9= If you 12 is typed, it advances to the next frame or a button appears and click it to go to the next frame?
View 5 RepliesFor example in Java you can do:List<Person> where Person is the object type.In AS3/FlexArrayCollection which takes any object type. Is there any way to create a list/collection of declared objects in AS3/Flex (or is it impossible due to weakly typed language)?
View 2 RepliesI want to write typed alphabets into canvas,may be by first using text input and then want to put the text in that directly into canvas,is it possible?
View 1 RepliesI have the input text component on the stage. I also have an empty movieclip on the stage called "contain_mc".
My question is how can i create a moviclips of the text that is typed in inside the mc "contain_mc"
so if i typed in testing and hit return then a mc of the text testing would be created inside the "contain_mc"
I have following object in the FMS
User = function(userName,userId)
{
this.userName = userName;
this.userId = userId;
}
I need to send the list of user to the client swf. Once I initialized the User object collection to an array, array element is undefined when I read it from the client.
[Code]...
How can I initialise two-dimentional typed Vector is AS3? Now I can get working only this:
private var _mainArray : Array = new Array( MyConst.DIMENTION );
public function MyArray()
{[code].....
I need to encode and Decode AS3 Objects in a typed manner. url... only supports untyped encoding and decoding.url.. supports some kind of typed objects but is not very robust, e.g. it fails on Date Objects.It MUST be JSON and it MUST be strong typed and robust.
View 5 RepliesI succeeded in sending typed objects from a PHP application to a flex front-end using Zend_AMF as per this question. The problem I am facing now is that I would like to send a typed object from flex to PHP and on the PHP side, be able to receive it as a typed object instead of stdClass.
Here is the class in flex:
package com.mysite{
[Bindable]
[RemoteClass(alias="CTest")]
public class CTest {
public var stuff1:String;
[Code] .....
After some testing, I removed the namespace from the PHP object and moved it into the global namespace. This seems to have resolved the issue. I have tried setting RemoteClass to modules estingCTest and also modules.testing.CTest. $_eplicitType was then set to the same value for both tests. The result is that when I use modules.testing.CTest, this is the classname that Zend_AMF sees. If I use namespace notation, Zend_AMF sees modulestestingCTest, as all the slashes get stripped out. But how can I get this working with php namespaces?
I have a WebService that returns XML in a SOAP response:
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetConfigResponse xmlns="Web.Services">
[Code]...
When I call this WebService the Flex debugger shows the type of the ResultEvent.result is "ObjectProxy".When I try to cast this value as XML, it traces as "[object Object]", and I cannot access the XML nodes. For most other WebServices I call, the ResultEvent.result is of type "Array", and converts to XML with no problem. What can I do to store this result as XML?
So I have ClassA and ClassB. Each of these is the document class of two different FLAs. In ClassA I want to load a SWF and set it to a variable of type ClassB. The problem is that ClassB uses a ComboBox, so when I try to type the varialbe, then ClassA complains that it can't fine the definition for ComboBox. If I add the ComboBox component to the library of ClassA it works just fine. But that kind of defeats the puprose of me creating the seperate SWFs in the first place... smaller file sizes. So here is basic code of what I'm trying to do.
Code:
package
{
import ClassB;
public class ClassA extends Sprite
[Code].....
If I don't try to type the variable "swf" to ClassB then it works absolutely fine. But I want to have it typed so that I can then use intellisense/code completion in my IDE and not have to worry about the compiler telling em that functions don't exist on ClassB when I try to use them and such.
how to accomplish this? I have found that I can have ClassB implement an Interface and then set the swf to type IClassB... but I really don't want to have to do that because that means for all swfs I want to load I will have to create another Interface and prototype out all the functions. That just seems extremely tedious as this project will get very big.
I need to advance a movie clip onto the stage (that will look like a strip of paper) as the user types in a message from my text input window.Right now I am using this code to display the typed text on the paper, but I need it to look like a printer is pushing it out as the user types in the message and limit it to 50 characters.
import flash.events.*
input1_txt.addEventListener(Event.CHANGE, textInput);
function textInput(e:Event) {
[code]....
i have 2 input box and 1 dynamic box.What is the actionscript to make then 2 input box read the value that a user typed in(automaticly if possible without a button)?which then my other script will process a calculation between them to give the answer.
View 14 RepliesI want to pass Vector.<String> as a param for fun(v:Vector). How to pass Typed Vector as Pram for not typed function.
View 2 Repliesim currently working on a flash component (first time). I have an instance of my component dragged onto the stage. Played around with changing the different properties i made inspectable - so here it comes: The property (typed object) i would like to change can not be edited in the IDE. I have no plus icon to add a new name-value pair to the list
[Code]....
and a screenshot of my empty panel where i would like to add some data:
I can't type into text fields in an online flash game. Videos play normally at sites like Youtube.I have uninstalled/reinstalled Flash to no avail.I have Vista Home and Firefox 3.6.13
View 6 RepliesSo is
public var user:Object = {};
user["firstName"] = "Bill";
user["lastName"] = "Cosby";
Slower than if I have a value object like User?
var user:User = new User();
user.firstName = "Bill";
user.lastName = "Cosby";
Is it possible to receive custom generic typed objects through AMF? I'm trying to integrate a flex app with an existing C# service but flex is choking on custom generic typed objects. As far as I can tell Flex doesn't even support generics, but I'd like to be able to even just read in the object and cast its members as necessary. I basically just want flex to ignore the <T>. I'm hopeful that there's a way to do this, since flex doesn't complain about typed collections (a server call returning List works fine and flex converts it to an ArrayCollection just like an un-typed List).
The custom C# typed class
public class TypeTest<T> {
public T value {
get; set; }
public TypeTest () {
}}
The server method returning the typeTest
public TypeTest<String> doTypeTest() {
TypeTest<String> theTester = new TypeTest<String>("grrrr");
return theTester;
[Code] .....
Irritatingly if I change the result handler to take parameter of type Object it works fine. How to make this work with the value object?
Is the same possible in ColdFusion? Currently I am using .Net/Fluorine to return objects to the client. Whilst in testing I like to pass strings representing the select statement and the custom object I wish to have returned from my service. Fluorine has a class ASObject to which you can set the var 'typeName'; which works great.
I am hoping that this is possible in Coldfusion. Does anyone know whether you can set the type of the returned object in a similar way. This is especially helpful with large collections as the flash player will convert them to a local object of the same name thus saving interating over the collection to convert the objects to a particular custom object.
[Code]...
i need to serialize AS3 strong typed Objects, send them to a C# Application and then be able to derserialize them as Hashtables/Dictionarys or so because i have no corresponding C# Class. I then will make some changes to that Hastable and need to be able to send them back to the as3 App. I tried using JSON (see this question with bounty Typed AS3 JSON Encoder and Decoder ?) as i already got JSON serialization to Hashtables in C#. It does not work because AS3 has no support for typed JSON.
I also looked in XML and found asx3m http://code.google.com/p/asx3m/ which is strong typed in as3 but i can find a solution to serialie and deserialize this to proper hashtables in c#.
Some may know that PHP methods can be remotely invoked from Flash.Sometimes the input parameter of a remote PHP method is an array of integers.Because PHP is dynamically typed an attacker can pass an array of anything.The array of integers has to be used in a SQL query.[code]
View 2 RepliesHow would I create a strongly typed class at runtime (so to be able to create instances of it)? It can't be a proxy.
Additional Info: For example, say I want to create a Person class with first and last where both are Strings.
Context This is for an application that lets you create the data model and custom components at runtime. This is only part of it. I need to be able to have strong typing. If that means going to the server and creating a new SWF on the server with the value objects then loading in the definition at runtime then I would but that is a lot more work if there is an alternative.
Is there a way i can Loop through the attributes of a strongly typed Object or just convert a strongly typed Object into a generic Object.I tried typecasting a Strongly typed object created using LCDS into a Object.But it just returned me a typed Object.
View 1 RepliesIt's early days in my AS3 learning, and I'm looking for a little clarification regarding a variable typed to a superclass (in this case var mySpinner:MovieClip) which contains a reference to an new instance of a subclass (in this case Spinner.) I am trying to get my head around why my code compiles and runs and I am able to call the method rotater() on mySpinner even though mySpinner is typed as MovieClip, and the MovieClip class does not contain the method rotater().
On page 163 of the official Adobe Programming ActionScript 3.0 documentation it says the following, which I believe is related to my situation, but I am still in need of clarification:
"Because each class defines a data type, the use of inheritance creates a special relationship between a base class and a class that extends it. A subclass is guaranteed to possess all the properties of its base class, which means that an instance of a subclass can always be substituted for an instance of the base class."
I am using bulkLoader to load dozens of SWFs into my Flex app, and all of SWFs are static (1 frame only). 'Everything' works fine, however, I'm not sure how to handle data from bulkLoader... I am getting MovieClip types for all of my SWFs, and I am not sure how to tell to Image or SWFLoader classes to use some of those MovieClips as source.
View 1 Repliesexample:
var c : Class = Sprite;
//This can be random class such as movieclip/etc
var o = getDefintionByName(getQualifiedClassName(c));
this works, but in flash develop, it says that the variable 'o' has no type declaration
which basically means
var o : SOMETHING = getDefintionByName(getQualifiedClassName(c));
but how do i put that something there when i do not know what its coming because of random classes?
For a game I'm attempting to develop, I am writing a resource pool class in order to recycle objects without calling the "new" operator. I would like to be able to specify the size of the pool, and I would like it to be strongly typed.
Because of these considerations, I think that a Vector would be my best choice. However, as Vector is a final class, I can't extend it. So, I figured I'd use composition instead of inheritance, in this case.
The problem I'm seeing is this - I want to instantiate the class with two arguments: size and class type, and I'm not sure how to pass a type as an argument.
Here's what I tried:
public final class ObjPool
{
private var objects:Vector.<*>;
public function ObjPool(poolsize:uint, type:Class)
[Code].....
I'm using AS 2.0 and experimenting. I've got one main movie, with buttons at the top, each button loading a movie into a common movie clip...there are nine buttons/movies in all.Here's my problem. The nine movies have some common elements which seem perfect to put in a shared library. The sharing works, but when I plug the shared elements (either backgrounds or buttons) into the movies:1. Any text typed in Flash disappears (the text is Classic and Static), and;2. The buttons lose their "button" properties. Hyperlinks/AS coding will not work on them. I've made sure the buttons have an instance name. I even tried creating invisible buttons on a layer above the library-linked buttons (having the latter just for show), but strangely, the invisible button, when placed directly above the library-linked button, doesn't work either.
View 1 Repliesim trying to make this input-textbox disabled after it�s been correctly typed in ... I tried to use something like this "_root.txt.enabled = false;" in the code but nothing worked...
[Code]...