i have a flash button and by pressing it i want it to link me to a specific place on an html page, not just the page but say link me to the text in the middle of the page, is that possible and how?
Printable View
i have a flash button and by pressing it i want it to link me to a specific place on an html page, not just the page but say link me to the text in the middle of the page, is that possible and how?
use a named anchor
some reasons that this may fail are at these links-
http://www.adobe.com/cfusion/knowled...fm?id=tn_15056
http://www.adobe.com/cfusion/knowled...63&mode=simple
http://www.adobe.com/cfusion/knowled...fm?id=tn_14339
thanx but i have no idea how this "named anchor" works
search the web, i'm sure there will be tutorials on how
to write named anchors in html pages
thisis more of an HTML question..than a flash question..
flash:
should work for you...Code:getURL("http://www.site.com/page.html#anchor");
(moved to html, CSS forums)
wow thanx but and how do i put the anchor name on the html page?
(why did I even move it?) ;)
http://www.w3schools.com/html/html_links.asp
http://www.htmlcodetutorial.com/linking/_A_NAME.html
http://www.utoronto.ca/webdocs/HTMLd...L/anchors.html
all good reads for you.. its very simple..
just like a LINK tag.. the NAME tage works the same
LINK:
<a href="http://www.somesite.com">text here</a>
NAME:
<a name="anchor1">text here</a>
your flash code:
on(press){
getURL("#anchor1");
}
or
on(press){
getURL("/somepage.html#anchor1");
}
Quote:
Originally Posted by whispers
1. if theres no text but only pics what do i do?
2. can i also disguise text painting it white (so its camouflaged withthe background) and just use the name tag?
1.) huh? put an image tag inside the <a> </a> anchor tags....
2.) you can..but why?
Is there a chance when testing all this locally on my pc might give me faults? Must i do all this testing by installing a webserver on my machine for testing locally or not?
whispers can u plz be more specific/detailed on the correct way of typing
as far as the path is concerned?Quote:
Originally Posted by whispers
how can I be more specific? You have given us absolutely ZERO information to go on. And we have still try to provide help. :)
You have not given us the code you have tried....nor even the page names or the named anchors you want to jump to.
on(press){
getURL("#anchor1");
}
is all you should need if you want to jump to an anchor in the same page the link is sitting in.
you of course need the HTML anchor in your page:
<a name="anchor1"></a>
when you click the FLASH button/link with the above code on it..it will jump to that named anchor in the page. If you need to also change the page and then jump to an anchor..
on(press){
getURL("newpage.html#anchor1");
}
if the new file in a different directory:
on(press){
getURL("directory/newpage.html#anchor1");
}
is what you would need.
sorry for not giving info, i wasnt asked, by my self im too new to know what is needed.
anyway my main question i guess is whether testing all this locally on my hd is ok or not. thats for starters.
as far as the path is concerned i ask cause u write me
on(press){
getURL("newpage/page.html#anchor1");
}
and im testing locally on my hd, so i guess i need a path to be submitted there, but in what way? is
on(press){
getURL("C:\newpage\page.html#anchor1");
}
correct or should i use diff path? (supposing my files are in here C:\newpage\page.htm
1.) testing locally shouldnt matter.
2.) you have 1 file.. the file with the FLASH HEADER embeded into it (right?) this HTML page with the FLASH embeded into it is in a folder... what is this folder?
Everything to do with this website should be in this folder...correct?
so lets recap.
you have a folder.. we'll call it MAIN folder.. inside this MAIN folder...
you have several things:
1.) your MAIN/INDEX html
2.) the .swf that goes along with the MAIN/INDEX html page cause its embeded into it
3.) you may your OTHER pages for the web site (ieL contact, about, gallery..etc) in here as well.. OR you may have each page in its OWN folder (for organization purposes if you desired).
all links/paths will be relative to the MAIN HTML page.. or the PAGE that is currently loaded..
couple questions:
1.) how is your website directory set up?
2.) what are the anchor names your trying to call?
3.) and in what pages are these anchors you are trying to jump located in?
are you trying to jump to a named anchor in the SAME page? like just further down the page?
or are you trying to LOAD A NEW page..and then jump to a named anchor on the newly loaded page?
about the "several things" u think i want to do i think u got them all :)
about your questions
1. im attaching it
2. also u will see them, they are not something specific, in the attached i think u can figure it out!
3. im trying to navigate from the index page (using flash buttons) to another html page, at a specific point to its middle
anyhow i think its clearer if u take a look at my draft.
so ive attached the draft of what im trying to do
plz note that on the flash buttons on my index page (indexToAnchor.html) only the last of the four is partially working. Use the first popout button thats the only set to work with the anchors bla bla.
now by clicking on that fourth/first popout btn i want to navigate to another html page (GoHere.html) to the "right here" text almost at the middle of the page!
I think this about covers it.
Many many thanx for taking your free time and helping me, im deeply obligated! :thumbsup:
p.s. anything u need to ******** plz dont try to find it yourself, ill help u so it get easyer and u dont get lost into my sites "labyrinthic" way of design (im a damn newby)
man.. your making it HARDER (more work) for me to help you.. :(
would be easier if you just posted the names..LOL
but I'll take a look. form your paragraphc.. it seems any button/link that you want to use for this jumping to an anchor point to page GoHere.html
should have the code of:
on(press){
getURL("GoHere.html#rightHere");
}
this assumes (of course) that in the GoHere.html page you put this:
<a name="rightHere"></a> in front of the RIght Here paragraph/position you want to jump to.
I just checked... and if you open the INDEX.html and embed the correct.swf into it.. it works fine. I didnt even change the GoHere.html at all...
just changed the flash code to be:
as stated above.Code:on (rollOver) {
pressed.gotoAndPlay(2);
}
on (release) {
getURL("GoHere.html#anchor1", "_self"); //_self was extra
}
i messed up my copy, can u send me the one that works for you plz?
anyone managed to get it working? whispers?
yeah it works.. "AND" I sent you the working files to your email address..
all you need to do is follow the steps provided for you her.. you have everything you need.
PLUS the working files in your email from yesterday.
Ok finally, i managed to get some webspace to check it out there. There seems to be no problem when the site is run on the web. Problems appear when i try yo test it locally on my hd. Can anyone explain to me why? And why only me, cuase whispers tested it locally and had no problems! Can it be some settings on my pc?
Either way i must say a LARGE thank you to everybody in this thread that did everything possible to help me, most of all whispers!