[SWFObject] Deeplinking w/ Anchors into containers
Geoff Stearns
geoff at deconcept.com
Tue Oct 31 14:49:07 PST 2006
well, the code i gave would just pass in the hash value as is...
so you would have a var called _root.hash that would be equal to "#/
something/somethingelse/whateverelse"
- you don't have to format it that way, and if you want to you can
use name/value pairs instead, and then use the getQueryParam() method
build into swfobject to pull out individual values. an example of
that would look like:
your url is yourpage.html#foo=bar&foo2=bar2
then your js/swfobject code would look like:
so.addVariable("foo", getQueryParamValue("foo"));
so.addVariable("foo2", getQueryParamValue("foo2"));
which would then give you 2 vars on the root of your movie, one
called "foo" with a value of "bar" and one called "foo2" with a value
of "bar2"
once you have the vars into your swf, it's up to you what you do with
them... you treat them just like you would any other variable.
On Oct 31, 2006, at 5:38 PM, Ade Olufeko wrote:
> thanks for responding Geoff.. hmmm ..
> so maybe something..
>
> something like
> //holder is the instance for the container
> //artists will be the anchor tag
> so.addVariable(" hash", holder, artists); ?
>
> then
> // root.hash var
>
> what the var is supposed to be, would it be the fuction the buttons
> are using?
> sorry....i am a little lost..
>
>
>
>
> On 10/31/06, Geoff Stearns <geoff at deconcept.com> wrote:
> sure, you just need to pass in the hash to the flash movie when it
> loads, which is really easy:
>
> so.addVariable("hash", document.location.hash);
>
> then take the _root.hash var when the movie starts and use that to
> load the appropriate swf.
>
>
>
> On Oct 31, 2006, at 5:18 PM, Ade Olufeko wrote:
>
>> hello peeps I was just reading a post about anchors from over here
>> http://www.noscope.com/journal/2004/04/named-anchors
>> I was wondering if something like that could be applied to flash
>> movies with containers loading other movies...?
>>
>>
>> a good example... if you go to this url http://www.2advanced.com/
>> #casestudies/byproject it will skip all the intros and go
>> directly to the that section of the flash movie.
>> sometimes its a little more complex when the flash movie uses a
>> container to load other swfs.. e.g jumi.swf, about.swf,
>> buy.swf jumi swf contains a holder where all the other swfs are
>> supposed to be loaded into. i cant figure out how to deeplink
>> that. I am baffled! any help would be great.
>>
>> //My main movie loads into here:
>>
>> mcl.loadClip ("/Site/swfs
>> /sites_main.swf",holder);
>>
>> //My functions, button example
>>
>> b1.onRelease = function() {
>> loader._visible = true;
>> mcl.loadClip("/Site/swfs
>> /Site_some.swf",holder);
>> }
>>
>>
>> _______________________________________________
>> SWFObject mailing list
>> SWFObject at lists.deconcept.com
>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20061031/71f552c6/attachment-0005.htm>
More information about the Swfobject
mailing list