Using SWF Buttons To Link Dynamic Pages Using JavaScript (BeanShell) In HTT
Hello all,
This is a real newbie-esque question, but I'm hoping someone will help. Here's the problem.
I've been working with a customizable photo gallery generator that generates pages based on HTML templates and BeanShell scripting. For my page naviagation buttons, I want to use Flash animations instead of rollover GIFs.
So I have to embed the code for the SWFs, then call them as a variable where I want them to be executed. This works fine, and the SWF files display properly.
But what I can't get it is the link to work. I can't specify URLs in the SWFs, because the links are dynamic (used for moving through several index pages of images, for example), and placing a <A HREF...> tag before the SWF's <OBJECT> tag doesn't work. As it stands, my buttons are ultra basic -- 2 image states with basic shapes, nothing else.
How can I get my buttons to be dynamic links?
Thanks for your help.
Elektrik
FlashKit > Flash Help > Flash Newbies
Posted on: 06-11-2003, 01:50 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Buttons Won't Link To Pages
I put in the code that was required to link my buttons to the rest of my pages. All instances match and for some reason I keep getting an error
Access of Undefined Property about_btn
Access of Undefined Property home_btn
Access of Undefined Property post_btn
Access of Undefined Property images_btn
Here is my AS3 code.
stop();
var home_req:URLRequest = new URLRequest("HummerComm.swf");
var about_req:URLRequest = new URLRequest("about.swf");
var contact_req:URLRequest = new URLRequest("mailto:hpercevault@hotmail.com");
var post_req:URLRequest = new URLRequest("post.swf");
var images_req:URLRequest = new URLRequest("images.swf");
function home(event:MouseEvent):void
{
navigateToURL (home_req, "_self");
}
function about(event:MouseEvent):void
{
navigateToURL (about_req, "_self");
}
function contact(event:MouseEvent):void
{
navigateToURL (contact_req, "_blank");
}
function post(event:MouseEvent):void
{
navigateToURL (post_req, "_self");
}
function images(event:MouseEvent):void
{
navigateToURL (images_req, "_self");
}
home_btn.addEventListener(MouseEvent.CLICK, home);
about_btn.addEventListener(MouseEvent.CLICK, about);
contact_btn.addEventListener(MouseEvent.CLICK, contact);
post_btn.addEventListener(MouseEvent.CLICK, post);
images_btn.addEventListener(MouseEvent.CLICK, images);
Buttons Within Swf To Link To New Html Pages
i have a swf file that's going to be placed inside of a html page. what i'm having trouble doing is making my button instanses link to different pages withing the same html website and in the same browser.
i've tried this:
"INSTANCE NAME".onRelease = function () {
getURL("http://www.WEBSITE.com", "_blank");
};
But it doesn't work at all. the images that i made into button instances still read as buttons when i preview in flashplayer (the cursor turns into the pointing finger), but there's no action.
can anyone help? i know nothing about action scriping or anything complex, just the basics.
thanx!
Buttons Do Not Work - To Link To Internal Pages
This is the text of error message I got when testing :
**Error** Scene=Scene 1, layer=Layer 8, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {
Total ActionScript Errors: 1 Reported Errors: 1
The button properties show :
on (release) {
getURL("http://www.texase-commerce.com/construction.html", "_self");
}
Can anyone help me make the button release take the user to the specified page ?
Thanks
JohnnyMo
Buttons Do Not Work - To Link To Internal Pages
This is the text of error message I got when testing :
**Error** Scene=Scene 1, layer=Layer 8, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {
Total ActionScript Errors: 1 Reported Errors: 1
The button properties show :
on (release) {
getURL("http://www.texase-commerce.com/construction.html", "_self");
}
Can anyone help me make the button release take the user to the specified page ?
Thanks
JohnnyMo
Flash Interface - Buttons Link To Html Pages
I'm a newbie wondering if I can use a flash interface/menu to link to traditional html pages.
Ultimately, I would love to use an interface like this to link to standard CSS html pages:
http://www.flashkit.com/movies/Inter...8599/index.php
can flash buttons link to standard html pages?
how?
I'm sure this is sooo easy...thanks all.
jgehawk100
--at some point, everyone was new at everything
Buttons In Flash Movie Used To Link Dreamweaver Pages
Hi guys, I'm new to this forum and I must say, this is a brilliant website. I've picked up things I never knew before in Flash.
But there's one thing I need a lot of help with. I don't know if this question has been asked before, I've searched the previous threads but I couldn't find anything relevant to my problem.
I've made a Flash movie. This movie has four buttons named home, portfolio... etc. Pretty standard button names.
Now I've made four pages in Dreamweaver. They're titled home.html, portfolio.html.... respectively.
Now I've put the Flash movie into all four pages. What I want/need to know is how do I link those four buttons in my Flash movie to their respective html pages?
An example of what I'm trying to do can be seen here: http://www.utoronto.ca/csa/ufa/home.html
See how each Flash button in that whole Flash movie links to a different .html page?
Any help at all would be greatly appreciated.
Thanks!
How Do You Setup Text Buttons To Open Pages Within The Same Page - Link Inside
Everytime you click on a link on the mainpage it opens a page smoothly on the same page (I'm trying to stay away from opening a ton of pages to display the info, I like the fact that all the info is displayed on the same page at the click of a button). It's like everytime you click on a link, it overrides the last page that was displayed and shows the new page. Here is the link http://www.fantasyinterfaces.com[/url]
Thanks in advance (I'm using Flash 5)
How Do I Link Swf Pages To Other Swf Pages
I just designed my first complete website using only Swish. However the site is over 5meg and takes forever to load. I realize that i have to design only one scene in a movie for the main page and then have it link to another single scene movie. I'm not sure how to do it. any help will be appreciated.
Thanks
Dave
How To Link .fla Pages Together
I created three seperate flash pages but can't seem to link them together.
I tried gotoandplay "page1.fla"
and when i click on the button the link doesn't work. So how do i link
seperate flash pages, (not scenes but pages)?
Nav: Best Way To Link Pages
I read multiple ways to setup navigation on a flash site such as scenes and
actionscript. What is the best way to do this? I am working on my first site
and am almost done with the hompage. If you can point me to some sort of
tutorial, that would be great. Thanks
How Can I Link The Pages Together?
ok, I'm VERY new to flash and so please forgive me for my stupid-ness.
I have to make a presentation for my I.T. project and would like to do it in flash, and what I want on the page is a navigation bar on the side, then when I click on the button, the content on the right changes. And if possible, a little box appear when the mouse pointer is on top of something, explaining what that object is about.
Please keep things simple as I'm a complete n00b and have NO knowledge of flash
thank you very muchie
How To Link Pages
sorry - new to this - if you have a 3-page website how do I link the pages together?
Thanks for all your help!!!
How Can I Link The Pages Together?
ok, I'm VERY new to flash and so please forgive me for my stupid-ness.
I have to make a presentation for my I.T. project and would like to do it in flash, and what I want on the page is a navigation bar on the side, then when I click on the button, the content on the right changes. And if possible, a little box appear when the mouse pointer is on top of something, explaining what that object is about.
Please keep things simple as I'm a complete n00b and have NO knowledge of flash
thank you very muchie
Can I Link To Other Pages Of My Site?
When my movie ends it lists all the types of products that the company sells. I want each item listed to be a link to the manufacturers site. Do I use buttons? How do I proceed? Signed...Very much a beginner!
How To Link Pages, Or Frames?
Hey, Im currently working on a project, and i have all the pages,
but i have to figure out how to link the pages, can anyone help me out with the problem i am having...it would help alot, thanks..
-adrego
Get Url To Link To Pages In Dreamweaver
hi
can anyone help? i have built a website in dreamweaver that uses a flash.swf movie as its main content on the index page..i have a button in this movie that i want to link to another html page in dreamweaver;
example...i have two html pages within dreamweaver
one is the 'index.html' containing the main flash content
the other is called 'game.html'containing another flash.swf movie
on my button within the index flash movie i have this action script
//
on (release) {
getURL("http://www.domain.com/game");
}
//have i missed something out?my website works fine but i cant get to the game.html page via this action on the button within the flash movie...
many thanks in advance for any help
Adding Pages And Link Them
I bought template, and want to add pages to the Porfolio section. EX: Porfolio 2, Portfolio 3... each Portfolio section will contain 9 pictures. Can you please let me know the step by step procedure for doing that and how to link the number pages to the right flash file. This is a dynamic template.
Here's the link to download the fla file:
http://www.tabithalemaire.com/flash/xxx_portfolio.fla
Thank for your help on that !!
Link To External Pages
I have created a navigation for a site that is done in flash. i want to know how i can make it so that when you click on one of the buttons in flash, the page will reappear without reloading the flash. i have set the html page up so that it has two frames. if anyone can tell me how to set up the link to make it load in the other html frame, that would be great. if you don't understand fully what i am talking about, this site shows what i want to do http://www.sensesfail.com/site/.
thanks,
nick
HOw To Link Pages With A Flash Naz?
Hello i dont know how to link pages on my site using flash. I need them to link to an iFrame. <a href="homeiframe.htm" target="#iframe"></a> , thanks for your help.
-Ryan
Link Flash Pages
Hello
I'm creating my web site in flash but i have a small problem.
I have created to flash files
HOME - page1.swf
POETRY - page2.swf
I read the tutorial on "Creating a Full Flash Site" and i inserted the link but it doesn't seem to work.. When i click on the button nothing happens..
what should i do?
Thanks
Link Pages In Flash MX
Help! I'm new to Flash and I got Flash MX... trying to create websites and I can't get buttons to link to another page I've created. I need a button to go to a page in the website not outside of the website and I can't get it to work. It would be similar to "hyperlinking" to pages in Frontpage but I don't want to go to another website but stay within the same one.
HELP!!! Anyone???? Anyone at all????
Link To Diffrent Pages
Hi,
Is this possible?
1. Go from frame A-B, when I click a button. < thats possible
but...
2. After going from A-B, go to ex. Scene 4. depending on which scene the user are at. < hmm thats the tricky part..
Hmm lets say this:
Ex:
1.The user are at the first scen (Scene 1) the scen goes from frame 1 to 30 than stop.
2.The user clicks on Scene 5, for example..
The Scene goes from 30-40 at Scene 1, and then goes to scene 5.
I hope you fallow me...
Thanks in advance
Henric
How Can I Link Button's With Frames Pages
I'v been having recent troubles with flash button's i made a flash toolbar for my site and i cant seem to get the action script right to work with my frames page when you click on the button it goes to the link but not at the bottom page ware it is suppose to in frames pages. Please help me.
Open Up 2 Pages From One Link In HTML
I am using Dreamweaver
This is what I would like to accomplish...
1st page on site has a link/button
When link/button is selected, the same page loads a thank you page, While a second page loads on top containing the flash file.
After a user closes the page that contains the flash content he/she will see the thank you page.
How do I asign two functions to one link in HTML??
Thank you for your time an expertise!
Problem With Flash Link Html Pages
Hi,
Need help on button to link my html pages.
I got a html website that's need to use 3 Frame, topFrame, leftFrame and mainFrame. My button I created in flash, and paste into leftFrame, Now What I need to do is Onrelease goto link 123.html and this change only to the mainFrame, topFrame and leftFrame will remain. anyone?Thanks
Making Flash Link To Various HTML Pages
I'd like to make my Flash file link to a series of HTML pages in a presentation-type thing. However, I can't just use the getURL action because I want to just use one .swf file rather than a separate file with unique URLs for each page. Is there a way to tell Flash to link to the "next" and "previous" pages in a series of pages? Here's the Flash navigation file:
http://home.earthlink.net/~dmiller76...tour2_nav.html
Thanks for any help.
Unable To Link Flash To Asp Pages From Other Domains
Hi there,
I have this interesting problem here. I am trying to load my flash file and ASP file on 2 different domains. (sub-domain to be exact). But the link (geturl) does not seems to work at all...
Ok, here is the scenario:
I have 2 servers.
1) www.abc.com (Web server for hosting my web files + SWF files)
2) app.abc.com (App server for hosting scripts files + ASP files)
In my SWF file, i have codes like
Code:
geturl("http://app.abc.com/abc.asp", "_self")
In my App Server, I have the default.asp page which loads the Flash file located in the Web Server.
Code:
<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0
height=xxx width=xxx classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
<PARAM NAME="movie" VALUE="http://www.abc.com/flash.swf">
<PARAM NAME="quality" VALUE="high">
<embed src="http://www.abc.com/flash.swf" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="xxx" height="xxx">
</embed>
</OBJECT>
So when I tested accessing my flash file directly from the web server (http://www.abc.com/flash.swf), I am able to click on the button to go to http://app.abc.com/abc.asp.
But when I access the flash file from the ASP file by going to (http://app.abc.com/default.asp), i am able to see the flash.swf being loaded. But clicking on the button does nothing.
I then came across the crossdomain.xml thingy.
Added this file to my app.abc.com root directory.
Code:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/c...ain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
But still to no avail...
But the most wierd thing is.... about 1% of the client IE can work! (actually only 2 PCs. out of all the other PCs that we tested with...)
Anyone have any clue on what could be the problem?
How Link RSS Feeds To Pages In An All-Flash Site?
I have built a site entirely of Flash. The header and drop down menus are in the index.html/.swf "shell" and everything else is loaded in as .swfs in the area below.
I'm just getting my feet wet in RSS Feeds and can get them to work in my traditional, html-based sites. But I am having trouble envisioning how they would work in my all-Flash site.
If I change a .swf page and want subscribers to check out this update, how do I link so that both the new version of the page *and* the index.html/.swf "shell" both appear? (Workarounds totally bypassing direct solution would be OK, if necessary!)
I tried googling the 'net for a tutorial but kept getting hits on how to make RSS *readers* in Flash.
If you know of a tutorial or a page of tips and tricks, that would be great!
Thanks.
Link Problem Flash Button - Html Pages
FlashMX Links Problem...
--------------------------------------------------------------------------------
--Well, well, I waited now for a few weeks and no life here at all it seems! My question is simple, I have buttons (alphabet, 26 in fact) that I find no way to link to html pages using any way that I do with any other form to link to pages from the flash piece - doesn't bring any result and I just don't find out. Is there really no one who can give any hint? Down below is the piece even uploaded to view - it's the alphabet that I cannot link to html pages!!!!!!!!!!!!!!!!!!!!!
Hi There you good helpful people out there! I do have some nice piece of flash for website navigation, there are two problems: While there is no problem to link pages to the main buttons, there are others I just cannot figure out what to do to link. Additionally there is a problem with one button beyond description, I mean error that I cannot figure out. I attach the piece - not complete, but that is fine - only mind the link "Musik & Show" by mouse over you would see the problem. All letters of the "Beta Suche" I just cannot figure out, how to link the pages to each letter... I don't know whether I can attach the orig. file since it does have nearly 2MB size... Please let me know here what could be done and thank you indeed! I owe you one. Best wishes - harton! zaungast@tele2.at in case you require to ask back. Thanks and nice weekend you all
The upload is a bit helpless I suppose since limited to 300kb, how do you manage to have any flashfile that small. Anyone of you please help and I would mail you the original file - also cannot upload the finished piece even though only 100kb... Harton
swf is even a invalid file? How is that, that is flash, now I really don't understand anymore - that is the output file of FlashMX... Any hint anyone?
Okay, this doesnt work here... I uploaded it all at
http://members.aon.at/netzkartei/fehler.html
--------------------------------------------------------------------------------
Last edited by harton5 : Today at 09:22 PM. Reason: No one answers...
[F8] Adding Link To Button: Mailto And Html Pages
HI!
I'm just trying to add a link to a series of animated Flash button thumbnails embedded into a html page. I select the button object on the stage to apply the GetUrl action - but whatever I come up with, I'm getting errors. I want the buttons onRelease to go to either a mailto window or another html page.
Can anyone help me?
L
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!
Buttons And Frames Pages
oh my... apearently I have been out of Flash scripting for way to long..
Makin a web page. 2 frames top frame will be flash bottum will be html. well the top frame will be a menu and banner. Now this menu on the top frame needs to control the lower frame. How will I go about making a flash button to change the page in the frame below??
Help - Buttons Linking To Pages
I am a (casual) Flash MX user who is constructing his site in Macromedia Dreamweaver with Flash components. I have made the navigation bar in Flash and would like to know how to make buttons link to pages on the site. I would really appreciate it.
Thanks!
-Sb
Buttons Within Pages Not Working
hello, im working on this site and my buttons along the sidebar work, they all look like this
Code:
order.onPress = function() {
content.gotoAndStop("order")
}
my buttons IN the content pages, however, do not work. they have the same code as the above, and should function to change the "content" frame as well. ALL the codes, however, are on the same actionscript sheet, which is for the "script" layer above my "content" layer. can anybody help me?
i've tried moving the codes for the buttons In the content page to an actionscript sheet on the button itself, or on the "content" frame that the button is on, but that still doesn't work. help?
Flash Buttons To Html Pages
Hi People!
Is it possible to have a flash button that is inside a movie created with flash that link's to a HTML page when clicked ?
Thank you so much!
J
Help With Flash Website, Buttons And Pages
hello, i followed a tutorial online here and i did so very closely, making sure to double check everything in the end, but i ended up with a site whose buttons do not work and the pages, instead of behaving like pages, play one after another like a movie clip.
i had copied the script from the tutorial:
Code:
order.onRelease = function() {
content.gotoAndStop("order")
}
1120: Access of undefined property order.
order.onRelease = function() {
i hope somebody can help me with this, it's my first time working with flash. thanks a lot!
Invisible Next/Prev Buttons On 1st And Last Pages
I have pages of info I'm pulling from external txt files. I want my btn_prev to not be visible when the last page loads and my btn_next to not be visible when the first page loads. The btns are actually moviclips with instance names btn_next and btn_prev Here is my code:
//Stage Scale
Stage.scaleMode = "exactFit";
width_txt.text = Stage.width;
height_txt.text = Stage.height;
// End Stage Scale
//Stage Resize Listener
var resizeListener:Object = new Object();
resizeListener.onResize = function()
{
width_txt.text = Stage.width;
height_txt.text = Stage.height;
}
Stage.addListener(resizeListener);
// End Stage Resize Listener
// Default Page Number Variable
var currrentPage:Number = 0;
// Movie Clip Variable
var myMCL:MovieClipLoader = new MovieClipLoader();
// Total Pages Var and Load
var myPageTotal:LoadVars = new LoadVars();
myPageTotal.load("pages/pageTotal.txt");
//Pages Var
var infoPageTotal:LoadVars = new LoadVars();
// Page Counter Function
function pageCounter():Void
{
txt_pageNumber.text = (currrentPage + 1) + " / " + Number(myPageTotal.totalPages);
}
myPageTotal.onLoad = function(p_success:Boolean):Void
{
if(p_success)
{
pageCounter();
}
else
{
txt_pageNumber.text = "Error loading file.";
}
}
// End Page Counter Function
// Next Page Function
function nextPage(){
infoPageTotal.load("pages/page" + currrentPage + ".txt");
infoPageTotal.onLoad = function(p_success:Boolean):Void
{
if(p_success)
{
txt_page.htmlText = infoPageTotal.info;
}
else
{
txt_page.text = "Error loading file.";
}
}
}
nextPage();
// End Next Page Function
// Next Button Actions
btn_next.onRelease = function():Void
{
if(currrentPage < Number(myPageTotal.totalPages) - 1)
{
currrentPage ++;
gotoAndPlay(2);
}
else
{
currrentPage = 0;
}
nextPage();
pageCounter();
}
// End Next Button Actions
// Previous Button Actions
btn_prev.onRelease = function():Void
{
if(currrentPage == 0)
{
currrentPage = Number(myPageTotal.totalPages) - 1;
}
else
{
currrentPage --;
gotoAndPlay(6);
}
nextPage();
pageCounter();
}
// End Previous Button Actions
stop();
Thank you in advance for any advice and suggestions.
Template Pages With Flash Buttons
Ok I will start by giving a warning of my noob-ness.
I am trting to make a templae with dreamweaver which contains flash buttons as the menu. On the link option of each my home flash button, i place a link like this;
www.mywebsite.com. once I test it, the link shows up like this:
http://www.mywebsite.com/www.mywebsite.com
therefore, it can't be found.
What am I doing worng?
Distress noob
Adding Rollover Buttons To Web Pages
what is the syntax for adding a rollover button as an image button in an .aspx page? I have saved the button as a .swf file and put it as the ImageUrl, but since it isn't an image, do I need to save it as an image in flash rather than a button?
Cheers,
Mike
Can Dynamic Text Have An Embedded Link? Or HTTP Link?
I'm using the Flash scroll bar componet, which uses dynamic text, and I want to link part of my dynamic text to a specific frame in my moive. - Is it possible?
- I've tried and it doesn't allow the 'Go TO' funcion.
so,
I created another HTML page and SWF to display the specific SWF screen that I want to show up - now I'm trying to link my dynamic text to '_self' so that when the link is clicked it will look like it is in the same site.
When I use the dynamic text and create the link, it appears to be ok/workable in the Properites panel, but when published, it doesn't work.
Flash Buttons And Frames On Separate Pages
I have a site that has one window with a flash movie in it. I was wondering if it was possible to set the buttons to go to a frameset and have each button load a different frame. Any insite on this would be most helpfull.
Newbie Help..linking Buttons To Html Pages
Hi
im new to flash but its a nice program as it is very powerful as ive noticed so far, but it really aint made for the simple user in mind, but anyways, im making a online portfolio to show my art works and for the navigation menu i have made it 4 buttons which are grouped in a movie which keeps scrolling across the screen giving looping effect, well intially i wanted it to stop when mouse rolls over it but gave up on that as there is nothing i could find on the net to help me, they only got the menu where its scrolling speed is controlled by your mouse.
Well all i want to know is how do i link these buttons to the desired html page, i know its on release geturl bla bla, i know the action script but i want to know where do i put it, cause on the scene the buttons are grouped in the movie giving scrolling effect, yeah yeah im no good at explaining so ill give u a link to my page to show you what i mean
http://stoelting.d2.net.au/Untitled-1.htm
<-- hehe love this smilie, more boards should have it
Thanx for ur time guys, later
Top-nav: Keeping Buttons Highlighted When Changing Pages
Hi,
I've created a TopNav file that will serve as the primary navigation for a site. The thing is, if I send the on-release of a button to a "contact.html" page, when that page reloads it'd be great if the contact button was still highlighted or in it's "over" state after the cached flash navigation file reloads.
What do you think? Is there a step-by-step way to do this? Any help would be greatly appreciated. Best,
= F
Linking Flash Buttons To HTML Pages
I just built a site using dreamweaver. On the opening page, I have a flash file that contains buttons... how do i link the buttons in my flash file to my HTML pages... so that when I click the buttons in the flash file, the html pages open up?
-thanks
Linking Flash Buttons To Different Pages In A Website
Hello,
I've created Flash buttons with sound in the down state. When I transport them to Dreamweaver I can't seem to link them to different pages in my site when I click on them. Does anybody know how to link them in Dreamweaver?
60vette
|