• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

transition commands

Community Beginner ,
Jul 31, 2014 Jul 31, 2014

Copy link to clipboard

Copied

Hello,

i have a file on sites that transit into the main site from alpha 0 to 100.

 

.the buttons i have have the following code below. i use frame labels. But i seem to have a button that runs two clicks to work. And the action seems too slow as if disconnected from the command. i also have a variable that sits on the first and some subsequent keyframes of the main timeline.

can anyone point to what the problem is? 

on(rollOver) {

  gotoAndStop("Over")

}

on(rollOut) {

  gotoAndStop("Up")

}

on(press) {

  gotoAndStop("Down")

}

on(release) {

  gotoAndStop("Up");

  _level0.goingToPage = "biography";

  _level0.play();

}

thank you for your time.

Best,

Cagri Kasap

TOPICS
ActionScript

Views

235

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 31, 2014 Jul 31, 2014

Copy link to clipboard

Copied

Try putting a trace command in the click code to see if it is executing twice when you click it twice...

on(release) {

   trace("clicked");

  gotoAndStop("Up");

  _level0.goingToPage = "biography";

  _level0.play();

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

Hello,


i have tried your suggestion. it tells me that it is working on each click, not on two clicks. My problem is that the transition works at the second click. However I want it to work at the first click. Do you have any other suggestions?


Best,

Cagri Kasap

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 01, 2014 Aug 01, 2014

Copy link to clipboard

Copied

LATEST

Which line in the function you show should cause the animation that you say doesn't happen on the first click?

The first thing I will recommend is that you get the code off of the object and place it in the timeline using the timeline version of the code.  If the button is in the main timeline and you assign it an instance name of "btn" then that code would look something like...

btn.onRollover = function() {

  btn.gotoAndStop("Over");

}

btn.onRollOut = function() {

  btn.gotoAndStop("Up");

}

btn.onPress = function() {

  btn.gotoAndStop("Down");

}

btn.onRelease = function() {

  btn.gotoAndStop("Up");

  goingToPage = "biography";

  play();

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines