...

View Full Version : My flash buttons stop working once used once why?



Mkcoy
02-10-2009, 12:39 AM
Flash buttons stop working once used once.
On my flash header / logo once it loads you can click any of the 5 links fine and it it goes to that page, once on that page though the links stop working :confused:
try it and youll know what i mean.
very strange must be something to do with the actionscript but i dont know much about that. its just a template we purchased.
i know some flash and managed to edit it and add my own links etc in the actionscript but it shoudlnt be doing that. :/

ive used this before and it works ok on my other site maybe i should try copying the actionscript from that one into the one im using now.
unless someone sees this and knows exactly why it does that and has a very simple answer for me.
heres the website http://www.gomotorsuk.com/
its just a dormant personal company at the minute.

hope someones can help :)

gnomeontherun
02-10-2009, 10:24 AM
Post the AS, and any XML that you have to configure it, but that is strange...

Mkcoy
02-10-2009, 01:33 PM
Right..

AS for the links. This first bit is the bit when you click once on the selection.

onClipEvent (load) {
num = 1;
}

This is the AS when you double click the object.

on (rollOver) {
if (_root.link<>num) {
gotoAndPlay("st1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>num) {
gotoAndPlay("st2");
}
}
on (release) {
if (_root.link<>num) {
_parent["but"+_root.link].gotoAndPlay("st2");
_parent["but"+_root.link].bt1.useHandCursor = 1;
bt1.useHandCursor = 0;
_root.link = num;
}
getURL("http://gomotorsuk.com/index.html");
}

Which is exactly the same for all the other buttons other than the URL obviously.

Here is the code from button 1 from the untouched (original) fla file.

on (rollOver) {
if (_root.link<>num) {
gotoAndPlay("st1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>num) {
gotoAndPlay("st2");
}
}
on (release) {
if (_root.link<>num) {
_parent["but"+_root.link].gotoAndPlay("st2");
_parent["but"+_root.link].bt1.useHandCursor = 1;
bt1.useHandCursor = 0;
_root.link = num;
}
getURL("index.html");
}


Identical :S
This has really got my stumped.
I had a similar problem to this with my links before and that was that they wouldnt work at all when viewed / used across the internet yet they worked fine locally.
Found out there was a setting to allow network access when you save the flash file though.
But that shouldnt have anything to do with this problem.

Someone somewhere though has to have the answer to this!

gnomeontherun
02-10-2009, 01:46 PM
This isn't the code for the buttons, my guess is you bought this? Its probably hidden.

So this works locally, but not elsewhere? My thoughts are this: make sure that in all of the pages that don't work that the link to the xml config file are correct. It could be that you have it set to look in the local folder, and if its not there then nothing will happen.

Let me know.

Mkcoy
02-10-2009, 04:07 PM
ake sure that in all of the pages that don't work that the link to the xml config file are correct. It could be that you have it set to look in the local folder

Yes i purchased this as a flash template that i have modified
It used to only work locally however i got it working externally now.
(It was down to different versions of flash. This being made in flash 7 or 8 and me owning CS3)
There are some compatibility issues apparantly..

The only code i have on the pages relevant to this is the object code that the flash file is held in.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="764" height="263">
<param name="movie" value="flash/headerv7.swf?button=1">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
<!--[if !IE]> <-->
<object data="flash/headerv7.swf?button=1"
width="764" height="263" type="application/x-shockwave-flash">
<param name="quality" value="high">

<param name="menu" value="false">
<param name="wmode" value="transparent">
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer">
FAIL (the browser should render some flash content, not this).
</object><!--> <![endif]>
</object>

I dont have an xml config file just a .fla file and save it as a .swf file.
I have no idea why its doing this but it could potentially lose me sales so i need to get it sorted out like a few other things on my site pronto really.

I am using this same swf file modified from the same fla file on a different site but thats working fine.
Im not sure if it has anything to do with the fact that i chopped a button off the end
As you can see if you look at finance-europe.org.

gnomeontherun
02-10-2009, 04:48 PM
Hmm I don't know, but I noticed that your links removed the www. in front of the link. Perhaps this has something to do with it? It is a rather strange issue, but I had someone with a similar problem dealing with www. in their flash.

Mkcoy
02-10-2009, 07:13 PM
OMD jeremywilken you ARE a Legend mate lol
Yeh that worked lol cheers man thanks for all the help after all that lool
knew it was something simple just added the w's in works properly now sorted
well now we know :)

right.. next task...

Mkcoy
02-10-2009, 08:02 PM
hmm actually ive discovered now that if you land on my site from any link that doesnt have the www in then my flash links wont work.
it jus means im going to have to renew all the links on my site now and make sure each has the www part. unless of course we can get to the bottom of this for good and find out why it really even matters. it should work no matter if the refering page had www in the link or not. theres probably more AS for that but i dont know wher to start.
will just have to modify my site until then.

gnomeontherun
02-11-2009, 12:09 PM
You could have apache rewrite the url, http://www.modrewrite.com/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum