Actionscript 3 :: Serializing Vectors In A Sub-class

May 11, 2011

I'm trying to serialize data in AS3 but am running into a frustrating problem. Originally I had problems with "myObjClass" not being convertible, but after I discovered "registerClassAlias" I got things working allright. Some time later, I added vectors to the myObjClass. I ran into trouble with Vector Strings before, as was reported here:

[Code]...

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Serializing A Vector Of Vectors?

Jun 6, 2010

I'm trying to serialize a vector of vectors:

Code:
package
{

[code]......

View 1 Replies

.net :: Serializing An Object As A String?

Mar 9, 2010

We have an Adobe Flex client talking to a .NET server using WebORB. Simplifying things, on the .NET side of things we have a struct that wraps a ulong like this:

public struct MyStruct
{
private ulong _val;

[Code]....

I've tried playing with custom WebORB serializers, but the documentation is a bit scarce. Is this possible? If so how?

I think I can work out how to serialize it, but not the other way. Do I need to write a Custom Serializer on the the Flex end as well?

View 3 Replies

Actionscript 3 :: Serializing An Array In Flash?

Jan 13, 2010

I need to serialize and unserialize (is that even a word?) an array in AS3, so it can be sent as a string.

The only problem is that it doesnt just contain text, it contains objects.

Is it possible to serialize and unserialize arrays in AS3 like you can in PHP? How can I do so?

Once this bug is fixed, all will be well with my program.

EDIT: I need to be able to sync an array across several flash files, which are connecting via TCP and can send simple things like strings and integers, so I need to be able to transmit data about this in one go, in string form.

View 2 Replies

Flex :: Why Is BlazeDS Not Serializing Some Fields

Sep 7, 2010

I'm using Flex 3.5, BlazeDS 3.2.0.3978 and EJB3 for backend. There are two RPC which are important to the problem. The first call will get a list of ThirdParty objects, this works fine. The second call happens when the user clicks on a ThirdParty, the details of this object (lazy collections) are retrieved. A single object is returned with most fields serialized. I say most, because for some reason, 4 boolean fields are not serialized and are put on false by flex by default.[code]I've set blazeDS logging to debug and all fields but these booleans are shown in the output. Next, I've tried stepping through the serialization process but it's fairly easy to get lost in there.

View 3 Replies

Java :: Flex - Date Not Serializing Using BlazeDS

Sep 30, 2009

When I pass a Actionscript Value Object that contains a Date variable using BlazeDS it is not getting transferring as a java.util.Date object correctly. When the setBaseDatefunction gets called on the Java side the baseDate value is NULL. The weird thing is if I rename the variable on the Java side to private Date date; and create a public void setDate( Date date) function it works. The problem is I need to pass 2 different dates so I can't uses this work around.

Here are my 2 classes:
AS3
package com.shua.flex.valueobjects {
[Bindable]
[RemoteClass(alias='com.shua.valueObjects.myVO')]
public class myVO {
public var label:String;
public var endDate:Date;
[Code] .....

View 3 Replies

Php :: Serializing Flash Objects Over HTTP Without The Gateway?

Jan 17, 2010

Flash + AMFPHP is a great combination. But there are cases, when Flash Remoting with NetConnection isn't the right tool, for various reasons. Rob had a great post on this some time ago: http:[url]....He also has a nice example on how to deliver AMF to a http request, without the POST and AMF-request package to call the function that NetConnection sends, using Zend_AMF.

// Include the Zend Loader
include_once 'Zend/Loader.php';
// Tell the Zend Loader to autoload any classes we need[code].....

I really like this approach and would be very hapy to replicate it with AMFPHP. Why AMFPHP, you ask? The 'newest' version uses amf-ext, a C PHP extension, to serialize and deserialize the data. It is much faster than the php way ZendAMF is still using.Of course I already played around with AMFPHP and tried to build the necessary objects and use the Serializer class. I even got a valid AMF string, but the real data was always wrapped by a 'method package' that told the receiver this was a answer to 'Service.method' call.is there a way to serialize Flash Objects directly, without the gateway and method wrapper, in AMFPHP?

View 2 Replies

Python :: Serializing And Deserializing Object With JSON?

Aug 2, 2011

Is there a way or a library made to deserialize a JSON string into a typed object in ActionScript and Python?

For eg.

class Person
{
String name;

[code]....

So, the last statement basically casts the object we get after deserializing the jsonString into the Person object.

View 3 Replies

Java :: Flex / LCDS: Serializing InputStream As ByteArray Using BeanProxy

Jan 6, 2011

I'm trying to serialize an object which has an InputStream. I need it to arrive on the flex client as a ByteArray.

[Code]...

I've set breakpoints in this code, and I see it being called as expected. However when the object arrives on the client, the input stream is typed as Object, and it contains no properties. What am I doing wrong?

View 1 Replies

Serialization - What Are The Pros/cons Of Using AMF Versus Serializing Data Between Flash And A Web Script/service

Nov 24, 2009

I was using the serializing approach between Flash and PHP for the longest time before AMFPHP had its 1.0 release (wow...that was a long time ago...in 2006)!Serializing using a sepiroth's AS library paired with PHP's built in serializing functions worked and I didn't change it because it did the job.

Should I switch over to the AMF format and technology? One pro is that the data exchange is probably more efficient for AMF because it's a binary format.I've also see other scripting languages/frameworks such as Python/Django, Ruby/Rails supporting AMF. I guess AMF is also a standard format. Does each language serialize data differently?

View 2 Replies

Java :: RemoteObject In BlazeDS Environment: Serializing Objects From JAXB / XJC-generated Classes

May 10, 2011

I'm developing a webapp with Java backend and Flash (pure ActionScript) frontend using BlazeDS. I'm using the RemoteObject stuff to send objects, using custom serialization, where I need to implement Externalizable (Java) and IExternalizable (AS) interfaces. This works fine so far.

But now I need to send objects from Java to Flash, whose classes are generated with JAXB/XJC. Of course these generated Java classes don't implement the Externalizable interface, so it seems that I can't use my approach here. One possibility seems to be writing a XJC plugin which makes the classes implement Externalizable. But this looks like a tough job...

View 2 Replies

ActionScript 3.0 :: JPG/PNG Encoding And Vectors?

Dec 4, 2010

So I have recently created a Tshirt design application where a user can draw on a tshirt / add text / upload images. Though I am having a few problems. Problem #1: Using the pen tool I can only allow users to draw and reset the drawing using the graphics class, no idea how to create an eraser tool

Q1 - Is there any way to create the eraser? Problem #2: Once a user saves the shirt it is later encoded into a JPG or PNG With no way of editing the shirt in the future.

Q2 - I thought of saving the locations of the shapes / items they uploaded onto the shirt and colors and later re-creating the shirt once loaded. But ran into one problem that is I cannot save the drawing they did using the pen tool, only the location of the objects (MC's) is there any better way to creating this?

View 5 Replies

Shape Tween Grayed Out Between 2 Vectors

Sep 2, 2009

I have two vector graphics I imported to my stage and want to do a shape tween between them. But shape tween is grayed out. The images are imported Illustrator EPS's. I attached two screenshots.

Attachments: Picture 1.jpg (144.1 K)
Picture 2.jpg (141.9 K)

View 1 Replies

ActionScript 1/2 :: Any Way To Transform TextField To Vectors?

Oct 11, 2009

I very often use animated text (rather for menu titles than paragraphs) in my flash works and the render of fonts is usually quite irregular. What I now do is convert the alphabet + figures of the font I am using to vectors (Ctrl + B) on the scene and then make movieclips with each letter, which I store in the library ready for AS to call them. The rendering quality is comparably better. The truth is I've never had to make more than, say 50 clips "by hand", but it would still make my life easier and save me dull time/work if there was a way with AS to transform a text field to vectors...

View 5 Replies

Flex :: Access The Vectors Of A Font?

Dec 18, 2009

How would you define/create generative typography ? I thought also of some sort of "intelligent" adaption. For example a font that uses serifs in certain condition or not... Are there some findings in how you could access the vectors of a font in actionscript ?

View 2 Replies

Actionscript 3 :: Vectors: Using Getters And Setters?

Jan 7, 2010

Is there a way to use getters and setters for Vectors?Say, in my Main class, I would like to write

myVector.push(item);

and in another class, I have written:

public function get myVector():Vector.<int> {
return _opponentCardList;
}
public function set myVector(myVector:Vector.<int>):void {
_myVector = myVector;
}

This doesn't really work as you have to set _myVector to a Vector. But what if you just want to push(), pop() or splice?

View 1 Replies

Actionscript 3 :: FullScreenSourceRect Is Pixelating Vectors

Sep 21, 2010

I'm currently developing a Flash website that incorporates an flv player. The controls on the player's skin are all vectors. I've set it up so that when you hit fullscreen on the player controls a fullScreenSourceRect is created which is working great. However when the the player is full screen, the once crisp vectors are now pixelated as if they were a bitmap.

View 3 Replies

Actionscript 3 :: Modify Vectors At Runtime

Mar 3, 2011

Is there any way to modify the vectors of a DisplayObject at runtime? I import a Sprite or MovieClip on my application, and I want to be able to modify the vectors that composes it. A close approach is to use Graphic class, but it always renders below the Sprite, it can't clear the original graphic, and it can't modify the vectors, only draw new things. And if this is totally impossible, I would like to know how I can call Sprite.graphics.drawXXX, so that the graphics are rendered above the Sprite.

View 1 Replies

Actionscript :: Bitmaps Faster Than Vectors?

Apr 11, 2011

I'm working on a project which draws circles continuously at framerate and animates them around the stage and I'm running into performance issues.

I'm already converting all objects to bitmapData as soon as they become static. My question is, will converting the circles to bitmapData as soon as they are drawn increase performance? In other words, is animating say, 200 bitmaps (with transparency) faster than 200 vector circles?

Are there any drawbacks to this technique? (I'm thinking opacity problems maybe?)

If they were more complex shapes than circles would the answer be different?

View 3 Replies

ActionScript 3.0 :: Vectors Become Pixelated When Scaled?

Nov 16, 2009

I'm trying to scale down some vectors but when i do they become pixelated. So I tried putting then in a container and scaling down the container, but pixelation still occurs.can anyone tell me why this is happening and a possible work around?Here is the function from my class:

private function addItems():void
{
addChild(itemsContainer);

[code].......

View 3 Replies

ActionScript 3.0 :: Alternative To Vectors / Arrays

Nov 20, 2010

I'm programming in AS3 using CS3, which only seems to publish using versions of flash up to and including V9.Anyway, I'd like to use some vectors of integers in my program, but these seem only available in Flash Player 10. I'd rather not use Arrays as these cannot be assigned "types" and are a bit slow and clunky.Is there an alternative to the vector class (i.e. arrays for which we can assign types)? If not, is there a way that I can bring flash player 10 into the File >> Publish Settings menu so that I can use vectors?To me this is a remarkable issue to have, because typed arrays are an essential part of any serious programming.

View 4 Replies

ActionScript 3.0 :: Declaring And Populating 2D/3D Vectors?

May 30, 2011

I'm trying this for creating and populating a 2D Vector of Integers:

Code:
var vector2D:Vector.<Vector.<uint>> = new Vector.<Vector.<uint>>
[
new <uint>[1, 2, 3, 4, 5, 6, 7, 8, 9],
new <uint>[10, 11, 12, 13, 14, 15, 16, 17, 18]
];

And well, that's not working...For this program I'm working on I'll also need to declare and populate a 3D vector.

View 9 Replies

Actionscript 3.0 :: Vectors Become Pixelated When Scaled

Nov 16, 2009

I'm trying to scale down some vectors that have a z position set (other than zero) and they are becoming pixelated. So flash is obviously bitmapping the vectors.

Does anyone know of a work around to stop the pixelation?

Here is the function from my class:

private function addItems():void
{
addChild(itemsContainer);
// make the items.

[Code].....

View 1 Replies

Actionscript 3 :: String - Serializing Objects - String Type Too Small To Hold Blob

Dec 12, 2011

I'm using:

[Code]...

But I keep getting an "Error #2030: End of file was encountered." This is (probably) because the class I'm serializing is too big for the "String" object type in AS3. Is there a limitless object for storing an array of characters (or better yet binary), or am I going to have to make my own class? (like one with an array of strings)

View 1 Replies

ActionScript 3.0 :: Dynamically Altering A Shape's Vectors?

Jul 26, 2009

I don't know if i'm in the right category here.I have a line in the center of the screen, and i want it to bend. i guess i have to use vector operations? (I mean, what Illustrator uses. visuals, with vectors instead of pixels). I want to be able to set points, so that the line bends towards that point. And the color under the line should be different than the color above the line. Does anyone know how to get started on something like this?

View 1 Replies

ActionScript 3.0 :: Instantiate Dynamically Named Vectors?

Jun 18, 2010

i'm trying to create a dynamically named Vector.  i have a critical project deadline tomorrow, and this small problem is holding back continued development i've adapted my code from this example [URL]...yet am getting an error message (see below).  here is what i have:

[Code]...

View 9 Replies

ActionScript 3.0 :: Passing And Handling Vectors Wrong?

Jun 3, 2011

So I have the code of two classes (I can't post any actual code as its way too long - even broken up But I can give you a sample of simmilar aspects)
 
public class ClassA
{
private var objectString:Vector.<String>; // create a new vector to hold items - this will be passed

[Code]....
 
Yes I have an understanding of vectors so pointing me to the documentation may be worthless. As I have read it hundred times. I would not be posting here if I didnt. How ever I may have missed something.
 
Upon debugging this I see that Class A has a vector that now contains one element -> "hello." When I pass that vector on Object container is null. Whats worse is now I return a null vector list and pass on a null vector list and trace should in theory show me null.
 
In java this is how I would pass vectors and arrays around and I believe some one showed me this is how you do it in actionscript.

View 32 Replies

AS3 :: Vectors Doesn't Rezise When Resize MovieClip?

Mar 20, 2011

I have bit of a strange problem. In have a MovieClip i resize, but the vector graphic doesn't resize with it. It's a Movieclip in my library that i'm linking to and when I insert it on my stage, it resizes just fine.

I have exported the MovieClip as an AS Object called: TabTemplate and the i extend it in a class called Tab.

I set some text in the textfield defined in it and the resize the tab accordingly. but the graphic doesnt follow :(

I'm not used to AS3's ways of doing things, so there might be something i've missed.

Here's the class code:

package mypackage {
import flash.display.MovieClip;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;

[Code]....

There is actually two issues going on here:

1) The textWidth isn't return the correct number. I have some shadow on the text and i don't know if that screws anything up. But otherwise I'm just using Regular Arial.

2) The mask of the 'Tab' + it's vector background isn't resizing when I'm resizing the MovieClip, like it does in Flash it self.

View 2 Replies

ActionScript 2.0 :: Cache All Of The Overlying Vectors As Bitmaps Or Just A Few Or None At All?

Jan 19, 2009

I have a large project with many layers of vector art and one relatively large bitmap underneath them all acting as a map face. I've read that combining types (vector and bitmap) is not good. My question is .. Is it worth it to cache all of the overlying vectors as bitmaps or just a few or none at all?

Everything is pretty static except for the dragging of the map face which moves everything as one movieclip. My CPU is doing overtime when I run the project because I am dealing with 100-300 small movieclips on top of the map. This is my first major project so I am now trying to optimize a cumbersome file.

View 0 Replies

ActionScript 3.0 :: Function Handling Generic Vectors?

Jul 22, 2010

I have this question regarding vectors. Is there a way where I can make a generic utility method which would for example, subdivide a vector into two vectors and would be able to handle all types of vectors, whether they contain <int> or <string> or <myClass>

for example:

ActionScript Code:
public function splitVectorIntoTwo(v:Vector.<T>):Vector.<Vector.<T>> {
var result:Vector.<Vector.<T>> = new Vector.<Vector.<T>>();
//Do logic
return result;
}

I don't know if this is possible but else it hinders our development quite a bit by using vectors since we can't use some generic utility methods as they will not accept generic vector types and you have to create a specific method for every vector type, one for Vector.<int> one for Vector.<string> etc.... With arrays, since they are not type-safe they can be passed within every such method.

View 2 Replies







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