...

View Full Version : links in actionscript



budla
01-21-2009, 09:04 PM
Hello,

on(release) {
if(_root.link<>num) {
_root.link_prev=_root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.menu2["item" + _root.link].gotoAndPlay("s2");
_root.link=num;
geturl("modules/More_Polls/index.php");
}


I am having a problem with the navigation links "building" on top of each other. What is the best way to add this link to this code http://www.norcalg35.com/modules/More_Polls/index.php

gnomeontherun
01-21-2009, 09:26 PM
Why not put the whole link?


on(release) {
if(_root.link<>num) {
_root.link_prev=_root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.menu2["item" + _root.link].gotoAndPlay("s2");
_root.link=num;
geturl("http://www.norcalg35.com/modules/More_Polls/index.php");
}

budla
01-22-2009, 01:53 AM
Why not put the whole link?


on(release) {
if(_root.link<>num) {
_root.link_prev=_root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.menu2["item" + _root.link].gotoAndPlay("s2");
_root.link=num;
geturl("http://www.norcalg35.com/modules/More_Polls/index.php");
}


For some reason the links don't work at all when I type in the whole link: http://www.norcalg35.com/modules/More_Polls/index.php

I must be missing something simple here, I just can't figure it out..

gnomeontherun
01-22-2009, 08:24 AM
How about adding a target to the getURL?


on(release) {
if(_root.link<>num) {
_root.link_prev=_root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.menu2["item" + _root.link].gotoAndPlay("s2");
_root.link=num;
geturl("http://www.norcalg35.com/modules/More_Polls/index.php","_self");
}

tudy.n
08-16-2009, 10:06 AM
How about adding a target to the getURL?


on(release) {
if(_root.link<>num) {
_root.link_prev=_root.link;
_parent["item" + _root.link].gotoAndPlay("s2");
_root.menu2["item" + _root.link].gotoAndPlay("s2");
_root.link=num;
geturl("http://www.norcalg35.com/modules/More_Polls/index.php","_self");
}

in my opinion you need to write geturl outside if basically what the if does is creat an animation( a quite interresting animation with just two tweens ), as opposed to geturl which is an action that you need to do outside the animation! if you need any help understanding this part of the code just tell me, it gave me a hard time too, but i finally managed to understand it.

cheers



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum