[Flashcoders] Re: SWAddress logical workflow

2009-06-16 Thread Omar Fouad
No ideas?

On 6/14/09, Omar Fouad omarfouad@gmail.com wrote:
 Well i believe that group 94 are using a different technique to
 implement SWFAddress dynamically. Ty also took care of fast
 next-previous browsing. What do you think?

 On 6/14/09, Gerry noentour...@gmail.com wrote:
 That's strange, you might be setting the value later in your sequence.
 I've never had this happen before.
 Are you intending to change the title after the slide animation?
 I call setTitle at the same time I call the function to switch sections.
 On the undefined situation, you will probably have to write a
 conditional to handle undefined dates and/or
 include code to not allow future dates.
 -Gerry

 On Jun 13, 2009, at 2:19 PM, Omar Fouad wrote:

 Well i can do that but i don't use that syntax. i instead do
 /gallery/2. At the end i omit the first forward slash from the address
 value string, i split it to get an array of parameters such as, in
 this case, gallery and 2 which is the id of the photo to load.
 The dilemma now is to sync all this together. I don't know if you
 noticed but the address changing in the browser occurs after a second
 and not immediately. Check www.fwaphoto.com play with it and check the
 address behaviour after clicking. Today i discovered something
 interesting. In the address, replace the date of a picture to any date
 in the future like this www.fwaphoto.com/#/2009-6-20 and see what
 happens to the address when it finds nothing. The date changes to
 undefined! What the hell does this mean?

 On 6/13/09, Gerry noentour...@gmail.com wrote:
 Yeah, I understand. You'll need to figure out how to allow for extra
 params in the url.
 My function with the switch conditional code could be replaced with
 code that handles
 dynamic params.
 ie. do something with the string that includes /sectionName and if
 there is extra params
  after /sectionName?img=  do something else.
 I'm just spit balling but that might be what you have to do.
 I don't think I've ever seen any tutorials on how anyone else has
 handled that.

 -Gerry

 On Jun 13, 2009, at 12:15 PM, Omar Fouad wrote:

 Thanks Gerry this is exactly what i do. But as Matt says there is a
 problem when i rapidily fire next and previous, things screw up.
 Another thing, what if i have a section in my movie like a gallery,
 and i need to add an additional parameter to the address like the
 photo id to load the image, this is tricky.  i've been experiencing
 too much problems.

 On 6/13/09, Matt S. mattsp...@gmail.com wrote:
 Can you describe what the bugs are? SWFAddress can be tricky,
 especially with rapid-fire clicking of the browser previous/next
 buttons.

 .m


 I don't know if this is the right thing to do in this case. I just
 need
 some
 advice because things are too much buggy.

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


 --
 Sent from my mobile device

 Omar M. Fouad - Adobe Flash™ Platform Developer
 www.omar-fouad.net
 Cellular: (+20) 1011.88.534
 Mail: m...@omar-fouad.net

 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential
 information and/or be subject to legal privilege. It should not be
 copied, disclosed to, retained or used by, any other party. If you
 are
 not an intended recipient then please promptly delete this e-mail
 and
 any attachment and all copies and inform the sender. Thank you.

 ___
 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


 --
 Sent from my mobile device

 Omar M. Fouad - Adobe Flash™ Platform Developer
 www.omar-fouad.net
 Cellular: (+20) 1011.88.534
 Mail: m...@omar-fouad.net

 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential
 information and/or be subject to legal privilege. It should not be
 copied, disclosed to, retained or used by, any other party. If you are
 not an intended recipient then please promptly delete this e-mail and
 any attachment and all copies and inform the sender. Thank you.

 ___
 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


 --
 Sent from my mobile device

 Omar M. Fouad - Adobe Flash™ Platform Developer
 www.omar-fouad.net
 Cellular: (+20) 1011.88.534
 Mail: m...@omar-fouad.net

 This e-mail and any attachment is for 

[Flashcoders] skinning in cs4 tutorial help

2009-06-16 Thread Gustavo Duenas LRS
Anyone knows a good tutorial about how to skin the slider component  
for text fields in flash cs4?


Regards,

Gustavo


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


[Flashcoders] array.indexOf problem

2009-06-16 Thread Isaac Alves
Hi fellows,
Cannot solve this problem:

function buttonClicked(e:Event):void {
 trace (buttonsArray.indexOf(e.target.name));

It always  traces -1. This code should trace the index of the Array
element right? for ex: 0, 1, 2 or 3.

If i do this, it will trace the correct name of the element.

function buttonClicked(e:Event):void {
 trace (e.target.name);

If I do this, it will trace the name of the second element:

function buttonClicked(e:Event):void {
 trace (buttonsArray[1].name);

Why indexOf doesn´t work properly?

Thanks a lot!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] array.indexOf problem

2009-06-16 Thread Glen Pike

Try e.currentTarget ??

Isaac Alves wrote:

Hi fellows,
Cannot solve this problem:

function buttonClicked(e:Event):void {
 trace (buttonsArray.indexOf(e.target.name));

It always  traces -1. This code should trace the index of the Array
element right? for ex: 0, 1, 2 or 3.

If i do this, it will trace the correct name of the element.

function buttonClicked(e:Event):void {
 trace (e.target.name);

If I do this, it will trace the name of the second element:

function buttonClicked(e:Event):void {
 trace (buttonsArray[1].name);

Why indexOf doesn´t work properly?

Thanks a lot!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

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


Re: [Flashcoders] array.indexOf problem

2009-06-16 Thread Juan Pablo Califano
Hi,

Perhaps you're storing a reference to the button in buttonsArray?

In that case, you should do:

buttonsArray.indexOf(e.target);


Cheers
Juan Pablo Califano


2009/6/16, Isaac Alves isaacal...@gmail.com:

 Hi fellows,
 Cannot solve this problem:

function buttonClicked(e:Event):void {
 trace (buttonsArray.indexOf(e.target.name));

 It always  traces -1. This code should trace the index of the Array
 element right? for ex: 0, 1, 2 or 3.

 If i do this, it will trace the correct name of the element.

function buttonClicked(e:Event):void {
 trace (e.target.name);

 If I do this, it will trace the name of the second element:

function buttonClicked(e:Event):void {
 trace (buttonsArray[1].name);

 Why indexOf doesn´t work properly?

 Thanks a lot!
 ___
 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


Re: [Flashcoders] array.indexOf problem

2009-06-16 Thread Keith H

trace (buttonsArray.indexOf(e.target.name));


Looking at the aboveyour buttonsArray  is  an  Array containing 
Objects.

And you are using the indexOf method looking for a String.

Take off the .name property and you should see a difference.


-- Keith H --
www.keith-hair.net





Isaac Alves wrote:

Hi fellows,
Cannot solve this problem:

function buttonClicked(e:Event):void {
 trace (buttonsArray.indexOf(e.target.name));

It always  traces -1. This code should trace the index of the Array
element right? for ex: 0, 1, 2 or 3.

If i do this, it will trace the correct name of the element.

function buttonClicked(e:Event):void {
 trace (e.target.name);

If I do this, it will trace the name of the second element:

function buttonClicked(e:Event):void {
 trace (buttonsArray[1].name);

Why indexOf doesn´t work properly?

Thanks a lot!
___
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


Re: [Flashcoders] Re: SWAddress logical workflow

2009-06-16 Thread Glen Pike
I see what you mean by setting a future date on the FWA site - I managed 
to screw up the history completely (FF2 WinXP) so got stuck forever on 
that date a bit like Groundhog Day :) 

I think the only way to deal with fast browsing is to allow your loading 
/ transition process to be interrupted if you keep getting changes from 
SWFAddress.  Personally, I have not really thought about this in my 
stuff before, but the way you said you were approaching the SWFAddress 
bit seemed sensible to me - going a round-about way by setting the URL 
when you navigate in Flash then responding to the change via 
SWFAddress.  This seems much safer because everything goes through a 
single route.


There is a nice example of doing the dynamic thing with PHP in the 
SWFAddress examples.  You can even tweak the whole site with Apache  
mod_rewrite to get pretty URL's - this may / may not work with Zend 
AMF quite nicely so download and examine this example: 
http://www.asual.com/swfaddress/samples/seo/ which seems to be the 
smoothest one.


If you are worried about fast clicking, have a look to see how an HTML 
site behaves with this - I guess you get half-assed page loading, etc. 
But people expect to wait a bit for something to load if they go back  
forth, you just have to be prepared to interrupt what you are doing (I 
should probably take my own advice here and make sure my SWFAddress site 
behaves nicely)


Hope this helps and if you come up with any interesting stuff, let us know!

Glen

Omar Fouad wrote:

No ideas?

On 6/14/09, Omar Fouad omarfouad@gmail.com wrote:
  

Well i believe that group 94 are using a different technique to
implement SWFAddress dynamically. Ty also took care of fast
next-previous browsing. What do you think?

On 6/14/09, Gerry noentour...@gmail.com wrote:


That's strange, you might be setting the value later in your sequence.
I've never had this happen before.
Are you intending to change the title after the slide animation?
I call setTitle at the same time I call the function to switch sections.
On the undefined situation, you will probably have to write a
conditional to handle undefined dates and/or
include code to not allow future dates.
-Gerry

On Jun 13, 2009, at 2:19 PM, Omar Fouad wrote:

  

Well i can do that but i don't use that syntax. i instead do
/gallery/2. At the end i omit the first forward slash from the address
value string, i split it to get an array of parameters such as, in
this case, gallery and 2 which is the id of the photo to load.
The dilemma now is to sync all this together. I don't know if you
noticed but the address changing in the browser occurs after a second
and not immediately. Check www.fwaphoto.com play with it and check the
address behaviour after clicking. Today i discovered something
interesting. In the address, replace the date of a picture to any date
in the future like this www.fwaphoto.com/#/2009-6-20 and see what
happens to the address when it finds nothing. The date changes to
undefined! What the hell does this mean?

On 6/13/09, Gerry noentour...@gmail.com wrote:


Yeah, I understand. You'll need to figure out how to allow for extra
params in the url.
My function with the switch conditional code could be replaced with
code that handles
dynamic params.
ie. do something with the string that includes /sectionName and if
there is extra params
 after /sectionName?img=  do something else.
I'm just spit balling but that might be what you have to do.
I don't think I've ever seen any tutorials on how anyone else has
handled that.

-Gerry

On Jun 13, 2009, at 12:15 PM, Omar Fouad wrote:

  

Thanks Gerry this is exactly what i do. But as Matt says there is a
problem when i rapidily fire next and previous, things screw up.
Another thing, what if i have a section in my movie like a gallery,
and i need to add an additional parameter to the address like the
photo id to load the image, this is tricky.  i've been experiencing
too much problems.

On 6/13/09, Matt S. mattsp...@gmail.com wrote:


Can you describe what the bugs are? SWFAddress can be tricky,
especially with rapid-fire clicking of the browser previous/next
buttons.

.m


  

I don't know if this is the right thing to do in this case. I just
need
some
advice because things are too much buggy.



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

  

--
Sent from my mobile device

Omar M. Fouad - Adobe Flash™ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be
copied, disclosed to, retained or used by, any other party. If you
are
not an intended recipient then please 

Re: [Flashcoders] array.indexOf problem

2009-06-16 Thread Steven Sacks

Your sample doesn't show how you build the Array.

So the answer to your incomplete question is nothing different than  
what Flash is telling you.


The reason it returns -1 is because indexOf couldn't find a STRICT  
EQUALITY match for e.target.name in your array.


If you posted how you built buttonsArray, you'd probably solve your  
own problem by looking at the code you wrote more closely.



On Jun 16, 2009, at 12:48 PM, Isaac Alves wrote:


Hi fellows,
Cannot solve this problem:

   function buttonClicked(e:Event):void {
trace (buttonsArray.indexOf(e.target.name));

It always  traces -1. This code should trace the index of the Array
element right? for ex: 0, 1, 2 or 3.

If i do this, it will trace the correct name of the element.

   function buttonClicked(e:Event):void {
trace (e.target.name);

If I do this, it will trace the name of the second element:

   function buttonClicked(e:Event):void {
trace (buttonsArray[1].name);

Why indexOf doesn´t work properly?

Thanks a lot!
___
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


Re: [Flashcoders] Re: SWAddress logical workflow

2009-06-16 Thread Steven Sacks
This is exactly how Gaia works.  goto() calls setValue on SWFAddress  
and the response is dispatched to the framework to handle the  
navigation.  Interrupts are handled in both loading and transitions.   
It's open source, so you're welcome to examine how it's done in Gaia.



On Jun 16, 2009, at 1:08 PM, Glen Pike wrote:

I see what you mean by setting a future date on the FWA site - I  
managed to screw up the history completely (FF2 WinXP) so got stuck  
forever on that date a bit like Groundhog Day :)
I think the only way to deal with fast browsing is to allow your  
loading / transition process to be interrupted if you keep getting  
changes from SWFAddress.  Personally, I have not really thought  
about this in my stuff before, but the way you said you were  
approaching the SWFAddress bit seemed sensible to me - going a round- 
about way by setting the URL when you navigate in Flash then  
responding to the change via SWFAddress.  This seems much safer  
because everything goes through a single route.


There is a nice example of doing the dynamic thing with PHP in the  
SWFAddress examples.  You can even tweak the whole site with Apache  
 mod_rewrite to get pretty URL's - this may / may not work with  
Zend AMF quite nicely so download and examine this example: http://www.asual.com/swfaddress/samples/seo/ 
 which seems to be the smoothest one.


If you are worried about fast clicking, have a look to see how an  
HTML site behaves with this - I guess you get half-assed page  
loading, etc. But people expect to wait a bit for something to load  
if they go back  forth, you just have to be prepared to interrupt  
what you are doing (I should probably take my own advice here and  
make sure my SWFAddress site behaves nicely)


Hope this helps and if you come up with any interesting stuff, let  
us know!


Glen


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


Re: [Flashcoders] array.indexOf problem

2009-06-16 Thread Todd Kerpelman
It sounds like your array is full of button objects, but you're
searching for a string (the button name), and an object and a string
don't match.

Remove the .name from the key you're searching for, and I believe it
should work.

-T



On 6/16/09, Isaac Alves isaacal...@gmail.com wrote:
 Hi fellows,
 Cannot solve this problem:

 function buttonClicked(e:Event):void {
  trace (buttonsArray.indexOf(e.target.name));

 It always  traces -1. This code should trace the index of the Array
 element right? for ex: 0, 1, 2 or 3.

 If i do this, it will trace the correct name of the element.

 function buttonClicked(e:Event):void {
  trace (e.target.name);

 If I do this, it will trace the name of the second element:

 function buttonClicked(e:Event):void {
  trace (buttonsArray[1].name);

 Why indexOf doesn´t work properly?

 Thanks a lot!
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


-- 
Sent from my mobile device

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


Re: [Flashcoders] Re: SWAddress logical workflow

2009-06-16 Thread Omar Fouad
Thanks Guys, for the replies I'll see your example Glen.

On Tue, Jun 16, 2009 at 11:27 PM, Steven Sacks flash...@stevensacks.netwrote:

 This is exactly how Gaia works.  goto() calls setValue on SWFAddress and
 the response is dispatched to the framework to handle the navigation.
  Interrupts are handled in both loading and transitions.  It's open source,
 so you're welcome to examine how it's done in Gaia.


 On Jun 16, 2009, at 1:08 PM, Glen Pike wrote:

 I see what you mean by setting a future date on the FWA site - I managed to
 screw up the history completely (FF2 WinXP) so got stuck forever on that
 date a bit like Groundhog Day :)
 I think the only way to deal with fast browsing is to allow your loading /
 transition process to be interrupted if you keep getting changes from
 SWFAddress.  Personally, I have not really thought about this in my stuff
 before, but the way you said you were approaching the SWFAddress bit seemed
 sensible to me - going a round-about way by setting the URL when you
 navigate in Flash then responding to the change via SWFAddress.  This seems
 much safer because everything goes through a single route.

 There is a nice example of doing the dynamic thing with PHP in the
 SWFAddress examples.  You can even tweak the whole site with Apache 
 mod_rewrite to get pretty URL's - this may / may not work with Zend AMF
 quite nicely so download and examine this example:
 http://www.asual.com/swfaddress/samples/seo/ which seems to be the
 smoothest one.

 If you are worried about fast clicking, have a look to see how an HTML
 site behaves with this - I guess you get half-assed page loading, etc. But
 people expect to wait a bit for something to load if they go back  forth,
 you just have to be prepared to interrupt what you are doing (I should
 probably take my own advice here and make sure my SWFAddress site behaves
 nicely)

 Hope this helps and if you come up with any interesting stuff, let us
 know!

 Glen


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




-- 
Omar M. Fouad - Adobe Flash™ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Re: SWAddress logical workflow

2009-06-16 Thread Omar Fouad
I almost forgot... what do you mean by interrupting the loading / transition
of the site?

On Wed, Jun 17, 2009 at 3:56 AM, Omar Fouad omarfouad@gmail.com wrote:

 Thanks Guys, for the replies I'll see your example Glen.


 On Tue, Jun 16, 2009 at 11:27 PM, Steven Sacks 
 flash...@stevensacks.netwrote:

 This is exactly how Gaia works.  goto() calls setValue on SWFAddress and
 the response is dispatched to the framework to handle the navigation.
  Interrupts are handled in both loading and transitions.  It's open source,
 so you're welcome to examine how it's done in Gaia.


 On Jun 16, 2009, at 1:08 PM, Glen Pike wrote:

 I see what you mean by setting a future date on the FWA site - I managed
 to screw up the history completely (FF2 WinXP) so got stuck forever on that
 date a bit like Groundhog Day :)
 I think the only way to deal with fast browsing is to allow your loading
 / transition process to be interrupted if you keep getting changes from
 SWFAddress.  Personally, I have not really thought about this in my stuff
 before, but the way you said you were approaching the SWFAddress bit seemed
 sensible to me - going a round-about way by setting the URL when you
 navigate in Flash then responding to the change via SWFAddress.  This seems
 much safer because everything goes through a single route.

 There is a nice example of doing the dynamic thing with PHP in the
 SWFAddress examples.  You can even tweak the whole site with Apache 
 mod_rewrite to get pretty URL's - this may / may not work with Zend AMF
 quite nicely so download and examine this example:
 http://www.asual.com/swfaddress/samples/seo/ which seems to be the
 smoothest one.

 If you are worried about fast clicking, have a look to see how an HTML
 site behaves with this - I guess you get half-assed page loading, etc. But
 people expect to wait a bit for something to load if they go back  forth,
 you just have to be prepared to interrupt what you are doing (I should
 probably take my own advice here and make sure my SWFAddress site behaves
 nicely)

 Hope this helps and if you come up with any interesting stuff, let us
 know!

 Glen


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




 --
 Omar M. Fouad - Adobe Flash™ Platform Developer
 www.omar-fouad.net
 Cellular: (+20) 1011.88.534
 Mail: m...@omar-fouad.net

 This e-mail and any attachment is for authorised use by the intended
 recipient(s) only. It may contain proprietary material, confidential
 information and/or be subject to legal privilege. It should not be copied,
 disclosed to, retained or used by, any other party. If you are not an
 intended recipient then please promptly delete this e-mail and any
 attachment and all copies and inform the sender. Thank you.




-- 
Omar M. Fouad - Adobe Flash™ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders