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








Button Location And Button Link


any one help me with this;

I have a button that is buried in a movie clip (MC2) that is within another MC (MC1) on the main scene/timeline (TL) - complicated, but necessary.

I need the button action to move the MC1 to a specified spot.

I've tried this;

on (release) {
_root.MC1.gotoAndPlay("PlaceNameOnMC1Timeline");
}


which isnt' working. Anyone help please?




ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 04-29-2005, 02:13 PM


View Complete Forum Thread with Replies

Sponsored Links:

Link To Url From Button - Help Please (button With Effects Is Yourzzz..)
Hey there!
I got a little problem..not that difficult it must be, but i can just not figure it out.. Can anyone check this button..Feel free to use it for whatever you want. Well, the question is quite simpel..this button has to refer to e.g.> http://www.mypage.com
Please if someone knows, let me know
Thanks

View Replies !    View Related
How Can I Make A Link To Another Scene For The Button If The Button Is In A MC?
sorry newbie question*_*
but im getting really mad at it now..
i created a button in a MC
i tried to put action on the button to make it link to scene 2
but it just doesnt work....
and i tried the button on main stage and it worked
but in my situation the button cant exist in main stage
what can i do? pls pls pls help me>__<+
PS. my version is Flash MX

View Replies !    View Related
Move A MC To A Different Location With A Button
I am having a problem: I want to move a MC from one location to another, using a button on another menu. tab1 is the name of the instance. When I use
on ( rollover ) { tab1._y = _y+(280-_y);
}
It moves the MC to the correct location, but it keeps moveing back even if the mouse is still on the button.

On the MC there is the following code (because it should be activated also if someone is rolling over the MC, and not only on the separate button):
onClipEvent (load) {
headline = "test1";
text = "blablablablablablablablablablablablablablablablab la";
trigger = 0;
}
onClipEvent (enterFrame) {
if (trigger == 1) {
_y = _y+(300-_y)/6;

}
if (trigger == 0) {
_y = _y+(425-_y)/10;

}
}
Please help!
Thanks

View Replies !    View Related
Get Path/location Of Button
In AS3 I'm trying to refer to a button and I can't get the correct location. How can I read the location of a display object.

eg. by placing something like:

trace(this.location);

on the button. Which might return

_root.movie1.movie2.instancename

View Replies !    View Related
Button Checking Mc`s Location In The Scene
Hello!

Again im in need of help.

This time i want to make a button to check if an mc is loaded into the same frame that the button is and than set alpha to that mc else not.
The buttons are also in an mc.


[Edited by Aare on 05-21-2002 at 10:49 AM]

View Replies !    View Related
Movieclip - Button - Location On Stage
Fellow Gurus!

I am using Flash 8.

I rendered some boxes on the stage. One is for a menu and another is for graphics. The idea is to have a picture pop-up in the graphic box whenever one passes a mouse over a button in the menu (which is in the menu box).

I have added movie clips to each button’s mouse-over. The movie clips contain a picture (at least for now). Thus when you pass a mouse over the button, a picture pops up. That is the easy part.

Now, I could simply reposition the movie clip until it appears within the graphic box. My problem is – I have a bunch of buttons and they may or may not be placed in the menu in exact positions. If I were to change a button’s position, the movie clip’s position is relative to the button and not the stage thus it would have to be repositioned as well.

Therefore, the pop-up pictures within the movie clips which are within the buttons must all pop-up in the graphic box regardless of where I place or reposition the buttons.

Let’s say I have the graphic box located at x=500 and y = 120.
Let’s say the button’s name is First_btn.
Let’s say the movie clip’s name is OneTest_mc.
And, I can bring it on stage in order to add an instance name of perhaps TestOne.

Now, I have looked at localToGlobal and globalToLocal. I am not sure which one work for my situation.

I am assuming that I can add AS2 to the movie clip’s (OneTest_mc) timeline – if that is not where it goes - let me know.

I have looked at the various scripts on the Internet and all they do is confuse me, namely because they are rotating graphics, etc. In another words, they complicate the examples. What I need is a script to add to each button/movie clip to make them all place the pop-up graphic in the box regardless of where the button is located.

However, I do not just want a piece of script. I would appreciate some explanation of the code so I can learn from it – not just giving me a fish but teaching me how to fish.

Thanks in advance,

Bill

View Replies !    View Related
Changing Y Location On Button Press
I'm trying to get the y position of a movie clip to change upon a button press.

i thought, that by using the code below i could get it to move from y position 400 to y position 168.

Any ideas on where I went wrong?


Code:
changepos = function (display:String) {
movieclip._y = 400;
this[display]._y = 168;
}

button1.onRelease = function() {
changepos("movieclip");
}

View Replies !    View Related
Changing Y Location On Button Press
I'm trying to get the y position of a movie clip to change upon a button press.

i thought, that by using the code below i could get it to move from y position 400 to y position 168.

Any ideas on where I went wrong?


Code:
changepos = function (display:String) {
movieclip._y = 400;
this[display]._y = 168;
}

button1.onRelease = function() {
changepos("movieclip");
}

View Replies !    View Related
Changing Music On/off Button Location Across Scenes?
i have a movie with just the music and the buttons on top of a multiple scenes movie. the music plays seamlessly across scene just fine. the only problem is that the on/off button stays at the same spot in every scene. the movie with just the music and the buttons has only one frame, which contains a movieclip that has the buttons in it. i made a copy of the first frame into the second and moved the movieclip to a new location. my question is...how do you code it in a way that when i press a button in the multiple scenes movie that corresponds to a new scene and also corresponds to the second frame of the movie with just the music and the buttons?
thanks for your help.

View Replies !    View Related
Button Needs To Load Movie But Also Specify Controller Location
I'm tryin to reduce the file size of my web site and as such need to put most of my info on seperate swf's usin loadmovie to load them in. The buttons presently have this code:

on (release) {
_root.gotoAndStop(85);

_root.controller1.targXpos2=1650;
}

on(rollOver){
_root.controller1.targXpos=182;

}

with the controller values being different for each button.

My question is is it possible to open the swf then direct the controller?

e.g

on (release) {

loadmovie{content.swf,1}

// (would not need this code) _root.gotoAndStop(85);

_root.controller1.targXpos2=1650;
}

on(rollOver){
_root.controller1.targXpos=182;

}

View Replies !    View Related
Making An MC Appear At The Cursor's Location Upon Button Click
Hi people!

I'm constructing a sub-menu that is held within an MC.

This sub-menu is to be activated when a certain area on screen is clicked (through the use of invisible buttons).

This is all ok.

But...What I need to achieve is to have this sub-menu appear at the cursor's location.

Can any body tell me how to do this?

Thank you

Deadhands

View Replies !    View Related
Change Cursor Location When A Button Is Pressed?
Hi all:

I simply want the mouse cursor to change its "x" and "y" coordinates when a button is pressed.

Thanks in advance

View Replies !    View Related
Change Cursor Location When A Button Is Pressed?
Hi all:

I simply want the mouse cursor to change its "x" and "y" coordinates when a button is pressed.

Thanks in advance

View Replies !    View Related
Making An MC Appear At The Cursor's Location Upon Button Click
Hi people!

I'm constructing a drop-down menu that is held within an MC.

This drop-down is to be activated when "button_01" on screen is clicked.

This is all ok.

But...

What I need to achieve is to have this drop-down menu appear at the cursor's location (which will be somewhere above "button_01" thats just been clicked)....

Then have the drop-down menu disappear when the user rolls off "button_01", but not if they're still on the drop-down menu.

Can any body tell me how to do this?

Thank you

Deadhands

View Replies !    View Related
Rollover Button/movie In One Location But Triggered Differently
I'm Really new to Flash and can't seem to write code that will do the following (despite spending hours and hours reading, trying, reading, trying again)...
I will be eternally grateful for any advice on getting this to work!!!

Summary:
I have a button on a webpage (button1_btn) that, in its Over state should turn from a b&w graphic to a color graphic (this is easy) and when clicked, link to a new page (easy too). I have another button in a different location on the same page (button2_btn) that, when clicked, should triggor the first button's (button1_btn) nested movie image (which begins with the same b&w image as the button itself) to play. The only time this movie clip should play is if button #2 is clicked.

What I have done so far:
1) Dragged a button instance of button2 onto the stage (button2_btn). This is a very simple button whose only function is to triggor the first button's nested movie clip (buildingbw_mc) to play.

2) Created a movie clip (buildingbw_movie). On the first frame of this movie, I have inserted the code:

if button2_btn.addEventListener() {buildingbw_mc.gotoAndPlay(20, "Scene1")
}

on frame 20 of this movie clip, I have inserted the code:
stop()

3) Created a button (button1_button). In the Up and Down stage of this button I have inserted the above movie clip (buildingbw_mc). On the Over state, I have placed the color version of the b&w graphic (this part works fine); Down state gets the appropriate URL (this works too)

Dragged the instance of this button onto the main stage.


What actually happens:
Button #1's rollover and hit function work fine but the movie clip portion of button #1 simply plays (and loops) when the webpage loads.

What I want to happen:
When the page loads, button #1 should only respond if rolled over directly (in which case the b&w image simply changes to color - NO movie to be played), AND, if button #2 is clicked, the movie clip currently nested in button #1 plays one time.

View Replies !    View Related
Button Link Inside Movie Clip Link To Slide #
First let me say I am a very new to ActionScript and Flash, but have a pretty good understanding of the web and a basic understanding of object oriented scripts from CSS and a few other languages.

I have a navigation menu which is a movie clip containing buttons inside it and have a slide presentation as my main content. I am trying to make the buttons link to a specific slide # in a different part of my flash presentation.

You can see the page here: http://brhpc.ericlevay.com

The nav menu is a downloaded source and the slide show is the default canned one from the Flash templates directory.

I was hoping to use the gotoandStop (slide#) to make the connection between the nav button and the slide but it does not do anything.

I will provide the source if needed...

Thanks!

View Replies !    View Related
Setting Properties Of A Movie From A Button Depending On User Location Within The Mov
Hi....

It is a little more complex than this so here goes........

I have a main menu that travels the main timeline,using frame Labels to guide it.... when the user clicks to go to another section I want to have a section closing animation play before the selected section opens.....the sections are color coded (red, blue, yellow, grey) and all use the same enter/leave animations but uses a background that tints to make the section animate in the right color code......

I am guessing the best thing to do is have the sections all close using the same movie but have the button tell the specific variable inside the movie (depending on which section the user is currently in) to be a certain tint property and then go to the user selected section by using "gotoAndPlay (x); variable at the end of the animation defined from the selection from the main menu????

My problem is I dont know how to send the information around flash.....

how would I get the button to play this closing animation with the right tint on the backing ......

any ideas would be greatly appreciated...

Thanks

would be easier using actionscript rather than try to do all the different movies according to the differentials as the animation is a little complicated

View Replies !    View Related
Text Flash Link - Button Mouseover & Link
Hi - I'm a basic user of flash mx - I'm redevloping my design site. How do you make text links and how do you do mouseover scripts in flash MX.

Thanks for your help

View Replies !    View Related
Creating A Link To A Location On A Network
Here's the deal. I need to make a flash app that has buttons that when a user clicks on them it links them to a printer on the network and installs it.

Essentially it would be like entering the link into the windows "Run" prompt.

Any ideas?

View Replies !    View Related
How Do You Link A Button?
I have four buttons in my animated banner. I have them working properly with the Up, Over, Down, and Hit functions. Now I'd like to make them link to other pages on my site.

By the way, my Help file locks me up when I try to use it. Is there an online version of it?

jon

View Replies !    View Related
A Link Through A Button?
Im a newb i was hoping someone could help me with this....


Ok i know how to make buttons and all but now how do i get the down frame to be set when you click it it takes you to a webpage? only way i have figured out is set the button with action script the the original scene since the action script commands for it is unavailible when i try to set it to the down frame and when i just set it to the whole button and i test the movie it just pops up a wbepage everytime it goes through that portion of the movie....so basically my question is how do i set the down frame of the button to have it direct you to a diffrent area of a webpage? or open a diffrent page
[Edited by Jamoan on 04-06-2002 at 12:08 AM]

View Replies !    View Related
Link A Button To A URL?
I am a beginer at flash.
Plz help me with linking a button to a web page when i click mouse to this button.

View Replies !    View Related
BUTTON LINK
I can't <b>link</b> (target) my <b>button</b> to an Iframe! I cant even link my buttons to anything! I've tried many times, and I've posted help everywhere, and cannot get anything! I need to link my button to the IFRAME, so when you click on the buttons, it changes the content in the IFRAME. Its just like frames, except using buttons instead of words, and IFrames instead of just normal frames. <b>I need major help!</b> If you still dont understand what i mean, go to the flashkit <b>guestbook</b>, and at the guestbook, you can see these buttons, that you click on, and the content changes in the iframe. That's what i'm trying to do on my site, but unable to do that. Pretend < > is ( ). I did, (a href="...html" TARGET="...")(object...*button*)(/object)(/a) *the (object) was there already for the button. And it wont work! But that's how it said in many sites. <b>PLEASE REPLY to: xiluvfreddiex@hotmail.com IF YOU KNOW THE ANSWER THE MY PROBLEM!</b> THANKS!

View Replies !    View Related
Button Link
How do i link a button to a url????

View Replies !    View Related
Button Link
Hi everybody,
i have a question about a button link. When i make the the text into a button there is a mistake. I want to have the text into a button when you move over not only the text is a button but also a rectangle around it.If you move with you mouse over the button your mouse is a hand just over the text. I would like it to have a hand in a rectangle around the text if you know what i mean. I just don't know how to do that. I hope you can help me.

Thanks,

Dj Persone

View Replies !    View Related
Link Or Button
Hi there

Is there a way to make a link or button downloadable. when it is click it will start downloading.

thanks

View Replies !    View Related
Button To Link?
How do I get a button to link to an html page?

View Replies !    View Related
Button/Link Help Please :)
Hello
Hoping someone may be able to help me with a problem!

I've created a website using a long (800x2310 pixels) flash movie, and down the bottom of the first page i have a link to another frame.

Yet, when you click the link it goes to the next frame, but down the bottom of the page, instead of to the top, making it look rather funny!

I was wondering if there is a way of making the link refresh/reload the page so it goes to the top??

To see what i am meaning (if i don't make sense!) go to www.positiveenergy.info - down the bottom of the About The Positive Energy Company page there is a underlined text link to The Oracle, if you click this you will get what i am trying to do!

Thanks for your time Have a FANTASIC day/nite!!

View Replies !    View Related
Link A Button
How do I create an outside link to a button?
Thanks

View Replies !    View Related
Pop Up Button Link
HI>
how do u code a button in flash to link to javascript files...
THANX

View Replies !    View Related
Button Link
hi i am making an intro to a friends website, and i was wondering how to assign a url to a button. like i want the movie to play, and the visitor will click the enter button, and bring them to the first page. thanks, peace

View Replies !    View Related
Button Link
HI

i'm trying to assign a action to a button that would go to the contact page which in this case is scene 3. but it does not seem to work. what am i doing wrong. i'm using flash mx professional so i don't know if there is a difference between professional and mx.here is the script i have assigned

on (press) {
gotoAndPlay(scene3);

}

View Replies !    View Related
Button Link
hi

i'm trying to link a button to a website.

he is the script
on (press) {
getURL(http://www.ryanair.com/);
}

the question i have is when i put the exact address in ..
the //// will end up making it a comment.
is there a new way to write a link..also how i make it open up in another window.
i'm using flash professional

thanks

View Replies !    View Related
How To Use Xml To Go To Link By Button
I have problem about using XML to link certain website though button.
Please help me how to write the actionscript, thanks^^

View Replies !    View Related
Button Link
Hey guys my main webpage has a button that pops up another page that contains an swf. In the popup swf I have a button that I want when someone clicks on it then it would change the adress of the main page and close the current window (the popup).
What would the on release command code for the button be?

View Replies !    View Related
Link -> Button
Hi all,
I have a question! it's about this script:

Quote:




/****************************

Alessandro Crugnola

SEPHIROTH
alessandro@sephiroth.it
http://www.sephiroth.it

****************************/

fscommand("allowscale",false);
fscommand("trapallkeys",true);

// dichiariamo i valori di acc e smorzamento dei movieclip(s) che
// comporranno il nostro menu
MovieClip.prototype.acc = 3.9
MovieClip.prototype.smorz = 1.22

// ACTION FOR THE BUTTON
MovieClip.prototype.DoSomething = function(theClip){
trace("nome: " + theClip._name)
trace("valore: " + theClip.mov.txt)
// here you can add your script for the button action...
}
etc..etc....






as you can see, the maker of this (http://www.flashkit.com/downloads/mo...ing%20menu.zip)
says people can add the script for the buttons, but I don't know how ! could you please help me out?
Thanks a lot !!

the file is located here
and this is the full script:

Quote:




/****************************

Alessandro Crugnola

SEPHIROTH
alessandro@sephiroth.it
http://www.sephiroth.it

****************************/

fscommand("allowscale",false);
fscommand("trapallkeys",true);

// dichiariamo i valori di acc e smorzamento dei movieclip(s) che
// comporranno il nostro menu
MovieClip.prototype.acc = 3.9
MovieClip.prototype.smorz = 1.22

// ACTION FOR THE BUTTON
MovieClip.prototype.DoSomething = function(theClip){
trace("nome: " + theClip._name)
trace("valore: " + theClip.mov.txt)
// here you can add your script for the button action...
}



// label sui bottoni
nomi = new Array("HOME","JOIN US","FORUMS","POLLS");
loghi = new Array("cubo","triangolo","ottagono","sfera");
max = 3
// creo il menu
for(i=1;i<=max;i++){
duplicateMovieClip("_root.menu0","menu"+i,i)
myMenu = _root["menu"+i]
myMenu.mov.txt = nomi[i]
myMenu.attachMovie(loghi[i],"logo" + i,(5000+i))
myLogo = eval("_root.menu" + i + ".logo" + i)
myLogo._x = -76
newColor = new getColor(myMenu);
}
_root.menu0.attachMovie("cubo","cubo",(7000+1))
_root.menu0.cubo._x = -76

// coloro i menu in modo differente
function getColor(what){
inizio += (255/nomi.length)/3
colore = new Color(eval(what))
alex = new Object();
alex = colore.getTransform();
alex.rb += inizio
alex.gb += inizio
alex.bb += inizio
colore.setTransform(alex)
}

View Replies !    View Related
Button's Won't Link To Url's - HELP
Could someone please check out the attached fla. file? I have created a simple menu bar with some linked buttons (invisible) and they won't link to my url's. For some reason the url's start to open up but stop seconds later. I have no clue what I'm doing wrong.

View Replies !    View Related
Can't Get Button To Link To A Different URL
I am needing to change the URL that I have a button linking to. I go in there and just change the address of where they have moved the page to but it still will not link to the correct place. Is there a reason that the change to the new code does not get saved?

I am extremely desperate to get this button fixed because this single defective link/button is decreasing the value of my website.

I am using FlashMX. I know I need to upgrade my software

desperate for help

View Replies !    View Related
Help With Button Link
I have an exe projector for pc and mac my link works in pc but not mac.
here is the link:

on (release) {
getURL("http://www.sdwebworks.com/track.php?source=AIMCDCAMPAIGN&targetUrl=http://www.google.com", "_top");
}

Does anyone know how to make this link work for mac?

thanks for your help.

View Replies !    View Related
How Do I Link A Button To A Pdf?
I have created a basic website with flash. What actionscript do I use to make the button link to a pdf?

View Replies !    View Related
How Do I Put A URL Link In This Button?
yeh i know its dumb but I bought something off of flashden.net.. and i'm confused about putting a link in the code.. ITs probably so simple. its just a scrolling list for navigation... but it has dummy items.. When i went to add my own lists to it, it so weird. Heres what it looks like

//------------------------------------------------
//total menu items
ti = 10;
//------------------------------------------------
//set up some demo items
n = 0;
while (Number(n)<Number(ti)) {
set("item" add n, "item" add n);
n = Number(n)+1;
}
//------------------------------------------------
//what to do with YOURs?
//remove the above LOOP (which creates dummy variable names.) START at "0"!!!!! Create variables named item0="blah", item1="test", item2="and so on..." and you're set! Look at the button action. It is currently set to GETURL and load a "swf" file with the same name as the button you just clicked on into a placeholder (which does not exist in this demo).



So what do i do to add a link to say "contact" that goes to a url?

thanks any help is greatly appreciated!

View Replies !    View Related
[F5] Button With Link.
Can someone please help me. I need to make a button with a link for webpage flash intro. I have no idea how to do this. Using CS3.

Thanks.

View Replies !    View Related
How To Link A Url To A Button Use XML
I want to create a button in flash that is linked to a URL. I want it to be able to change the URL through XML because I have a long list of URL links that need to be update regularly. Is this possible?

xml example:
<link>
<btn1 title="CD player" url=http://www.google.com></btn1>
</link>

The question is how to make the button work to get the URL in actionscript.
Anybody?

View Replies !    View Related
Cant Get Button To Link
Hi all, Im having an issue with a flash header I purchased...

I cant seem to get the buttons in it to link to where I need them to be.
The action script is there, it just wont go anywhere...

This is the script Im using..

on (release) {
getURL("index.html");
}

Im a beginner with all of this, so dont drown me with technical stuff please lol

Use small words for me!

View Replies !    View Related
Link Button To Swf
hi there...

first.. i must apologise for this, what you must think, is a ridiculously easy question ...

here goes.. (and btw ive been searching for an hour with still no joy grrr)

i have 3 files... called

flags.fla - contains 2 movieclip buttons (german flag(instance=deClick and an english flag(instance=enClick)

welcome.fla - is a greeting in english

welcome_de.fla - is a greeting in german!!

in the flags.fla file, in the first frame of the actions layer i have experimented by putting lots of different combinations of code ive found from the internet... none to my joy...

how do i link flags.fla to either welcome.fla or welcome_de.fla depending on which flag is selected?

again.. im sorry for the ease of this question (although i dont find it easy hehe)

thanks for reading and replying guys

jeffers

View Replies !    View Related
Button---->Link
how do I make a button into a link?

can anyone give me the code for that?

View Replies !    View Related
Button Link To URL
So I've looked at w3schools.com for a tutorial on how to get a button to link to a URL by clickint the "+" symbol in the action window and click the "GetURL" aciton.

but while having the button clicked, the action window says "Current selection cannot have actions applied to it"

any help?
thanks!

PS. i apologize if this was posted before, i did do a good search and didnt find anything

View Replies !    View Related
Link To Css Using Button, How?
can Flash mx 2004 pro can link to external css style with a click of a button?

View Replies !    View Related
Button: Link To Pop-Up...
Ok here is my situation. I have a new portfolio where I want all the thumbnails to link to a pop up (that isn't blocked). I want the pop up to be centered on that person sceen.

Is that possible to do without the pop up being blocked? Thanks

Mike

View Replies !    View Related
Link A Button
I went to your page on linking a button
http://www.kirupa.com/developer/flash5/buttonlink.htm

I'm using flash mx professional 2004. When I right click on the button

I don't see "Actions"

Can you help me..
Thank you

View Replies !    View Related
How To Link A Button?
Subject; I tried the way Flash 5 says to, in the Ktutorial, but cant get it to work. Any help appreciated, thanks a lot.

Alex

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