PDA

View Full Version : Flash some times requires double click for onPress event


barkermn01
11-23-2009, 10:53 AM
Hi People

As a warning im a big Noob at flash so try to keep Jargon to a min or im going to be googling it lol,

Any way back to my point at hand

I have a flash banner i have built nothing spectaular but alot of tweens an actions layer that setups all my on presses.

Now this works partly but for some reason i have to click on some of the tabs more then once.

i thought this was tha fact that i was using stop(); and not pause(); but using pause did nothing it just looped though my tweens.

Now a quick overview
I have 3 Tabs that are all Symbols,
Now all the design is inside the Symbols so i was not messing arround trying to re Tween every thing every time i made a change to the design

In side the sybols on Frame 1 I have it set with function to change the text on that Tab(Symbol) so that i can dynamicly get the data from eather prams or and XML feed.

So thats what its doing

Some code so you can see what im doing

// stop the flash autoplay feature
stop();

// set the tabs to play the correct seens
Tab1.onPress = function(){
//gotoAndPlay(0);
}

Tab2.onPress = function(){
gotoAndPlay(1);
}

Tab3.onPress = function(){
gotoAndPlay(200);
}

This is an copy from one of my control frames this where the problem is.

Now every time it starts playing on a frame the next frame whipes the control to stop bugs arrising

E.G
Frame 50 has the script above on then frame 51 has this one

// Make sure people cant click while a frame set is playing
Tab1.onPress = function(){
}

Tab2.onPress = function(){
}

Tab3.onPress = function(){
}


- -
Just a Quick note im using ActionScript 2 for this file for Variable set Text