ActionScript 2.0 :: Private Var Manupulatable From Fla?
Jul 22, 2004
this is pretty weird... I've been taught that when you have a private variable in a class it can't be accessed, let alone be altered, outside of the class. So how come I can do the mentioned actions on an objects private variables within a fla?
[Code]...
View 4 Replies
Similar Posts:
Aug 11, 2010
here is a snippet of my code in an as file
ActionScript Code:
class PoolBall extends MovieClip {
private var poolBall:MovieClip;
[code].....
View 4 Replies
May 25, 2011
there are classes definitions where all their methods are private my question is why are they private, because i've tried a code wherein i changed all the private access modifier to public and nothing changed!
what if you make an instance of that class with all its method private, how are you be able to access that on another class. coz i know private methods are only accessible to the class where they are declared! will the instance of that class be able to access the superclass's private methods!
on private variables, it's still not clear to me as to why make a private variable and then use a getter and setter, when you can simply make it public! are these variables called static?cause on the way i understand it private functions and private variables are static?
View 1 Replies
Nov 26, 2006
Okay so you've got your private vars in your AS2 Class, you think they're all safe right? Wrong.
Doing a trace(MyClass.myvar); will spit out an error that the var is private and you can't touch it.
But a trace(MyClass["myvar"]); will work perfectly fine. You can use it normal, without any setters getters outside the class.
Is there a way to protect against this? I think this is a huge security flaw. I know it's simple OOP, but a private var in an object should have rules.
View 7 Replies
Feb 2, 2011
is there a difference between classifying a function 'private' or 'private static' in a singleton? It seems that they both do the same thing. Maybe some difference in performance?
[Code].....
View 10 Replies
Jun 9, 2009
I've worked with AMFPHP for a while, but with Adobe supporting ZendAMF, I was wondering if I should migrate.
One of the major disadvantages for AMFPHP is that class mappings need to be public, so not only does that mean public members on the PHP side, but also on the Flex side. I was wondering if it is the same case for ZendAMF.
View 1 Replies
Jul 22, 2004
I've been taught that when you have a private variable in a class it can't be accessed, let alone be altered, outside of the class. So how come I can do the mentioned actions on an objects private variables within a fla?
class:
Code:
class myClass {
private var foo;
function myClass() {
[code]....
View 4 Replies
Apr 8, 2010
Is there any way to mimic the in operator, but testing for the existence of protected or private fields?For example, this:
<mx:Script><![CDATA[
public var pub:Boolean = true;
protected var prot:Boolean = true;
private var priv:Boolean = true;
[code]...
When I want to see:
pub: true
prot: true
priv: true
bad: false
View 2 Replies
May 15, 2010
I need it in FlexUnit to test private methods. Is there any possibility to do this via reflection by using describeType or maybe flexUnit has some build in facility? I dislike artificial limitation that i cannot test private functions, it greatly reduces flexibility. Yes it is good design for me to test private functions, so please do not advise me to refactor my code. I do not want to break the encapsulation for the sake of unit testing.
View 4 Replies
Nov 16, 2010
is it possible to mark parameters as private, only accessible/useful for the class that owns the function?
example:
//PRIVATE CLASS (.SWC)
public function set AutoBounce(value:Boolean):void
{
if (value)
[Code].....
rather than redirecting, is there any better way to dealing with this issue? maybe "better way" is a poor choice of words. is there a way to refactor this code without using a forwarding function or having to force the user to include the event parameter.
View 1 Replies
Jun 16, 2011
I would like to implement some security in some of the Flash/PHP applications that I have. I have some Flash apps that communicate with PHP files, and the PHP is sending the data as get string (E.g.: name=John&sname=Doe&age=24&balance=12.4). Instead of all these variables, I would like it to send a single variable (E.g.: flashvar=jr9afgaw9-fg90agfawf7gw) that would contain those values, so then Flash would decrypt the string and get the real and useful vars.
I want to encrypt this using a private key and use the same private key to decrypt this inside Flash. If someone would want to decode the message PHP sends, he would have to decompile the flash file and find the private key I'm using in Flash to decode the message and then decode it. The reason I posted here is because I want to use an encryption algorithm that allows only the use of a private key for encryption/decryption.
View 3 Replies
Jan 25, 2009
what does public and private mean in this statement and when do I need to use it?this is not my code just using it as an example.
package {
import flash.display.Sprite;
import flash.net.URLRequest;
import flash.net.URLLoader;
[code]...
View 5 Replies
Sep 23, 2010
Is there a way to use the sortOn() method of the Array class to sort an array of objects by a private property?I've tried using a getter function, but Flash didn't like it.It doesn't seem right to leave a property as public, but the sortOn() method is very handy -
View 4 Replies
Feb 21, 2007
ActionScript Code:
class Vector2d extends Math {
private var x:Number;
[Code]....
I can't seem to get my private variable, x, to be private. From my understanding of private variables, tracing n.x should throw an error, and adding 150 should throw an error. I've tried changing the variable's name, and the cast type, to no avail. The first trace goes through, the addition goes through, and the second trace goes through.
I'm new to classes, so I could easily be overlooking something vital. But the vars need to be private, because I want to use get/set to update the variables when one or another changes. For instance, if 50 is added to the y value, the magnitude and unit vectors would change, so I want to update them using getMag and getUnit. That whole system would be thrown off if the user had direct access to the properties.
View 11 Replies
Oct 13, 2009
i have created a Vehicle.as file and a Car.as file which are in the same project. The problem i am having is trying to use the properties in my Car.as from my Vehicle.as file.Vehicle.as
Code:
package
{
[code]......
View 14 Replies
Jun 4, 2011
I've heard it's considered best practice to keep all class properties private and to change them using getter and setter methods.
View 5 Replies
Aug 18, 2011
my understanding of extending classes is that you gain all the functions and methods of that class thus You could over ride any one of them. How ever I am confused on weather or not you inherit and can over ride private methods of the class you are extending or if you have to have all methods public in an extended class.
[Code]....
View 2 Replies
Dec 10, 2009
Can ASDoc be set to document private members ala JavaDoc?
View 1 Replies
Apr 27, 2010
I have flash (AIR) application running on a single controlled system (there is only one computer running it and nobody has access to it).I will host some files on Amazon's S3 and I need to make sure that only my flash app running locally on that computer can access those files.I'm wondering what the best (most secure) approach would be for doing this.My initial thought is to make the files on S3 private and store the secret key on the local computer running the flash app. Then when I needed to access the files from flash I would send out an authenticated query string with some expiration time. The only problem with this is that I don't know how to generate the S3 signature in flash. Also I'm a little skeptical about storing the secret key on the flash machine (even though it's a privately owned machine with no other users using it).Is there a better approach perhaps?I have access to a server with PHP, so I could maybe use that as some kind of proxy, I'm just not sure how while keeping the file access secure and not creating a bottleneck through the web server (as opposed to direct access to S3).
View 1 Replies
Jun 11, 2010
I try to serialize objects with their private attributes, in Flex.
The introspection API does not seem to allow it:
"The describeType() method returns only public members. The method does not return private members of the caller's superclass or any other class where the caller is not an instance."
Is there another way for an instance to know the name of its private members?
View 1 Replies
Feb 16, 2011
I'm developing a framework for my coworkers and I'm having trouble documenting it.ASDocs as omitting the private members (even without @private directive).
View 1 Replies
Mar 28, 2011
one thing i've never really understood about AS3 is that you can't have a private set method and a public get method together. from within my class i would like to assign values that would call a private set function:
[Code]...
is there no way to use the set keyword on a private function?
View 4 Replies
Jan 18, 2012
I have a class which deals with a lot of visuals, which essentially are movieclips. So I have around 50 privately declared movieclips in the class. Would it be a good idea to put them in a dictionary and retrieve them by their name (as key) , put them in an array or just leave them as they are?
My issue is the visual look of my class right now with that many private members, looks like a mess visually.
View 1 Replies
Jun 6, 2009
Is there a way to change private static field of an alien class?[code]...
View 2 Replies
Mar 17, 2012
I am writing class that extends adobe air PNGEncoder,
I want to use the writeChunk method, but it seems to be private static and i cant seems to use it with my code But it gives the error as below
[Code].....
View 1 Replies
Aug 19, 2009
ActionScript Code:
private var __milena:LoadVars;
private function Loadprom(prom:String):Void {
[code].....
View 5 Replies
Dec 27, 2009
I have some code from a CS3 app composed of the .FLA file with an .AS file for the class that had definitions for two private classes in it. Yesterday I brought the files into CS4 and noticed that they did not compile. Gives an 1120, access of undefined property and names a constant. I have reduced this problem down to bare bones and it still occurs, so it is a bug in CS4.
[Code]....
View 8 Replies
Jan 15, 2010
how to retrieve these in other functions.
In my main class (package) I have a function (tipTrendHandler) which creates an object TextBox. The instance in the example is ttrend. The class is imported. However when trying to access the object and apply e.g. a method, declared in another function (e.g. displaySequence) it seems this object is unknown.
ActionScript Code:
package com {
import flash.display.*
import com.mycompany.TextBox;
[Code]....
View 1 Replies
Mar 1, 2010
Is it possible to dynamically load an XML file but keep the location and name of the XML private ?I have an XML file that contains users names and email addresses. I would like a way to make it difficult for people to get access to this XML doc
View 1 Replies
Apr 14, 2011
i have 20 cubes and i like to know how to dynamicly declare them
Code:
public class Dia01 extends BasicView {
for (var i:int = 0; i < 20; i++ ) {
private var cube:Cube = this["cube" + i ];
}
//private var cube0:Cube;
[Code]...
2/ furthermore, i have 4 different color states for each cube and i am thinking of using a matrix to color the cubes.
View 3 Replies