Re: [flexcoders] How to store information in Cookies ???---Thank you :) Nick , Do you have an example of what you have done

2010-05-27 Thread Nick Middleweek
Yeah sure...

/**
 * Resets the ADG zoom feature to the browser-cookie stored
value or to 100%
 * if there isn't one and then saves 100% to the browser-cookie.
 *
 * @param event The Event Object.
 * @return void
 */
private function zoomMenuReset ( event : Event ) : void
{
var numIndex : Number = 0;
var strCookieScale : String = '';
var objCookieScale : Object;
objCookieScale = CookieUtil.getCookie(
'intFontScalePercentage' );

if ( objCookieScale == null )
strCookieScale = "100"; //If there's no cookie then we
default it to 100%
else
strCookieScale = objCookieScale.toString();

for each ( var Obj : Object in zoomMenu.dataProvider )
{
if ( Obj.scale == Number( strCookieScale ))
break;
else
numIndex++;
}

zoomMenu.selectedIndex = numIndex;
zoomScale.label = zoomMenu.dataProvider[
zoomMenu.selectedIndex ].label;
intFontScalePercentage = zoomMenu.dataProvider[
zoomMenu.selectedIndex ].scale;
zoomScale.close();
CookieUtil.setCookie( 'intFontScalePercentage',
intFontScalePercentage.toString(), 120 );
}


HTH,
Nick



On 27 May 2010 11:48, Nini7016 Nini7016  wrote:

>
>
> Thank you very much Nick
>
> Could you give an example which shows how do you have done to restore your
> selected value please :) It will be very helpful for me :)
>
> Thank you very much
>
> --
> To: flexcoders@yahoogroups.com
> From: n...@middleweek.co.uk
> Date: Thu, 27 May 2010 10:51:00 +0100
> Subject: Re: [flexcoders] How to store information in Cookies ???
>
>
>  Hi,
>
> Cookies are pretty easy to use, I did something very similar, storing the
> selected value from a Menu.
>
> First things first, download the "CookieUtil" library and plug it into your
> project.
>
> Then you can use CookieUtil.setCookie and CookieUtil.getCookie to set and
> get the values.
>
>
> Hope that helps,
> Nick
>
> --
> Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog:
> http://blog.middleweek.co.uk } );
>
>
>
>
> On 27 May 2010 10:14, Nini7016 Nini7016  wrote:
>
>
>  Hello :)
>
> I have a menu item et i would like to store these information in
> CookiesI didn't work with Cookies before :( :( ...Do you have any
> example please please ...
>   there is a code for the menu item :
>  
> 
>  type="check" toggled="false"/>
>  type="check" toggled="false"/>
>  type="check" toggled="true"/>
> 
> 
>
>And when the user modifie these infomation by checking an option, i
> would like to store these information .
>
>   Any idea please ...???
>
>   Thank you very much :):):)
>
>
>
>
>
>
> --
> Vous voulez protéger votre vie privée ? La solution avec Internet Explorer
> 8 
>  
>



-- 
Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog:
http://blog.middleweek.co.uk } );


RE: [flexcoders] How to store information in Cookies ???---Thank you :) Nick , Do you have an example of what you have done

2010-05-27 Thread Nini7016 Nini7016

Thank you very much Nick 

Could you give an example which shows how do you have done to restore your 
selected value please :) It will be very helpful for me :)

Thank you very much 

To: flexcoders@yahoogroups.com
From: n...@middleweek.co.uk
Date: Thu, 27 May 2010 10:51:00 +0100
Subject: Re: [flexcoders] How to store information in Cookies ???


















 



  



  
  
  Hi,

Cookies are pretty easy to use, I did something very similar, storing the 
selected value from a Menu.

First things first, download the "CookieUtil" library and plug it into your 
project.



Then you can use CookieUtil.setCookie and CookieUtil.getCookie to set and get 
the values.


Hope that helps,
Nick

-- 
Sent by Nick Middleweek ( { email: n...@middleweek.co.uk, blog: 
http://blog.middleweek.co.uk } );






On 27 May 2010 10:14, Nini7016 Nini7016  wrote:

















 



  



  
  
  


Hello :)

I have a menu item et i would like to store these information in CookiesI 
didn't work with Cookies before :( :( ...Do you have any example please please 
...
  there is a code for the menu item : 


 











   And when the user modifie these infomation by checking an option, i would 
like to store these information .

  Any idea please ...??? 



  Thank you very much :):):)








 









  
_
Installez gratuitement les nouvelles Emoch'ticones !
http://www.ilovemessenger.fr/emoticones/telecharger-emoticones-emochticones.aspx