Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








How Weird Is This?...Button Event Bug?


I thought a button.onPress, and a button.onRelease were interchangeable eventtypes, but apparently not? Say you've got this code:
PHP Code:



toggle=false;
modeToggle_btn.setClickHandler("masterHandle",this);
modeToggle_btn.onRelease = function() { // sets button-state...
     if (toggle==true){
          trace(toggle);
          toggle=false;
     } else {
          trace(toggle);
          toggle=true;
     }
function masterHandle() { // executes operations...
     if (toggle==false) {
          trace(toggle);
     } else {
          trace(toggle);
     }




You'd expect that both the button-event handler and the click handler would pass trace() statements, right? It doesn't. It only passes a trace() for the event-handler. For me, only when the event-handler is onPress does it pass 2 trace()'s. An onRelease event doesn't seem to get caught by the click handler. Can anybody venture a guess as to why this is?




FlashKit > Flash Help > Flash ActionScript
Posted on: 11-04-2003, 06:12 PM


View Complete Forum Thread with Replies

Sponsored Links:

Very Weird Mouse Event Error
http://loslonelyboys.com/admin/show_listings/workFiles/

All of the items on the list have buttonmode = true as well as usehandcursor = true. However if you notice, the hand cursor only appears when you have over the top most visible item. But it doesnt have to be the first on the list, if you scroll down with the scroll bar, which items are on top (within the height of a single item) show the mouse cursor. Furthermore, they all have a click event to expand for more info. This event only works again if its the top most visible item.

Does anyone know what can cause this kinda of mouse issue? All of the items in the list are stored in a sprite with a mask, and each of the items use a mask to expand/contract. Could nested masks cause this issue? Any help would be superb.

View Replies !    View Related
[F8] LoadClip Weird Event Listener Action
I got a loadClip adding it a eventListener to attach it a progress bar, seems the event is not being correctly synchronize to the progress, cause the animation of the movieclip will start playing even if the movie haven't been loaded, it is easy to see by watching the simulate download from flash, i got here the files, please help on this one and let me know where am i doing wrong, thanks.

http://hypercall.gsauditores.com/demo/fla.rar

View Replies !    View Related
Convert Button Event Code To A Function AND 'if,then,else' On A Button Event
Hi

Can anyone please help me convert the following code from a button event into a function:


on (press) {
paypal = new LoadVars();
paypal.cmd="_cart";
paypal.item_number= myVB2;
paypal.item_name= mvVB;
paypal.upload="1";
paypal.business="ady@atinybitofgod.com";
paypal.currency_code="USD";
paypal.amount= myVB3;
//paypal.handling ="2.00";
paypal.send("https://www.paypal.com/cart/add=","_blank","post");
}



My plan is to have 5 of these (obviously named differently and with slightly diff. values for the variables) and then on a single button's (press) i will have an 'if,then,else' statement, which will call one of these 5 functions depending on the value of another variable in my movie.


is this possible??? I have been spending 2 weeks now posting on numerous threads trying to find a workaround for a different problem, with no joy..so the above is my *hopeful* solution... please ask me if i haven't explained anything clearly enough.....

Thanks so much for your time and any help you might be able to offer...

kindly with crossed fingers,

Cheska


(ps...if you want to try and help my initial problem, you can visit http://www.atinybitofgod.com/kids/paypal.html and see all my code and my swf and the rror i get from paypal when i try to send three variables that reference other variables in my movie.....BUT...since i have had no joy and think that ive tried most peoples suggestions, i'd really like to try to figure out this new 'function' and 'if then else' thing on my button...if that's even possible).

View Replies !    View Related
AS 3 Convert Button Event To Key Enter Event
I'm learning how to use regular expressions in ActionScript 3, and can get an input to be tested by regular expressions, and an answer delivered, if a button is clicked after text is entered.

But darn if I can figure how to code it so they just click the enter key after typing what they like. In the following code punk is a button, and there are two text fields, buzzo the input, and tester the answer to the input. The array questo contains the regular expressions, the array anso contains the responses.


I need code to replace the bottom line with a line that relates to key enter being typed. Thanks for any ideas.



Sally










Attach Code

function makeSense(event:MouseEvent):void
{
tester.text="";
var buzz:String = buzzo.text;
buzzo.text="";
for(i=0;i<questo.length;i++){
if(buzz.search(questo[i])!=-1){
tester.text=anso[i];
}
}
}

punk.addEventListener(MouseEvent.CLICK, makeSense);

View Replies !    View Related
Button's Doing Weird
Hi, I made this movie with some buttons in it, here it is:

http://members.lycos.nl/zeoliteprodu...tepresents.swf

As you can see the movie is stupid and looks terrible. But this is just an example to show what's wrong. The thing is, when you click on let's say the blue button you get some text, which is good, but if you click on it again, you see another text which you aren't supposed to see (unless you click on the good button). And when you click on the green button while you're in the green field, the movie starts over again. This are the actions of the buttons:

on (release) {
gotoandplay (102);
)

The "102" is ofcourse different for every button. Is there something to do against this? Thanks in advance.

Sander

View Replies !    View Related
Help With Weird Button...
Hi everyone...

I´m asking your help for a problem that might have a simple resolution.
I´ve created some animations with mc_tween2 but i can´t make my buttons that are inside a movie clip to work. I´ve tried by transforming a shape to button and ive tried too transforming to movie clip and call for is instance name to animate it. I´m attaching the fla for you to help me solve this problem with the best way.

ps. the buttons that doesnt work are in frame 2 in the bottom ("clientes"), you need to click in first frame logo to get there.

Thanks to all that help!

Diogo

View Replies !    View Related
Questions Re: Button Event Code Syntax W/ Variables & Browser Back Button Programming
SHORT VERSION OF MY QUESTION
I have some variables in my movie named backMovie & backFrame, Then I have a button that I'd like to attach the following code to, but obviously I've formatted it incorrectly. Could anyone please offer me the correct syntax for using variables in these instances.

on(press){
loadMovieNum('"+backMovie+".swf',1);
}
on(release){
_level1.gotoAndPlay(backframe);
}


LONG VERSION OF MY QUESTION
I have a movie and my client has now said they cant live without the back and forward buttons on the browser working.....Grrrr

So I did some research on programming the browser back button but determined that it wasn't cross-browser friendly and therefore it was safer to try and create a back button within my movie. The problem is I am loading several multi level swf's and also am a very novice actionscripter (so I'm sure my way is the looong way)

Anyway, I managed to create several variables that change each time a different navigation element is clicked.

What I'm trying to do is reference some of these variable in the programming of my movies own 'back button'. But I don't know how the code should look. My variable names are 'backMovie' & 'backFrame'.....and I've tried variations of the following:

on(press){
loadMovieNum('"+backMovie+".swf',1);
}
on(release){
_level1.gotoAndPlay(backframe);
}


But they don't work

If it helps, I've uploaded my practice files to: http://www.lucid-life.com/back-button-workaround.zip

(It would be a bonus to learn that the actual back button of the browser could be programmed with this actionscript...but I dont think that's possible...is it? and using the anchors method with the back button woudln't work because I'm using levels...right?)

Any help or advice greatly appreciated!
Many Thanks in advance

Cheska

View Replies !    View Related
Weird Button Problem
Hi All, I have a menu movie clip that contains five buttons. This movie clip is placed on the root scene. When I click a button in the menu I use 'goto' to go to the root scene at a particular frame label and start playing.

Straightforward right? Why doesn't it work?? The buttons don't work. Help, i'm late for a hot date with a supermodel.

Cheers, woktoc

View Replies !    View Related
Weird Button Problem
(I'm using Flash 5).

I'm having a very odd bug in which when I'm editing the FLA, buttons act as if the movie were playing normally. So, when I roll over them, the cursor turns into a hand. If they have a play or goto action, it is executed when I click. It is specific to only one of the files that I am working on--I haven't had any trouble with any of the others. I don't know if this is an intentional testing feature or a bug, but it's driving me nuts and I want to get rid of it. Does anybody know how?

View Replies !    View Related
Weird Button Problem
He guys,
In my .fla the button writing turns white on rollover, and goes back to black on roll out. It works with simple buttons enabled, and plays like this when the button scene is tested. It slao is like this in the library. But when I export the movie to a .swf the button writing doesn't become white. The other rollover effect works tho:/ Any ideas? You can see what I mean in the attached file.
Thanks,
Josh

View Replies !    View Related
Help With Masking On Button...weird
Hi, I'm just messing around with buttons and masking and stuff, and I made this pretty cool button. Here's the link to it:

http://www.mime.eng.utoledo.edu/~mhe...site/index.htm

Don't bother with the two numbers on the stage, those were helping me with the button scripting. But, as you can see, two of the rectangle "doors" show through the mask on the button. You can see the outline of the diagonal doors through the mask on the main movie. you can tell it's them, cause you can see them move when those doors open. Neither of the other two sets of doors show through, and I have no idea why this is happening. All sets of doors are on a movieclip and all are masked by the same thing. Any ideas anyone???

View Replies !    View Related
Weird Button Problem
i set up an image gallery where u click on the arrow and it takes you to the next frame which is a picture. now all that works fine, but the file size is to big, so i made a loader for it. now when i run the loader it runs the picture gallery but the buttons do not work. the work if i run the gallery by itself but when i run the loader the buttons will not work.

anyone know of anything like this?

View Replies !    View Related
BUTTON Not Working WEIRD :(
I've got a really weird one here.
I have a movie A.
Inside movie A, I have another movie 3 more movies B, C, D.

B, C, D are all instances of the same movie.
Inside this movie is a button, given in an instance name of button.

When B, C, D are clicked, they put text inside a text box.
The actions for this are assigned using frame actions.

The exact action is as given below:

code: menuItem1.minusButtonMovie.button.onRelease = function()
{
dummyText += "minus";
}

menuItem1.plusButtonMovie.button.onRelease = function()
{
dummyText += "plus";
}

menuItem1.minusButtonMovie2.button.onRelease = function()
{
dummyText += "minus";
}
(The real names of the movies are used above.)

The problem is that C, when clicked WILL NOT function.
If the instance name of C is changed then it will work fine!
(In the actual example, the movie that's giving the problem is the one with the instance name of minusButtonMovie.)

Where am I going wrong?

OK... I think all of the above explanations may sound confusing!
So, I've attached the FLA (MX2004 format).

Any help would be appreciated.

Thanks.


OM

View Replies !    View Related
Button With Weird Issue - Help Please
I have a drop down menu on a my new site. It works some what, When I click on it it junps to the left and then I can drag it around the page. I do not want either of these functions "jump left or drag around". I can click on it and it drops down but I do not see my options. I also want it to look like my other buttons but for some reason it does not.

I have attached the fla's and the txt file.
I have uploaded the main fla and text file"zipped" I will try to upload the other fla file but may need to post again to do this. total 3 files"2 fla's and a text file.


Please help.

Thanks

View Replies !    View Related
TAB-button Does Weird Stuff
Hi,

I've got the following problem:

I've created a form on my website where people can fill in stuff, like name, e-mail, etc.
Now, if someone presses the "tab-button" to get from one field to another, it somehow selects a nearby button with some weird yellow line!?

Is this a known bug?
If so, or not, how can I fix this?

Thanks in advance,
Death-Ruler

View Replies !    View Related
Weird Button Behavior
I'm currently working on something and for the life of me I can't figure out how to solve some problems I am having with my navigation buttons. I'm assuming there is a simple solution, I just have pulled out my hair way too much to figure it out. Maybe it has something to do with the textscroll or the loaded variable text file that has goofed up the buttons. I'm not sure. What happens, is that when you move the mouse over the links, the buttons flash rapidly. They are just supposed to light up in color, and the text is supposed to pop up and stay that way until you remove the cursor, not flash like a millions times a second. I have attached the FLA I am working with..if anyone has any suggestions it would be appreciated.

Thanks.

View Replies !    View Related
Weird Behavoir From Button
I have a button in flash MX 2004 that behaves as it is supposed to when testing the movie, but when the swf is published and actually loaded on a web page the text part of the button acts as if there was no hit area assigned, which of course there is. I have deleted the button and recreated it several time all with the same effect. So what is the problem here.

Steps to create:

Create new Symbol
Named ContactUs
Behavior Button

UP Frame
Create black box 129 x 25 pixels
Using Text tool: Write Contact Us on top of button
Go to Over Frame
Insert KeyFrame
Change nothing
Go to Down Frame
Insert KeyFrame
Change nothing
Go to Hit Frame
Insert KeyFrame
Draw a box around entire button.

Any help would be greatly appreciated.
Thanks
Steve

View Replies !    View Related
Weird Button Issue
Majorly weird issue. I have a movie clip and iside it 4 buttons that have roll over and roll out with on release get url. They all work but one and what is very weird button 3 goes to a page the is not the one specified in the get url command. I even deleted the whole get url command and still it goes to the wrong page. What they heck is it pulling this from? Is there a way to search for a value in the whole fla file to find where it is at? I even deleted all button actions on button 3 and it still works and goes to the wrong page.

Ideas?


No worries. I got it.

View Replies !    View Related
Weird Button Issue Please Help...
hi. i'm hoping someone can help me. i've got this weird thing going on with 2 of my buttons. for some reason, when i click on them, rather than getting the URL, the jump the movieclip that houses them in the scrollable area. has anyone else ever encountered this problem? i don't see any other invisible buttons hiding anywhere in this entire 2145 file... :-/

thanks.

View Replies !    View Related
Weird Button Problem.
Hey guys I'm sure this is simple enough but it's doing my head in.
Basically I am making a drawing app and have scripted an "undo" function for it.
So I have an undo button but I only want it to appear on the screen sometimes (ie if certain conditions are met).
I have the appearing and disappearing working but the button itself will no longer do anything when clicked.

Without making this too confusing, attached is a scaled down version of what I'm trying to do.

We start with a green button and a black movie clip.
When you click the green one, a pink X appears on the black square.
When the pink X (this is a button within the movie clip) is clicked it should give a trace message saying "Clicky"

How can I get this to work or is there a better way?

View Replies !    View Related
Weird Button Problems...
Greetings... I'm having issues with the video player I've been working on and I'm hoping someone here can help...

I've got a scroll pane that's populated with movie clips at runtime based on several arrays created from an external XML document. The code that populates these fields and builds my scroller and fills it with these mc's is as follows:


ActionScript Code:
var videoList:Array = new Array();
var artistList:Array = new Array();
var titleList:Array = new Array();
var dateList:Array = new Array();
var thumbList:Array = new Array();

var videoIndex:Number = 0;

var xmlURLLoader:URLLoader = new URLLoader();
var xmlURLRequest:URLRequest = new URLRequest("videos02.xml");
xmlURLLoader.load(xmlURLRequest);
xmlURLLoader.addEventListener(Event.COMPLETE, dataLoaded);

function dataLoaded(event:Event):void {
    var theXMLData:XML = new XML (xmlURLLoader.data);
    var a:Number = theXMLData.video_path.length();

    for (var i:Number = 0; i < a; i++) {
        videoList[i] = theXMLData.video_path[i];
        artistList[i] = theXMLData.artist_name[i];
        titleList[i] = theXMLData.video_title[i];
        dateList[i] = theXMLData.video_date[i];
        thumbList[i] = theXMLData.thumb_path[i];

        with (holder) {

            var vidTemplate:MovieClip = new vid_details();
            vidTemplate.x = 0;
            vidTemplate.y = i * 60;
            vidTemplate.artistBox.text = artistList[i];
            vidTemplate.titleBox.text = titleList[i];
            vidTemplate.dateBox.text = dateList[i];
            vidTemplate.thumbPathVar = thumbList[i];
            vidTemplate.flvPathVar = videoList[i];
            vidTemplate.trackNum = i;


            addChild(vidTemplate);
        }
    }
    var vidOne:String = videoList[videoIndex];
    ns.play(vidOne);
    myScroller.source = holder;

}

On each movie clip (that's the vidTemplate) I have the following code that sets up each of these movie clips as a button, and creates a highlight as each clip is rolled over:


ActionScript Code:
var trackNum:Number;
var thumbPathVar:String;
var flvPathVar:String;


var imageLdr:Loader = new Loader();
var imageURLReq:URLRequest = new URLRequest(thumbPathVar);
imageLdr.load(imageURLReq);
imageLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);

function imageLoaded(event:Event):void {
    loadTarget.addChild(imageLdr.content);
}

invisibleBtn.addEventListener(MouseEvent.CLICK, buttonClick);
invisibleBtn.buttonMode = true;

var ns = (root as MovieClip).ns;

function buttonClick(event:MouseEvent):void {
    ns.play(flvPathVar);   
}



invisibleBtn.addEventListener(MouseEvent.MOUSE_OVER, buttonOver);
invisibleBtn.addEventListener(MouseEvent.MOUSE_OUT, buttonOut);

function buttonOver(event:MouseEvent):void {
    invisibleBtn.gotoAndPlay(2);
}

function buttonOut(event:MouseEvent):void {
    invisibleBtn.gotoAndStop(1);
}

The invisible button movie clip that creates the highlight has, as it's first frame, the highlight symbol with it's alpha set to 0, and a stop(); action added to it. The second through 8th frames are a simple tween from an alpha of 0 to an alpha of 100, with a stop(); action on the last frame.

What I can't seem to figure out is why, when the SWF is loaded, does it seem that this movie clip is stopped at the last frame, instead of the first? Once I've rolled over the item, the behavior seems to be the way I intended, it's just that when the player is loaded, ALL of the clips in my scroll pane have the highlight on.

You can see what I mean here: http://video.uncc.edu/index02.php
I could post my entire FLA if it helps...

If I take my invisibleButton movie clip and make it only two frames, I have no problems, it's just when I try to create a multi frame tween.

Thanks in advance!

View Replies !    View Related
Weird Button Moving
I'm pretty new to actionscripting so any help would be nice i'm building a site and have multiple buttons laid somewhat overlapping eachother i have the code to make them come forward when you roll over them, the only problem is when they are clicked you're taken to the next frame the button is moved over underneath another button anyone know why and how I can fix that this is the coding I'm using


media.onRollOver = function(){
this.swapDepths(story);
};
media.onRollOut = function(){
this.swapDepths(story);
};

characters.onRollOver = function(){
this.swapDepths(media);
};
characters.onRollOut = function(){
this.swapDepths(media);
};

crew.onRollOver = function(){
this.swapDepths(characters);
};
crew.onRollOut = function(){
this.swapDepths(characters);
};

story.onRollOver = function(){
this.swapDepths(home);
};
story.onRollOut = function(){
this.swapDepths(home);
};

story.onRelease = function(){
gotoAndStop(3);
};

characters.onRelease = function(){
gotoAndStop(4);
};

crew.onRelease = function(){
gotoAndStop(5);
};

I was using behaviors but found that to be inefficient since some objects were two layers back from the object i wanted to switch it with. Any advice would be much appreciated or even a simpler way of accomplishing getting buttons to move forward and back.

View Replies !    View Related
Button Weird Behavior
I have a button (inside a MC that is in a masked layer) with the next code

on (rollOver) {
_parent.forw = true;
}
on (rollOut) {
_parent.forw = false;
}
on (release) {
loadMovieNum("contact.swf",5);
trace ("Hi");
}

The weir thing is that the button response well for the rollOver and rollOut events, but does not do anything with the release event...

Any clue...

Is the first time that I see this

View Replies !    View Related
Weird Button Problem
i have an animated movieclip button on a layer named "test_knowledge_mc"

i duplicate that button on the same layer and name it "take_test_mc"

When hovering over both they both animate and go to the specifice frame label.

But, if i cut that second buttonnd place it on another layer. The button stops working all together.

what is up?

View Replies !    View Related
BUTTON Not Working WEIRD :(
I've got a really weird one here.
I have a movie A.
Inside movie A, I have another movie 3 more movies B, C, D.

B, C, D are all instances of the same movie.
Inside this movie is a button, given in an instance name of button.

When B, C, D are clicked, they put text inside a text box.
The actions for this are assigned using frame actions.

The exact action is as given below:

ActionScript Code:
menuItem1.minusButtonMovie.button.onRelease = function()  {      dummyText += "minus";  }    menuItem1.plusButtonMovie.button.onRelease = function()  {      dummyText += "plus";  }    menuItem1.minusButtonMovie2.button.onRelease = function()  {      dummyText += "minus";  }
(The real names of the movies are used above.)

The problem is that C, when clicked WILL NOT function.
If the instance name of C is changed then it will work fine!
(In the actual example, the movie that's giving the problem is the one with the instance name of minusButtonMovie.)

Where am I going wrong?

OK... I think all of the above explanations may sound confusing!
So, I've attached the FLA (MX2004 format).

Any help would be appreciated.

Thanks.


OM

View Replies !    View Related
BUTTON Not Working WEIRD :(
I've got a really weird one here.
I have a movie A.
Inside movie A, I have another movie 3 more movies B, C, D.

B, C, D are all instances of the same movie.
Inside this movie is a button, given in an instance name of button.

When B, C, D are clicked, they put text inside a text box.
The actions for this are assigned using frame actions.

The exact action is as given below:

ActionScript Code:
menuItem1.minusButtonMovie.button.onRelease = function()  {      dummyText += "minus";  }    menuItem1.plusButtonMovie.button.onRelease = function()  {      dummyText += "plus";  }    menuItem1.minusButtonMovie2.button.onRelease = function()  {      dummyText += "minus";  }
(The real names of the movies are used above.)

The problem is that C, when clicked WILL NOT function.
If the instance name of C is changed then it will work fine!
(In the actual example, the movie that's giving the problem is the one with the instance name of minusButtonMovie.)

Where am I going wrong?

OK... I think all of the above explanations may sound confusing!
So, I've attached the FLA (MX2004 format).

Any help would be appreciated.

Thanks.


OM

View Replies !    View Related
Weird Button In As Panel
Somethimes when i'm working in the flash actions window, a play button appears.

When i click this button i get the message:

SyntaxError: Missing ; before statement.

con someone explain to me what this button does, how i got it and why it only sometimes appears??

Afbeelding 6.png (16.32 KiB) Viewed 102 times

View Replies !    View Related
Convert Button Event Code To A Function AND 'if,then,else' Statement On A Button Even
mac os X
flash mx 2004


Hi

Can anyone please help me convert the following code from a button event into a function:


on (press) {
paypal = new LoadVars();
paypal.cmd="_cart";
paypal.item_number= myVB2;
paypal.item_name= mvVB;
paypal.upload="1";
paypal.business="ady@atinybitofgod.com";
paypal.currency_code="USD";
paypal.amount= myVB3;
//paypal.handling ="2.00";
paypal.send("https://www.paypal.com/cart/add=","_blank","post");
}



My plan is to have 5 of these (obviously named differently and with slightly diff. values for the variables) and then on a single button's (press) i will have an 'if,then,else' statement, which will call one of these 5 functions depending on the value of another variable in my movie.


is this possible??? I have been spending 2 weeks now posting on numerous threads trying to find a workaround for a different problem, with no joy..so the above is my *hopeful* solution... please ask me if i haven't explained anything clearly enough.....

Thanks so much for your time and any help you might be able to offer...

kindly with crossed fingers,

Cheska


(ps...if you want to try and help my initial problem, you can visit http://www.atinybitofgod.com/kids/paypal.html and see all my code and my swf and the rror i get from paypal when i try to send three variables that reference other variables in my movie.....BUT...since i have had no joy and think that ive tried most peoples suggestions, i'd really like to try to figure out this new 'function' and 'if then else' thing on my button...if that's even possible).

View Replies !    View Related
Making A Button Event Happen Without Click A Button
hello.

Got this script, an event happens when the user clicks
a button. The button isn't a standard movie clip button,
its a component.

No actions attached to the buttons.

There is an actions layer with the actions:

loadFeedBtn.addEventListener("click",Delegate.crea te(this,loadxml));

loadFeedBtn is the instance name of the button.

there is also:

function loadxml(p_evtObj) {
bla bla bla
}


My question, how do I make it, so that it just performs the action
that the happens when the user clicks the button, with out them clicking the button, just by them entering the frame?

Thanks

View Replies !    View Related
Weird Button With Drag Problem
Hi there,

I 'm just in the making of an interface. I have some small buttons on stage and since 5 minutes a MC that is dragged.

The weird problem is that since I included the drag MC, the buttons have their hitzone from the top to the bottom of the stage !??

If put the script on the main timeline with a lock and constrain. If I check off the lockcenter, my buttons even are disabled!?...

Is this a bug in F5? (I had a similar thing in F4 too, if I remember)

What do i do?? :-(
thanx
e_site
[Edited by e_site on 07-13-2001 at 05:01 AM]

View Replies !    View Related
Sth Weird With Coordinate Y Of A Button When Dragging..
Hi,
I try to drag a button(size = 6 * 4) anywhere on a stage which has size 940.5 (Width) * 570 (Height) pixels.

I traced the coordinates. But when the coordinate Y of the button is greater than 344 pixels, the coordinate Y always have fraction like 0.95, for example, 345.95 instead of getting 346.

Do u know why? Thanks for your help!!! =)

View Replies !    View Related
Weird Button Action, See Attachment
While I was helping someone with some button actions I made a fla and found something weird, no explanation.
There is frame 1 with a button

stop();
b2.onPress = function() {
_root.gotoAndPlay("frameOne");
};

"frameOne" is the next frame in the same scene, no stop just this

a=1;

Then there are several scenes. I labeled frames in all of them except scene2, which is called "Object1". When I press b2 in frame 1 it goes to "frameOne" first but then to Object1, no logic. Any explanations?

View Replies !    View Related
Weird Issues On Button - Arghhh
I have a drop down menu on a my new site. It works some what, When I click on it it junps to the left and then I can drag it around the page. I do not want either of these functions "jump left or drag around". I can click on it and it drops down but I do not see my options. I also want it to look like my other buttons but for some reason it does not.

I have would have attached the fla's and the txt file here but it will not allow for the 1.8meg zip file or even the 493kb file so if you can help I will e-mail you the files.



Please help.

Thanks

View Replies !    View Related
Weird Button Thing Happening?
Hey Folks,

Not sure if this is the correct forum for this post so I apologize in advance if this is the case.

I have a Gallery button on the home page of this site, femmefauxtales.com; something I did for a friend, anyway the thing is that when I tested it on my computer the Gallery button worked fine.

Here's the thing: when you click on it it loads the initial movies, as it should, but once you're there if you click on the Gallery button again it fails to load one of the initial movies, and if, from there, I click on the "Go with the Faux button" and then click back on the Gallery button it fails to load the same movie as well.

The contact us button just loads a movie over the whole thing so it doesn't affect it, and the home button works fine.

What's driving me crazy is the fact that EVERYTHING it worked fine on my computer, and of course the fact that I CAN'T FIGURE OUT WHAT THE %@&% IS WRONG.

I don't include a zip cause I don't know what to include??

Any ideas or suggestions as to what could cause something like this?


Peace
Jose Antonio

View Replies !    View Related
Weird Button Sizing Issue...
Kinda new to AS3/Flash, and I'm having a strange issue with the Button Component.

The default button component size is 100px. If I put a button on the stage and alter it's dimensions (using the properties panel, and/or the instanceName.width property in AS3) to 20px/20px, and place it near the edge of the stage, a trace of the stage.width shows an increase in stage size as if the button is still 100px wide. This occurs with and without a label...

What's up with that?

View Replies !    View Related
Button Push Really Weird Stuff Please Help
Hey guys, doing a site for a friend of mine, and i've placed my code online, I have all the stuff working, the stuff that's not working i already know of. The site is still in early development, but the part that is making me angry, is if you click on about us, support us, and scholarship opportunities, if you notice, there's a small acitonscript that fades a movie clips alpha to 100, and moves it down like 30 spots, and it gets confused you have to click quickly, but it's something i don't want to happen, if you can check this out, i'd appreciate it: http://www.myfoureyes.com/cmef/final.html

the code i used for the button is:
//scholar is the name of the movie clip, that references scholarship opportunities
//loadVariables, loads dynamic text file
//resetall is the function that sets the previous item to alpha 0, and resets it's location to origin
//bringdown is the function that messes up, it's the part that tells you which category you are in
//sidemenu brings down the side menu

_root.scholar.onPress=_root.scholar.onDragOut= function() {
loadVariables("scholar.txt", _root.con.contents);
resetall();
bringdown(_root.scholar, _root.scholartxt);
sidemenuscholar();
};

if you have any idea on why this would be happening, let me know,

or if you notice when you click on about us, the text file i'm using has html tags in it, and i've set the _root.contents.html=true; //contents is the dynamic text box
and it's not displaying the tags, so i don't know what's up wid dat any way, any help is greatly appreciate, thank you guys. I know there are components out there available for loading text, but i'd really like to re-invent the wheel on this part, so i won't stop till i figure it out, which i think i'm very close to doing

View Replies !    View Related
Very Weird--Banner Shifts On Button Rollover
Hey guys. I have a jpg background on my site. The nav buttons are on top of it, underneath the banner, and the sub-nav buttons are underneath those. When I mouse over my main buttons, the sub categories shoot onto the screen from the left. The problem is is that when you first roll over the main button, right when the sub nav starts to shoot out, the banner at the top glitches for absolutely no reason. It also seems to do it very briefly as soon as the file is opened. Even weirder still, it only does it when the swf file is opened outside of Flash, and doesn't do it at all when hitting ctrl + enter in the program. It's very strange looking and I have no idea why it could be doing this. Attached is my swf, so please take a look and see if you can pick out the problem. Thanks in advance.

View Replies !    View Related
Button.onRelease=function ... Weird Feature
check this code out:


Code:
var i = 0;

this.attachMovie("button", "b1", 1); // first button
this["b1"]._x = 100; // put it somewhere
this["b1"].onRelease = function () {
trace(i);
}

i++;

this.attachMovie("button", "b2", 2);// second button
this["b1"]._x = 200; // put it somewhere else
this["b2"].onRelease = function () {
trace(i);
}
Usually, you would suppose that the two buttons get different actions... but both get the same value of i in the end.

Any workarounds, anybody?

View Replies !    View Related
Button Script Acting Weird... I'm Stumped. HELP
Hello and thanks for your help in advance. I'm having a weird problem with what seems like a very simple issue to me. I have an action attached to a button:


Code:
on (rollOut) {
gotoAndStop (65);
}
on (release) {
gotoAndPlay ("C Viewer");
}
It's the "on (release)" part that isn't working... the rollout works fine. It just sends me back about 12 frames and not to the scene (or frame i tried that) indicated. I have also tried going to a different frame, creating a new button to try to go to the scene etc etc. It never behaves by sending me to the scene or frame I specify. I am really stumped. Please help. I can email or post the .fla if necessary.

View Replies !    View Related
[F8] Weird Problem With Button Inside MC Creating 2 MCs
I'm nearing the end of a massive project. The project is a "shoe builder" where people can take various items in catalog and manipulate them on the area.

Anyways, I want to place the catalog buttons in a movieclip so i can tell which ones to hide and show depending on what area (toe caps, soles, decals items, etc). If i have the button sitting outside of any movieclip, when i click it, it creates just 1 of the item (like it's suppose to). BUT, when i the button inside of a placer MC, for some reason, it creates 2 of the item per click O.o Yet when i put a trace command to say "hello", it only says it once when i click. So it isn't going through the code twice. Here's the code:


Code:
on (release)
{trace("Hello");

_root.thecirclenumber= _root.thecirclenumber+1;

var initObject:Object = new Object();

initObject.onPress = function(){
startDrag(this, false, 0, 0, 550, 250); ;
_root.theitem = clipName = this._name;
_root.colorareanum = 2;
}

initObject.onRelease=function(){
this.stopDrag();}


_root.attachMovie("thecirclemc", "circle"+_root.thecirclenumber, _root.depthcount, initObject);
tempvar = "circle" + _root.thecirclenumber;
_root[tempvar]._x = 0;
_root[tempvar]._y = 0;
_root.depthcount = _root.depthcount + 1;

}

on (release)
{

_root.thecirclenumber= _root.thecirclenumber+1;

var initObject:Object = new Object();

initObject.onPress = function(){
startDrag(this, false, 0, 0, 550, 250); ;
_root.theitem = clipName = this._name;
_root.colorareanum = 2;
}

initObject.onRelease=function(){
this.stopDrag();}

/////THIS IS THE CREATE MC COMMAND AREA///////
_root.attachMovie("thecirclemc", "circle"+_root.thecirclenumber, _root.depthcount, initObject);
tempvar = "circle" + _root.thecirclenumber;
_root[tempvar]._x = 0;
_root[tempvar]._y = 0;
_root.depthcount = _root.depthcount + 1;

}


If anyone could help me figure out why it is making 2 of the items instead of 1. Thanks everyone, this is the last obstacle to finishing this massive project.

View Replies !    View Related
HitTest Working, But Acting Weird (MC As Button)
I was playing around last night trying to learn simple AS to make a movie clip act like a button. I wanted the button movie clip to reduce the alpha value of the other movie clip when you rollover the button and when you roll off the button the alpha of the movie clip goes back up. It works, but if you keep rolling over and out of the button movieclip sometimes the alpha gets stuck at a certain value for a bit, then does what its supposed to. Any ideas why? I'm using onEnterFrame () to do the hitTest constantly.

Thanks

Here's the SWF and FLA files for you to look through:

hitTest SWF
hitTest FLA

Here's the AS code I used in the frame to do this:


Code:
onEnterFrame = function() {
if ( background._alpha > 100 ) {
background._alpha = 100;
}
if ( background._alpha < 0 ) {
background._alpha = 0;
}
if (hitTest( _root._xmouse, _root._ymouse, true)) {
background._alpha -=25;
}
else if (hitTest( _root._xmouse, _root._ymouse, false)) {
background._alpha +=25;
}
}

View Replies !    View Related
Very Weird-Banner Shifts On Button Rollover
Hey guys. I have a jpg background on my site. The nav buttons are on top of it, underneath the banner, and the sub-nav buttons are underneath those. When I mouse over my main buttons, the sub categories shoot onto the screen from the left. The problem is is that when you first roll over the main button, right when the sub nav starts to shoot out, the banner at the top glitches for absolutely no reason. It also seems to do it very briefly as soon as the file is opened. Even weirder still, it only does it when the swf file is opened outside of Flash, and doesn't do it at all when hitting ctrl + enter in the program. It's very strange looking and I have no idea why it could be doing this. Attached is my swf, so please take a look and see if you can pick out the problem. Thanks in advance.

View Replies !    View Related
HitTest Working, But Acting Weird (MC As Button)
I was playing around last night trying to learn simple AS to make a movie clip act like a button. I wanted the button movie clip to reduce the alpha value of the other movie clip when you rollover the button and when you roll off the button the alpha of the movie clip goes back up. It works, but if you keep rolling over and out of the button movieclip sometimes the alpha gets stuck at a certain value for a bit, then does what its supposed to. Any ideas why? I'm using onEnterFrame () to do the hitTest constantly.

Thanks

Here's the SWF and FLA files for you to look through:

hitTest SWF
hitTest FLA

Here's the AS code I used in the frame to do this:


Code:
onEnterFrame = function() {
if ( background._alpha > 100 ) {
background._alpha = 100;
}
if ( background._alpha < 0 ) {
background._alpha = 0;
}
if (hitTest( _root._xmouse, _root._ymouse, true)) {
background._alpha -=25;
}
else if (hitTest( _root._xmouse, _root._ymouse, false)) {
background._alpha +=25;
}
}

View Replies !    View Related
Flash Button - Linking To HTML Page - Weird Problem
There could be a really easy solution for this, but I can't figure it out. I have a simple button that links to an anchor within an HTML page. Here the actionscript for the button:

on (release) {
getURL ("test.html#two");
}

when the button is pressed, the HTML page comes up but only to the top of test.html. The '#two' is not passed to the URL . Seems like everything after '#' is ignored. How can I get around this?

View Replies !    View Related
Help: Weird Or Not So Weird Thingy With Dynamic Text Animation
http://www.david.bullaro.com/

there are 3 buttons on the right side education, experience and awards. Each loads an MC that then motion tweens into view from the side. The MC dynamically loads a text file. At the end the text blinks once. I understand the blink because i needed to reload the text for that keyframe but is there anyway around that blink?

TIA.

View Replies !    View Related
Button Event
I could use help with this script. I found it at macromedia site
" buttonMC.onRollOver = function ()
{ code }"
buttonMC means movie clip. i want to use button events for movie clip or some other element in flash. I put this code in my clip but it don work. Please can you help me...

View Replies !    View Related
Button Event
Salve a tutti.
My trouble, I created a button, I put it in a movie clip which is in a movie clip on the stage.
I give the button this event:

on (rollOver) {
loadMovie ("chisono_sign.swf", "_root.descrizione");
}
on (rollOut) {
_root.descrizione.play();
}
on (press) {
gotoAndPlay ("site", "sezioni");
loadMovie ("chisono.swf", "_root.sezione");
}

The event rollover and rollout work fine, but the event press... doesn't work, cannot reach the frame labeled "sezioni" and cannot load the movie chisono.swf in the movie clip "sezione".
What can I do?

Thanks

View Replies !    View Related
Add A Button Event
what is the quickist way to add in a button for each Key event
(i want to keep the Key event)

onClipEvent (load) {space=1;}

onClipEvent (enterFrame) {
if (_name != "frog" and space==1 and _root.timer==true) {
if (Key.isDown(Key.UP)) {
_rotation = 0;
_y-=35;
space++;
_root.frogSound.gotoAndPlay(2);}

if (Key.isDown(Key.RIGHT)) {
_rotation = 90;
_x+=35;
space++;
_root.frogSound.gotoAndPlay(2);}

if (Key.isDown(Key.DOWN) and _y <380) {
_rotation = 180;
_y+=35;
space++;
_root.frogSound.gotoAndPlay(2);}

if (Key.isDown(Key.LEFT)) {
_rotation = 270;
_x-=35;
space++;
_root.frogSound.gotoAndPlay(2);}

if (this._x>390 or this._x<10) {_root.looseLife();}

switch (this._y) {
case 170: if ( !this.hitTest(_root.firstlogLane11) and !this.hitTest(_root.firstlogLane3) and !this.hitTest(_root.firstlogLane7)) { _root.looseLife();} break;
case 135: if ( !this.hitTest(_root.secondlogLane4) and !this.hitTest(_root.secondlogLane12) and !this.hitTest(_root.secondlogLane8)) { _root.looseLife();} break;
case 100: if ( !this.hitTest(_root.thirdlogLane19) and !this.hitTest(_root.thirdlogLane15)) { _root.looseLife();} break;
case 65: if ( !this.hitTest(_root.fourthlogLane20) and !this.hitTest(_root.fourthlogLane16)) { _root.looseLife();} break;
case 30: if ( !this.hitTest(_root.firstCheck) and !this.hitTest(_root.secondCheck) and !this.hitTest(_root.thirdCheck) and !this.hitTest(_root.fourthCheck) and !this.hitTest(_root.fifthCheck)) { _root.looseLife();} break; }
}
}

onClipEvent (keyUp) {space=1;}

View Replies !    View Related
On Button Event Help
I now making a game with some mini game
I make a button to go to the mini game , and I want the current mc , button, or whatever there is on the current frame (ex frame 1 )is removed,and when I go to the mini game ( frame 2),I would like no symbol / instance/ mc or whathever from frame 1 is carried to the frame 2

how do I do it ?
thx

View Replies !    View Related
Button Event
Hello.
I am working on a image gallery in Flash Actionscript 2.0.
I've made 2 buttons to go forward and backwards with the instances(btnPrev, btnNext).
I've then made an Actions layer, so my code issent floading arround in every button etc.
But then i need a method like this:
btnNext.event(on(Release))
{
ExecuteFunction();
}
I've tried diffrent things like btnNext.addEventListener etc, but without luck.
Hope you can help.

/Michael

Hejsa.
Jeg er igang med at lave et billedegalleri i Flash.
Jeg har lavet 2 knapper til at gå frem og tilbage med instance(btnPrev, btnNext).
Jeg har så lavet et Actions layer, fordi jeg ikke vil have kode til at være i alle knapper.
Så skal jeg bruge en metode som denne:
btnNext.event(on(Release))
{
minfunktion();
}
Jeg har prøvet forskelligt med btnNext.addEventListener osv. Men ingen held.
Håber der er nogen der kan hjælpe mig
MvH
Michael.

View Replies !    View Related
Button Event
Hi
I am learning flash. I have created 2 buttons and 2 text items. I have converted the text to movie clips and buttons as buttons. Initially only the buttons are displayed and not the text. I want to display text when a button is clicked. I looked at so many examples, but could not find this simple code. can someone tell me how to do this?.

Thanks in advance

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved