[Flashcoders] FlashVars - place data in a variable

2009-05-22 Thread webmastermack
I was so sure I had it but it looks like I have to accept defeat on this. I can 
trace the variable from everywhere in, out and around the code.  If hard coded 
the db call works but it simply will not accept the variable. I'm so very 
disappointed but enough is enough. It just doesn't work. Period.

Thanks for all your help.

-Mack

--- On Fri, 5/22/09, Bob Wohl  wrote:

From: Bob Wohl 
Subject: Re: [Flashcoders] FlashVars - place data in a variable
To: "Flash Coders List" 
Date: Friday, May 22, 2009, 3:58 PM

Hi Mack,

The variable should still be holding the value. When you trace keyStr
right before you do your call, does it come back null?

B.

On Fri, May 22, 2009 at 2:34 PM, webmastermack  wrote:
> Hi Bob,
>
> Thanks for looking at my code. I really appreciate it! Below are the two 
> scenarios that result in printing the string to the stage via a text field.
>
> //Version 1
> var keyStr:String;
> keyStr = stage.loaderInfo.parameters.itemID;
> texty.text = keyStr;
> addChild(texty);
>
> //Version 2
>
>         var keyStr:String;
>         var paramObj:Object = stage.loaderInfo.parameters;
>         var path_course:String;
>
>         for (keyStr in paramObj)
>             {
>                 keyStr = String(paramObj[keyStr]);
>                 texty.text = keyStr;
>             }
>
> If I reference keyStr outsided of text field, there is no response.
>
> Example:
> gw.connect("http://www.mysite.com/amfphp/gateway.php";);
> gw.call("load_data.my_data", res, keyStr);
>
> -Mack
>
>
> --- On Fri, 5/22/09, Bob Wohl  wrote:
>
> From: Bob Wohl 
> Subject: Re: [Flashcoders] FlashVars - place data in a variable
> To: "Flash Coders List" 
> Date: Friday, May 22, 2009, 2:15 PM
>
> This works just fine for me, I have an entire list of flashVars I have
> to access and set to variables to run an application. I wouldn't be
> able to loop them and know what I was accessing since they are all
> just string values. What you may want to do is trace the keyStr in
> your loop as well to see what is being looped:
>
> for (keyStr in paramObj){
> trace(keyStr+ " : "+paramObj[keyStr])
> }
>
>
> Still, you should be able to get to the loader info object and
> directly grab the flash var you want w/o looping through to get
> values.
>
> B.
>
>
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FlashVars - place data in a variable

2009-05-22 Thread webmastermack
Hi Bob,

Thanks for looking at my code. I really appreciate it! Below are the two 
scenarios that result in printing the string to the stage via a text field.

//Version 1
var keyStr:String;
keyStr = stage.loaderInfo.parameters.itemID;
texty.text = keyStr;
addChild(texty);

//Version 2

        var keyStr:String;
        var paramObj:Object = stage.loaderInfo.parameters;
        var path_course:String;

        for (keyStr in paramObj) 
            {   
                keyStr = String(paramObj[keyStr]);
                texty.text = keyStr;
            }    

If I reference keyStr outsided of text field, there is no response. 

Example:
gw.connect("http://www.mysite.com/amfphp/gateway.php";);
gw.call("load_data.my_data", res, keyStr);    

-Mack


--- On Fri, 5/22/09, Bob Wohl  wrote:

From: Bob Wohl 
Subject: Re: [Flashcoders] FlashVars - place data in a variable
To: "Flash Coders List" 
Date: Friday, May 22, 2009, 2:15 PM

This works just fine for me, I have an entire list of flashVars I have
to access and set to variables to run an application. I wouldn't be
able to loop them and know what I was accessing since they are all
just string values. What you may want to do is trace the keyStr in
your loop as well to see what is being looped:

for (keyStr in paramObj){
trace(keyStr+ " : "+paramObj[keyStr])
}


Still, you should be able to get to the loader info object and
directly grab the flash var you want w/o looping through to get
values.

B.






___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FlashVars - place data in a variable

2009-05-22 Thread webmastermack
Hi Bob,

Thanks for the code. Unfortunately the code you gave me didn't work for my 
AS3/CS3 file.  However I can trace out the data via for loop or through 
stage.loaderInfo.parameters directly.  But the only thing I can do with the 
data is print it out. (If I use the for loop I have the print is out inside the 
loop). This is really frustrating!  I don't need to print it out, I need to use 
it as a variable in a database query and it just won't go in!

Were you able to use your variable data in this way?

-Mack

--- On Fri, 5/22/09, Bob Wohl  wrote:

From: Bob Wohl 
Subject: Re: [Flashcoders] FlashVars - place data in a variable
To: "Flash Coders List" 
Date: Friday, May 22, 2009, 1:17 PM

So you are trying access strValue after your loop? It may be a scope
issue, try casting the var before the loop and trace after the loop.
Also, you may want to access your flash var one by one to help debug:

//quick example
var strValue:String = LoaderInfo(this.root.loaderInfo).parameters.strValue

trace(strValue)

B.

On Fri, May 22, 2009 at 1:04 PM, webmastermack  wrote:
> Hi everyone,
>
> I have added a text string to my swf using FlashVars.  I can output the 
> import text string to a text field just fine. However when I try to put it 
> into a variable that is used for criteria to contact a database, it doesn't 
> work.  The text string is loading into the swf, the database query works when 
> the text string is hard coded in and the text string can be displayed on the 
> stage via a text field.
>
> How do I place the imported text string into a variable? I am overlooking 
> something simple no doubt, but that simple item is eluding me.
>
> Example:
> //loads into a text field but won't stay in a variable
> keyStr = stage.loaderInfo.parameters.itemID;
>
>
> //loads into a text field but won't stay in a variable
> var paramObj:Object = stage.loaderInfo.parameters;
> for (keyStr in paramObj)
> {
> strValue = String(paramObj[keyStr]);
> myText.text = strValue;
> }
>
>
> I also tried putting it into a Global variable but no success
>
>
> All feedback is welcome!
>
> -Mack
>
>
>
>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FlashVars - place data in a variable

2009-05-22 Thread webmastermack
Hi everyone,

I have added a text string to my swf using FlashVars.  I can output the import 
text string to a text field just fine. However when I try to put it into a 
variable that is used for criteria to contact a database, it doesn't work.  The 
text string is loading into the swf, the database query works when the text 
string is hard coded in and the text string can be displayed on the stage via a 
text field.

How do I place the imported text string into a variable? I am overlooking 
something simple no doubt, but that simple item is eluding me.

Example: 
//loads into a text field but won't stay in a variable
keyStr = stage.loaderInfo.parameters.itemID; 


//loads into a text field but won't stay in a variable
var paramObj:Object = stage.loaderInfo.parameters;
for (keyStr in paramObj) 
{   
strValue = String(paramObj[keyStr]);
myText.text = strValue;
}


I also tried putting it into a Global variable but no success


All feedback is welcome!

-Mack





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] is imported db text safe from decompilers?

2009-05-13 Thread webmastermack
Very interesting video. Thanks for the info!

-Mack

--- On Wed, 5/13/09, Steven Sacks  wrote:

From: Steven Sacks 
Subject: Re: [Flashcoders] is imported db text safe from decompilers?
To: "Flash Coders List" 
Date: Wednesday, May 13, 2009, 3:58 PM

Encrypt your text using a super crazy encryption algorithm.

Then, create a swc that contains the key and algorithm to decrypt the text.

Then, encrypt that swc using another super crazy encryption algorithm.

Load the swc at runtime as raw bytes, decrypt it in memory, and then 
instantiate it as the class you need.

Decrypt the text.

Null out the swf instance and the bytes.

Force the gc to run.

That's about as protected as you can get.  Obviously, you'll need a pretty 
strong challenge response system in place to get the shared key to decrypt the 
swc in memory.

Don't know how to do this?

Watch this:  http://onflash.org/ted/2008/10/360flex-sj-2008-encrypting-flex.php
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] is imported db text safe from decompilers?

2009-05-13 Thread webmastermack
Good points have been raised. Thank you for quick your feedback!

Does anyone have recommendations for keeping text data as safe as possible? Is 
there a different track I should be taking? (I am open to leaving the Flash 
environment as well)

-Webmaster Mack




  
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] is imported db text safe from decompilers?

2009-05-13 Thread webmastermack
I should have mentioned that I am also using a SSL certificate to encrypt 
traffic to and from the site.  Doesn't this deter packet sniffers?

-Webmastermack

--
Yes, but it can easily be viewed as it's coming across the wire using
packet sniffers or other similar tools.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] is imported db text safe from decompilers?

2009-05-13 Thread webmastermack
Good day all,
 
To test my Flash site, I downloaded the free version of Sothink SWF Decompiler 
and was surprised at how much it was able to obtain from my swf - even the AS 
files in a protected folder on the server! Impressive in its own way...
 
I have used amfphp to import text from a mysql database.  This text did not 
appear in the decompiler.  
 
Is imported database text safe from a swf decompiler?
 
-Webmaster Mack




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders