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




Buttons Linking To Images



i have 15 buttons. that i want to link to 15 images. the images are named like picture0.jpg picture1.jpg picture2.jpg all the way up to picture14.jpg.

i want when a user clicks one of the 15 buttons the image above loads. say he choose button 5, picture4.jpg would show above.

any ideas how to go about this?
Any help, script, fla appreciated.

oliver



FlashKit > Flash Help > Flash MX
Posted on: 08-12-2002, 08:15 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Linking Images To Images In Flash
hey. im wondering how to link an aimage to another image in flash.

see what i want to do is have some like thumbs and when u click on it, it opens up the original large picture inside a new window.

just wondering hwta the script and stuff is for it.

on release
open picture in new window

or what??
cheers

Creating Animated Buttons Tut-Linking The Buttons To Content
I followed Lee's excellent tut on creating buttons using movies clips.

I am rather confused as to how the buttons can be linked to content -

ie Portfolio button to portfolio page - Contact button to contact page.

Im rather new to flash 8 however from my understanding of MX2004 I know
how to create a behaviour on a button symbol to play a certain page. After playing about with Flash this evening I was unable to get any button created using the tut to link to another page.

Can someone point me in the right direction, code or otherwise.

Thanks

Chris

Help With Linking Images
Ok, I just want to create a simple scrolling section with text and image that can be updated externally using a txt file or XML.
Exactly the same as the news section on this site ...
http://www.untitledprojects.com/index3.php
I am curretly using an external txt file to update but want to start adding images below blocks of text? Where do I start? An FLA would be great. But for now why wouldnt this work ... for example?


Code:
text=
<body>
<p>this is a test</p>
<p><img src="http://www.pretendwebsite.co.uk/test.jpg"></p>
</body>
</html>
Do I need to start using XML and are there any basic tutorials on this?

Hope someone can help cos Im not getting anywhere.
Thanks.

Images Linking
Hi



I am having problems with a template I have downloaded. I would like the photos to appear in the following order with the titles as below:





5 and 6 linked to 12



Physical Education

Dance

Geography

Primary Schools

Opening Minds

International Links



I have duplicated photo 1 to become photo 5 and photo 2 to become photo 6. Whenever I change 1 photo 5 changes. The same is happening to the text. Can someone help please I have spent ages on it!



Thanks

Linking External Images
Hello,
a few days ago i asked this question and got an answer, but i couldn't get it to work. I want to link to the images in my flash file rather than embed them. this is the code I received, but It's not working, what else do i have to do.

_root.createEmptyMovieClip("logo", 5);
_root.logo.loadMovie("amadeusMenu2.gif");
_root.logo._xscale = 50;
_root.logo._yscale = 50;

XML Slideshow - Linking Images
Hey all, I found a great XML based slideshow at www.whatdoiknow.org - unfortunately it doesn't include links on the images like I need. In the FAQ's he does say it's easy to do

"Not hard at all, as others in this thread have pointed out. You could easily put a ‘caption=”text”’ attribute in the xml nodes, create a variable for that text when the xml is parsed, and then apply the string to a text field."

I understand adding the caption="text" to the xml node, but the rest i"m a little confused on. The code from the actionscript is:

/****************************/
/* Crossfading slide show */
/* Author: Todd Dominey */
/* http://whatdoiknow.org */
/* http://domineydesign.com */
/****************************/

// stage alteration
Stage.scaleMode="noScale";
Stage.align="LT";


// set random # variables - each must be 0 for first 'while' loop below
var randomNum = 0;
var randomNumLast = 0;

// movie clip containers
this.createEmptyMovieClip("loader1_mc",2,{_x:0,_y: 0});
this.createEmptyMovieClip("loader2_mc",1,{_x:0,_y: 0});

// preload watcher
this.createEmptyMovieClip("watcher_mc",100);

// load xml
images_xml = new XML();
images_xml.ignoreWhite=true;
images_xml.onLoad = parse;
images_xml.load("images.xml");

function parse(success) {
if (success) {
imageArray = new Array();
var root = this.firstChild;
_global.numPause = Number(this.firstChild.attributes.timer * 1000);
_global.order = this.firstChild.attributes.order;
_global.looping = this.firstChild.attributes.looping;
_global.fadetime = Number(this.firstChild.attributes.fadetime);
var imageNode = root.lastChild;
var s=0;
while (imageNode.nodeName != null) {
imageData = new Object;
imageData.path = imageNode.attributes.path;
imageArray[s]=imageData;
imageNode = imageNode.previousSibling;
s++;
}
imageArray.reverse();
imageGen(imageArray);
} else {
trace('problem');
}
}

// depth swapping
function swapPlace(clip,num) {
eval(clip).swapDepths(eval("loader"+num+"_mc"));
}

function loadImages(data,num) {
if (i==undefined || i == 2) {
i=2;
createLoader(i,data,num);
i=1;
} else if (i == 1) {
createLoader(i,data,num);
i=2;
}
}
function createLoader(i,data,num) {
thisLoader=eval("loader"+i+"_mc");
thisLoader._alpha=0;
thisLoader.loadMovie(data[num].path);
watcher_mc.onEnterFrame=function () {
var picLoaded = thisLoader.getBytesLoaded();
var picBytes = thisLoader.getBytesTotal();
if (isNaN(picBytes) || picBytes < 4) {
return;
}
if (picLoaded / picBytes >= 1) {
swapPlace("loader2_mc",1);
thisLoader.alpha(_global.fadeTime,100);
timerInterval = setInterval(imageGen,_global.numPause,data);
delete this.onEnterFrame;
}
}
}
function imageGen(data) {
// random, or sequential?
if (_global.order=="random") {
// choose random # between 0 and total number of images
while (randomNum == randomNumLast) {
randomNum = Math.floor(Math.random() * data.length);
}
loadImages(data,randomNum);
randomNumLast = randomNum;
} else if (_global.order=="sequential") {
// start at 0, increment to total number of images, then drop back to zero when done
if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
loadImages(data,p);
p++;
} else {
trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
}
clearInterval(timerInterval);
}
stop();

Scrolling Images And Linking
Hello.

I am fairly new to actionscript so this may be a simple problem, but i need to scroll images a certain pixel amount vertically (150px) and have it animated (smooth transition) using just an up and down arrow.

I also need to link to other files by clicking on a movie symbol, and cannot figure out how to do that either. Embedding a button in the movie doesn's seem to work, so I was wondering if there was a way to do that.

Any help would be appreciated. Thanks alot : )

Linking To External Images?
Hi everyone,

I was wondering if it is possible in flash to link to images on a different website and have them appear in the movie? If so, is there an example movie I can download somewhere? I have searched but haven't found one yet.

Thanks,

Mark

Help Linking To External Images
I am trying to link to exernal images, but cant' get it to work. I have the following action script:

about_btn.onRelease = function() {
_root.heading.text = "About Asma";
_root.dest.text = "Anna is a leading Mehndi text text text......";
_root.main_mc ="images/021_21.jpg";
}



Please help.

Help Linking To External Images
I am trying to link to exernal images, but cant' get it to work. I have the following action script:

about_btn.onRelease = function() {
_root.heading.text = "About Asma";
_root.dest.text = "Anna is a leading Mehndi text text text......";
_root.main_mc ="images/021_21.jpg";
}



Please help.

[CS3] AS2 - Linking To Online Images
Hi guys,

I'm busy working on a portfolio which I can email to potential clients. The basic concept is small thumbnail images which, when clicked on will show a larger version of the image. I am trying to keep it as small as possible so I tried to upload the larger images online and link the thumbnails buttons to them. This is the code I have used:


PHP Code:



on (release) {
    loadMovie("http://www.upload-images.net/imagen/a05a5878b6.jpg", "_root.target");
}




The problem is when I view the swf, the online images don't appear. Is there another way to link to online images and if not, how could I link my thumbnail images to images in the library?

Hope this isn't too confusing...

Linking Images/pictures
Please excuse the n00b question from this Flash Novice...

I am creating a flash file that has moving pictures on motion tweens. I would like to have the pictures linked externally so that if my client changes IMAGE1 in a particular folder, then the flash file will use that new image instead of the old one - Is there any way to do this?

Linking Images To URL In XML Slideshow
Can u pls help me in linking the images to a specified url (suppose u click on one image it goes to yahoo.com and then click on the second image it goes to hotmai.com ) in the XML slideshow.
What all changes should i make to the code.
Enclosed is the file.

thanks

Linking Slideshow Images Through XML
There is an easy slideshow fade provided by Dale Sattler on http://www.blog.noponies.com/archives/13

Can anyone help me getting the non caption pictures to link to urls? He tried quickly to exmplain it but i have know idea what hes talking about. Thanks!

Linking Images On My Website Into Flash
Hi, Can anyone please help me?
I am currently re-making a site in Fash MX (after learning the basics). I've doen ok so far, but now I have a real problem.

In the flash movie, I have created a gallery section. Within' this section the user is shown several thumbnails towards the left hand side of the movie. When a user clicks on the thumbnails, the origonal full size version is displayed to the right of the thumbnails. The origonal images are pretty large and I do not wish to load them with the preloader as it will take forever (as I have allready found out).

Is there any way I can put the images into my movie from an external location (eg. the /images/ directory on my server) or can I not have the larger images loaded when the pre-load starts and give them their own preloading sequence?

TO sum up my problem. These large images are huge...its not worth loading them all when the movie starts because it will take too long. Is there any way I can just load them when they are clicked on.

Thankyou I would be much obliged if someone could answer this question.

Stephen Higgins

Dynamic Images .txt File Linking...
Hi,

One of my dynamic images folders isn't showing up the .jpgs involved.

For all folders, I have a .txt (text) document that lists all the images but it's not working on one out of three of these image folders.
To be more specific, here is what is in the .txt document:
num=3&images=image01.ext|image02.ext|image03.ext&s wfs=

That's not working! For the other image folders, the corresponding .txt document is like this:

num=3&images=website01_thumbnail.ext|website02_thu mbnail.ext|website03_thumbnail.ext&swfs=http://www.website01.com|http://www.website02.com|http://www.website03.com

Yes, the difference is that the others are active links to either URLs or .SWFs.....but for the folder that isn't working, they are to remain static images -- fine as is -- they don't need to link to anything. I just cannot understand why it's not showing the .jpgs in the empty movie clip like it is on the others??

Any ideas?

Thanks!

[F8] Linking Images Of A Server Into Flash?
Hi!

I tried searching without success...

I'm making a banner in Flsh 8 pro. The filesize grows to big, I cant get it below the servers limitations. I tried linking external jpgs to the flash with loader components but it doesn't work as long as the jpgs are on a different server as the swf file. In flashpreview the images show (I get some "Security Sandbox Violation") but when previewed in a browser they won't.

Is there any easy way around this problem? I don't know xml so i'm hoping there's a way to do it without it...

Tanks,
Ekiike

Trouble Linking Photoflow Images
I'm having the hardest time trying to link my photoflow images to my html pages, I entered the correct info in the component inspector/values area , but I think trhere's more to it,Iv'e checked aorund and saw something about setting this up in the actions, however there's been no step by step instruction for it, not even on the flashloaded page, maybe I'm just in a DUHH stage, any help would be helpful.

Trouble Linking Photoflow Images
I'm having the hardest time trying to link my photoflow images to my html pages, I entered the correct info in the component inspector/values area , but I think trhere's more to it,Iv'e checked aorund and saw something about setting this up in the actions, however there's been no step by step instruction for it, not even on the flashloaded page, maybe I'm just in a DUHH stage, any help would be helpful.

Linking Images In Photo Gallery: Help?
I set up a few galleries using sbeener's tutorial. I would like to link each image so visitor's may click on the image they like and have it pop up, full size in a new window. Also, I have animations I would like to have pop up and play as well (same concept I'm sure).

Can anyone tell me how this is done?

Linking Images In Photo Gallery: Help?
I set up a few galleries using sbeener's tutorial. I would like to link each image so visitor's may click on the image they like and have it pop up, full size in a new window. Also, I have animations I would like to have pop up and play as well (same concept I'm sure).

Can anyone tell me how this is done?

Dynamic Images Linking To External Files
How can I link to image files instead of importing them into the FLA? My web application needs to be able to 'build' a composition of images, so instead of coming up with all the combinations seperately, I thought flash would be a good fit.

Any clues?

TIA

-Rob

Linking Text To Images/video Clips
I'm using MX to create projector files that will be burned onto CDs/DVDs for an interactive learning project. I've created a template with links on the left side and a large block of space in the main area. I'd like to hyperlink certain words and phrases within text blocks in the main area that will call photo images or short video clips into that location.

Since the files will be local on disks (not over the Web), I figured that most machines will be able to handle the processing load, even tho Director is supposed to be better suited for this purpose than Flash. My first question is--is this a correct assumption? Opinions?

Second question: How best to make the links for the user from the words in the text to the images/video clips. I was going to convert the specific words I want to use as links into buttons, and then use the loadMovie action to load the image or clip into the template I've created when the button is released. My guess is that there's a simpler/more efficient way to do this--particularly within a text block. Any help here greatly appreciated.

Thanks!

Linking Buttons
I have a button link on my site under my portfolio tab
it links to a website. but when you click on it it put the url behind mine. I used the get url and just put the site url their. Can some help thank you. Any other sugestions would be great also. Thank you

Buttons And Linking
Can I link flash buttons inside my webpage instead of outside of it. How would i do this. Suppose i have a leftframe and rightframe.html
I don't need the url locator do I because the files are stored on my server. How would I do this. Do I still need to type the complete path of my webpage? Or do I just add the leftframe to the button. I just don't know how to do this. Anyone know?

Buttons And Linking
Do I have to upload the files that I want my buttons to link to inside the MX flash program?

I was reading that in dreamweaver 4 buttons can link to documents but it seems it is done as the person is inside the MX program.

I thought if I write the html links to the buttons that when I upload the html and flash buttons that they will go to the html document. It doesn't

Linking Buttons
I am either really forgetting something or buttons are hard! How can I link a simple button to a URL?

Linking Buttons To ....
so how do you link a button to a word document???
I used on release get url. It worked two days ago - and then yesterday it STOPPED WORKING. I know it sounds ridiculous....but I swear I didnt touch that file between the time it worked and didnt work!!

Please any ideas??
I also have to link to pdf file.

These files should be available for download/viewing. Not open up within Flash. It CANNOT be that diffcult?!

Thanks!

Linking Buttons
I have a button that when you click it I want it to play another swf ...what is the code I put on it to make it do taht I cant seem to remember?! thank you

Linking Buttons To Mc's Within A Mc
Guys,
I have an image slider made up of 3 mc's which I've taken off the main timeline and put inside another movie clip (called 'transparent mask'). I want the buttons (see the code below) to link to the other movie clips within ITSELF. They are called 'timelineroot', 'timelineroot3' & 'contentboxes'. Where do i need to buttons to point to? What am i missing..?

cheers

on (press) {
tellTarget ("/timelineroot") {
gotoAndStop(1);
}
tellTarget ("/timelineroot3") {
gotoAndStop(1);
}
}
on (rollOver) {
tellTarget ("/contentboxes") {
gotoAndStop(2);
}
}
on (rollOut) {
tellTarget ("/contentboxes") {
gotoAndStop(1);
}
}

Linking Buttons HELP
Hi there,

I hope that someone can explain me how to make my buttons work correctly. I'm trying to link between pages, using the standart procedures, of converting a link button to symbol and then using the controls to a Goto WebPage which is fine, BUT everytime when i export and publish the file, i have to click twice on a particular button to make it go to the next webpage. How can i make it work just by clicking it once??? Please, help!!!

The actionscript i alaways use for my buttons is:

on (press) {

//Goto Webpage Behavior
getURL("http//xxx","_self");
//End Behavior

}


Thanks

Linking Buttons....
this is in Flash 8

If I make buttons using....

Code:
duplicateMovieClip(_root.newsBox.newsCount.allNumbers.newsNumber, "newsNumber"+(i+1), 5+i);
_root.newsBox.newsCount.allNumbers["newsNumber"+(i+1)].digit = (i+1);

how do i make the deployed buttons hold a link...?
on release;..... i want to change the loaded content - image and text.
at the moment i have previous and next working - but cant make the jump buttons function.

?

I have the button tracing "this.digit" which is the number assigned to each button, can't make it link to the content. Do i need to "push" the number to an array...or similar?

Linking Buttons To The Web
i just posted a similar question about a week ago, and with my other site it worked, but now i am building something similar and have followed the same format with buttons linking to websites, but for some reason now it wont work.

basically what i want to do is link the name of a website in a paragraph to that site. so i created a button (on it's own layer) and space in the text so that it would change colors and link to a site when clicked on.

here is my code, i'm not sure what i'm doing wrong. also my files are attached. any help would be much appreciated! i'm using cs3.

maintext_btn.onRelease = function(){
getURL("http://sde.state.ok.us/pass", "_self");
}

Linking Buttons In CS3
Hey,

I am new to CS3, and I couldn't add action to button... so I add action to frame. My button is GumbDomov and it works, but I have one other button that also has to be linked (named GumbKontakt)

Here is the code, how could I add action for this two buttons.

GumbDomov.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://.../"),"_self");
}

....................................

If I write action like this...

GumbDomov.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://.../"),"_self");
}

GumbKontakt.addEventListener(MouseEvent.MOUSE_DOWN , mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
navigateToURL(new URLRequest("http://.../"),"_self");
}

It doesn't work.
How should I modify the ccode?

Thanks

Linking Buttons To URL
I have 30 buttons that I am trying to link to 30 different URLs. Here's what I have ...

aguasviva_btn.addEventListener(MouseEvent.CLICK,cl ickHandler1);
booth_btn.addEventListener(MouseEvent.CLICK,clickH andler2);
boughton_btn.addEventListener(MouseEvent.CLICK,cli ckHandler3);
brumley_btn.addEventListener(MouseEvent.CLICK,clic kHandler4); buss_btn.addEventListener(MouseEvent.CLICK,clickHa ndler5);
calfee_btn.addEventListener(MouseEvent.CLICK,click Handler6);
casanova_btn.addEventListener(MouseEvent.CLICK,cli ckHandler7);
lgarcia_btn.addEventListener(MouseEvent.CLICK,clic kHandler8);
ygarcia_btn.addEventListener(MouseEvent.CLICK,clic kHandler9);
herrera_btn.addEventListener(MouseEvent.CLICK,clic kHandler10); hite_btn.addEventListener(MouseEvent.CLICK,clickHa ndler11); mier_btn.addEventListener(MouseEvent.CLICK,clickHa ndler12); orr_btn.addEventListener(MouseEvent.CLICK,clickHan dler13); poole_btn.addEventListener(MouseEvent.CLICK,clickH andler14);
prado_btn.addEventListener(MouseEvent.CLICK,clickH andler15); stanke_btn.addEventListener(MouseEvent.CLICK,click Handler16); stinnett_btn.addEventListener(MouseEvent.CLICK,cli ckHandler17);
thompson_btn.addEventListener(MouseEvent.CLICK,cli ckHandler18);
tuten_btn.addEventListener(MouseEvent.CLICK,clickH andler19); vasquez_btn.addEventListener(MouseEvent.CLICK,clic kHandler20);
wallach_btn.addEventListener(MouseEvent.CLICK,clic kHandler21); watt_btn.addEventListener(MouseEvent.CLICK,clickHa ndler22);
function clickHandler1(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/Yossandy_Garcia_Clip"));
}
function clickHandler2(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Robert_Boothe_Clip"));
}
function clickHandler3(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Mike_Boughton_Clip"));
}
function clickHandler4(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Mike_Brumley_Clip"));
}
function clickHandler5(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Nick_Buss_Clip"));
}
function clickHandler6(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Clay_Calfee_Clip"));
}
function clickHandler7(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Gabriel_Casanova_Clip"));
}
function clickHandler8(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Luis_Garcia_Clip"));
}
function clickHandler9(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Yossandy_Garcia_Clip"));
}
function clickHandler10(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Elian_Herrera_Clip"));
}
function clickHandler11(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Pete_Hite_Clip"));
}
function clickHandler12(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Jessie_Mier_Clip"));
}
function clickHandler13(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Kyle_Orr_Clip"));
}
function clickHandler14(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Lyndon_Poole_Clip"));
}
function clickHandler15(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Marcel_Prado_Clip"));
}
function clickHandler16(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Cal_Stanke_Clip"));
}
function clickHandler17(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Danny_Stinnett_Clip"));
}
function clickHandler18(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Eric_Thompson_Clip"));
}
function clickHandler19(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/Brandon_Tuten_Clip"));
}
function clickHandler20(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Luis_Vasquez_Clip"));
}
function clickHandler21(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Matt_Wallach_Clip"));
}
function clickHandler22(event:MouseEvent):void{
navigateToURL(new URLRequest("http://www.standard.net/ASP/RaptorsInterviews/ Michael_Watt_Clip"));
}


I am getting this error ....
1046: Type was not found or was not a compile-time constant: Aguasvivabtn.


I can't seem to figure out what's wrong

Linking BUTTONS Help
HEY, can someone help me with this?
I did a menu, with 8 buttons, and now I want to link each button, to a different (page with and image)
ex: room1 goes to reception "image" and so on... How can I do it?

I need to know this so hard, my deadline is tomorrow, my teacher will kill me!

I need to know all that things, actionscripts, behaviours , that stuff to make that happen!

XX THANKS ary

Linking Buttons To Url's
Hi

I've made a few buttons in flash 8 but i'm having difficulty trying to get the buttons to link to a url address. The buttons are symbols and i have used the getURL function under Browser/Network actionscript but its just not working! how do i get these buttons to work. I'm probably just being a bit dim!!

thanks
dave

Linking Buttons To A URL
I am tring to make a flash web site and i got stuck. i need to knew how to link a button to a URL. i resently switched to Flash CS3 but i am having to save all of my file as flash 8 files to get the action script to work. i usauly use AS1&2 i tried switching to AS1&2 in the CS3 file format but that did not work. So i need to now how to do it in AS1&2 fomat. Also if you now how to do AS3 code for buttons and sutch, i could really use some help. Thanks. <3

Linking Buttons
Hi,

I know this is probably really easy to do but I'm fairly new to flash, I'm using Flash MX.
I have a button that I want the user to click on to open a jpeg image. I've tried using this script:

// Attach to frame
mybutton.onRelease = function () {
getURL("pathname", "_blank");
};

But all I get is this error message:

**Error** Scene=Scene 1, layer=action script, frame=1:Line 2: Statement must appear within on handler
mybutton.onRelease = function () {

Is the problem that this script doesn't work in MX? Please please please HELP!
Thank you in advance.

Linking Buttons
I'm currently working on a scene with an image loader that is linked to a series of buttons and their individual instance names. I have now placed these buttons within a cursor controlled image scroller (still within the same scene) however now the image loader can no longer read the buttons' instances in order to load the relevant images onscreen. Instead it reads the movies' instance. If anyone can help I would be very grateful.

Linking Buttons
I'm currently working on a scene with an image loader that is linked to a series of buttons and their individual instance names. I have now placed these buttons within a cursor controlled image scroller (still within the same scene) however now the image loader can no longer read the buttons' instances in order to load the relevant images onscreen. Instead it reads the movies' instance. If anyone can help I would be very grateful.





























Edited: 12/17/2008 at 07:23:48 AM by davey darch

Linking Buttons
ok well this is a little more technical then basic button linking.
i made these animated buttons that i want to link. Ive tryed multiple things but no luck. heres what i got. Im making a site in dreamweaver and im using buttons i made in flash for navigation and im displaying the content in an Iframe. the delema is that i cant seem to get them to link right. take a look at the button that is attatched and see if its possible. plz post any ideas.

Linking Buttons With MCs
I'm having trouble figuring how to get the buttons to reference the correct imageBox and position the imageHolder. The imageHolder is a movieclip on the main stage and inside of that are a series of imageBoxes attached for each image. You can click on each image and the imageHolder will move and the images will enable and disable. If you click on a button the current image will fade but then return to 100% alpha. It's not completing the disableImages function.

You can view a swf of it HERE. Probably viewing it will be better than anything I can describe.

This is the actionscript for enabling and disabling images and for positioning the imageHolder:
ActionScript Code:
function disableImages() {
for (i=0; i<imageTotal; i++) {
imageHolder["imageBox"+i].enabled = false;
}
//
var whereTo:Number = _root.imageHolder["imageBox"+p]._x+(_root["image"+p].w/2);
TweenLite.to(imageHolder, 0.75, {_x:(Stage.width/2)-whereTo, onComplete:currentImg});
}

function currentImg() {
for (i=0; i<imageTotal; i++) {
if (i == p) {
//image selected
imageHolder["imageBox"+i].enabled = false;
trace("sortDetail IF");
TweenLite.to(imageHolder["imageBox"+p].image, 0.5, {_alpha:100});
} else {
//image not selected
imageHolder["imageBox"+i].enabled = true;
}
}
}




Actionscript for creating the Buttons and whatnot:
ActionScript Code:
function createImages() {
for (i=0; i<imageTotal; i++) {
var img = this["image"+i] = new Object();
img.id = i;
img.path = xmlRoot.childNodes[i].attributes.path;
img.w = 0;
img.h = 0;
//
var t = this.imgNum.duplicateMovieClip("imgNum" + i, i);
t.toolImg = xmlRoot.childNodes[i].attributes.thumb;
t._x = this["imgNum" + (i-1)]._x + this["imgNum" + (i-1)]._width + 4;
t.num_txt.text = i+1;
t.onRollOver = over;
t.onRollOut = out;
t.onPress = released;
}
gotoAndStop("start");
}
//
infoBox.text = "Loading XML...";

function over(){
tooltip.imgTip.loadMovie(this.toolImg);
tooltip._x = this._x + 3;
tooltip._y = (this._y + this._height)-5;
tooltip._visible = true;
}

function out(){
tooltip._visible = false;
}

function released(){
TweenLite.to(imageHolder["imageBox"+p].image, 0.5, {_alpha:20});
disableImages();
trace("imgHOL = " + imageHolder["imageBox"+p]);
trace("RELEASED = " +this)
}




Thanks

Linking Buttons
ok well this is a little more technical then basic button linking.
i made these animated buttons that i want to link. Ive tryed multiple things but no luck. heres what i got. Im making a site in dreamweaver and im using buttons i made in flash for navigation and im displaying the content in an Iframe. the delema is that i cant seem to get them to link right. take a look at the button that is attatched and see if its possible. plz post any ideas.

Linking Buttons
i have made a button(you know make a symbol and it's behavior a button right?)

but now i can't let it link to my main website how do i link it

Linking Three Buttons
Hi I have a 3 page website. i have used the following code

home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.humper.pwp.blueyonder.co.uk/index.html") , "_self");
}

serv_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.humper.pwp.blueyonder.co.uk/services.html") , "_self");
}

contac_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);
function mouseDownHandler3(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.humper.pwp.blueyonder.co.uk/contact.html") , "_self");
}


mail_btn.addEventListener(MouseEvent.MOUSE_DOWN, contact);

function contact(event:MouseEvent):void
{
var contact_req:URLRequest = new
URLRequest("mailto:face@btinternet.com");
navigateToURL(contact_req, "_self");
}


the problem i have. is when i click on home and services it works ok, but as soon as i go back, they open up in another window, also the contact page does not work.


Many thanks in advance

HELP With Buttons Linking To Scenes
need help bad, thanks in advance peeps...

ok i have a menu with 3 buttons. buttons are labeled home, info, and links. i made a scene for each thing. so now i wanna program the button so 'on mouse event click' it will goto scene x. but when i bring up the actionscript window, i am unable to do anything for the button.

i uploaded the .fla, 160k. thanks.

http://frealfso.frostburg.edu/cs110L...m/follower.fla

Linking Buttons To Web Pages
Hello all...

I am trying to make a small web page using Flash 5. Since the .fla file size was getting a bit too big I tried to break it into 5 different files, one for each of the pages of that site (don´t know if that was the best way to go around the problem but...)

So know what happens is this: I have to link all the different pages I have, through some navigation buttons I´ve put in. What I thought I would have to do was something like... GET URL and then point out the location of the HTML file (created when you publish the .fla files) but somehow that doesn´t work when I test it on my computer. I always get some error message, like the location does not exist, or something... (maybe that is not the way this is done or maybe it is just me doing it wrong)

anyway... I was hoping someone would tell me if what I´m trying to do can be done (I think so but...) and what is the best way to so.

I hope that was clear enough...
and thank you!

Linking URLs With Buttons
I am trying to learn Flash 5.0, and here's a problem that I CAN NOT fix:
I made a flash movie that is suppose to play when you go to my website, and in this movie I have made buttons linking to my different pages within my site. I know how to have my button link to another page by using the Get URL action. But when I go to test my button out, it will load the website and play the movie (with the button with links) and then automatically goes to the page that is linked to the button. I want to be able to click the button and then go to the linking page.
Now I dont know what the on (release)does, but I tried to type it in and it won't work it says that there are errors, does this even have anything to do with my problem? Can someone please try and help if u understand this.

Thanks
Michelle

Copyright © 2005-08 www.BigResource.com, All rights reserved