Skip to main content
Known Participant
July 2, 2007
Answered

Some actionscript missing

  • July 2, 2007
  • 3 replies
  • 391 views
Can someone please help me. I have a group of 10 moving buttons grouped into one fash element which has been used in a pure flash website. However now I want to use the same flash button group in a html based website. I know that here is a problem in the actionscript and I have tried to on.Press go to url yardy yardy yar however I cant be doing it right. The current actionscript which was for the flash website is as follows:

stop ();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
tellTarget("_root") {
gotoAndPlay(15);
}
}

I need to to continue to play the commands in the same way ie the animation to work when you roll your cursor over it but aso when it is clicked for it to go to url

Many thanks
This topic has been closed for replies.
Correct answer Greg Dove
Can't say for sure, but if it was me I'd try:

stop ();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
getURL(" http://www.actionscript.org", "_");
tellTarget("_root") {
gotoAndPlay(15);
}

}

3 replies

Inspiring
July 2, 2007
Oh... ok then Good to hear. It must have been the old style (Telltarget) of coding that was causing the problem.
Inspiring
July 2, 2007
This is an old style of coding:

tellTarget("_root") {
gotoAndPlay(15);
}

Unless you have a really old version of flash it would normally be

_root.gotoAndPlay(15);

but I guess that's not affecting it if its working already. All I can suggest is that you post your fla online - I'm happy to take a look at it if you do.
abdezinesAuthor
Known Participant
July 2, 2007
Thats very helpful but how do i attach it? Do you mean the code or the proper fla file?
Inspiring
July 2, 2007
No definitely the fla... you can't attach it here in the forums. Just somewhere online and post a copy of the url here.
abdezinesAuthor
Known Participant
July 2, 2007
right i have now through hours of google searching managed to get it to work however
now you have to double click to get it to go to url

this is the actionscript:

stop ();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
tellTarget("_root") {
gotoAndPlay(15);
}
this.onRelease = function(){
getURL(" http://www.actionscript.org", "_");
}

}


any ideas?
Greg DoveCorrect answer
Inspiring
July 2, 2007
Can't say for sure, but if it was me I'd try:

stop ();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
this.onRelease = function(){
getURL(" http://www.actionscript.org", "_");
tellTarget("_root") {
gotoAndPlay(15);
}

}
abdezinesAuthor
Known Participant
July 2, 2007
Thank you, this does work the buttons and go to url but unfortunatey I am still having the need to double click the buttons in order to go to url