[Flashcoders] Re: SWAddress logical workflow

2009-06-13 Thread Omar Fouad
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  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  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.  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.f

Re: [Flashcoders] Re: SWAddress logical workflow

2009-06-13 Thread Gerry
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  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.  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


[Flashcoders] Re: SWAddress logical workflow

2009-06-13 Thread Omar Fouad
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  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.  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


Re: [Flashcoders] Re: SWAddress logical workflow

2009-06-13 Thread Gerry
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.  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


[Flashcoders] Re: SWAddress logical workflow

2009-06-13 Thread Omar Fouad
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.  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


Re: [Flashcoders] SWAddress logical workflow

2009-06-13 Thread Matt S.
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


Re: [Flashcoders] SWAddress logical workflow

2009-06-13 Thread Gerry

Omar,
This is what I do, this works for me but do with it what you want.
This is not the exact code but a general sequence...

On the loading of the site I have an initialization of listeners and  
included is the following...


SWFAddress.addEventListener(SWFAddressEvent.CHANGE, navigateToSection);


After all intro animations are complete ( if you have any) I get the  
address

from the address bar and set a variable...
//var for the website address/ title

var _siteTitle:String = "Comany Name | 123 Main St. MyTown, NJ 08234";
var initial:String;
var _string:String;

initial = SWFAddress.getValue();

Then I'll send the current value to SWFAddress...

SWFAddress.setValue(initial);

Now my function that is associated with swfaddress events handles  
everything


private function navigateToSection(e:SWFAddressEvent):void {
//set section from swfaddress event
_string = e.value;

var addrString:String = _string.split("/").join("");

			//Here I have a switch to show whatever section the user wants to  
view


switch (_string) {

case "/About/" :

//Load the About section
	//The following will concat the variable for the site title and  
add the current section and update the page title


SWFAddress.setTitle(_siteTitle+" | 
"+addrString);
//call proper functions
dispatchEvent(new Event("open 
section"));
OR
	you could call a specific function to display the About section  
contents

break;

case "/Contact/" :

//Load the Contact section
	//The following will concat the variable for the site title and  
add the current section and update the page title


SWFAddress.setTitle(_siteTitle+" | 
"+addrString);
//call proper functions
dispatchEvent(new Event("open 
section"));
OR
	you could call a specific function to display the About section  
contents

break;
//more cases below for each section of 
your site
}
}

You could have an eventListener for the dispatched event (above) to  
listen for "open section" then
that function could load data using the _string info as a value to  
determine what to load..
I'm only on my first cup of coffee so if this doesn't make any sense  
let me know.



-Gerry
www.thespikeranch.com


On Jun 13, 2009, at 8:04 AM, Omar Fouad wrote:


Hi,

I've been involved into a project where the client required the deep  
linking

feature.
The project is built with pure AS3 embedding symbols from a SWF  
library

file, ZendAMF php and mysql,
Now the question is how can I sync the address with the current  
state of my
flash movie. All I know is that I have two things to do, which are  
to change
the flash state then change the address, and at the other hand to  
listen for

address changes and change the state based on that change.

What sounded logical to me is to change the link address directly when
changing the state so that when the address changes, the listener  
handler

logic brings the right flash state... like this:

HomeButton.addEventListener(MouseEvent.CLICK, onButtonClick);
SWFAddress.addEventListner(SWFAddressEvent.CHANGE, onAddressChange);

private function onButtonClick(e:MouseEvent):void {
   //changes the address here to "www.mysite.com/#/home
}
private function  onAddressChange(e:SWFAddressEvent):void {
  //reads the address, understands that refers to home, and changes  
the

state to home.
}

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.

Cordially.



--
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/flas

[Flashcoders] SWAddress logical workflow

2009-06-13 Thread Omar Fouad
Hi,

I've been involved into a project where the client required the deep linking
feature.
The project is built with pure AS3 embedding symbols from a SWF library
file, ZendAMF php and mysql,
Now the question is how can I sync the address with the current state of my
flash movie. All I know is that I have two things to do, which are to change
the flash state then change the address, and at the other hand to listen for
address changes and change the state based on that change.

What sounded logical to me is to change the link address directly when
changing the state so that when the address changes, the listener handler
logic brings the right flash state... like this:

HomeButton.addEventListener(MouseEvent.CLICK, onButtonClick);
SWFAddress.addEventListner(SWFAddressEvent.CHANGE, onAddressChange);

private function onButtonClick(e:MouseEvent):void {
//changes the address here to "www.mysite.com/#/home
}
private function  onAddressChange(e:SWFAddressEvent):void {
   //reads the address, understands that refers to home, and changes the
state to home.
}

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.

Cordially.



-- 
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