Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java/html with actionscript

Status
Not open for further replies.

netchen

Technical User
Apr 19, 2005
21
AU
hi!

i just finished a flash website and would like to be able to find the different sites in google. as it is done in one flash file i heard that it is possible to add javascript to the html file like:

<param name="gotolink" value="home"/>

and then with a certain code in flash directly be able to link to the specific part. so add to the value the various menuefunctions and underfunctions of the flash file. but then i didn't find out yet how it is possible to add that "gotolink" into the flash file itself. is it an if/else statement? and is it possible to give each value a more complicted path? because each unter menue within the flash file consists of various differenct movie clips and so on can i just add to each value the code like _root.allthedifferentpartsineed?

i am really stuck and it would be great if someone could help! thanks lots!

 
Just right a normal javascript in the page that contains the flash and then call the javascript from the flash button. Example:

Code:
<script language="javascript">
function getLocation(url){
    document.location.href = url;
}
</script>

Then you call that from your flash button:

Code:
on(release){
    getURL("javascript:getLocation('[URL unfurl="true"]http://www.google.com')");[/URL]
}

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
hi pixl8r!

thanks for your help. i think i understand what you were trying to explain but what i need is the other way round (if i understand it right!?):

the website i did consists of one flash file. it has probably 7 points in the navigation plus some sub menues. as the one flash file can be found in google with meta tags i wanted to find out if it is possible to add meta tags to google regarding the sub content of the site. lets say now if i find the page in google i come to the home menue. but if i look for another name i would like to specifically be able to link to that part of the flash site. so i would need to tell flash that if i come to a specific value in google it has to link to submenue two for example.

it's just that i got told that what i have to do is add the param name in javascript with the gotolink function to a specific value and then let flash understand if that specific value is called then it has to jump to this specific part of the application - not using any buttons.

thank you very, very much for your help - if you've got any further suggestions it would be great!
 
So you are trying to pass information into Flash as opposed to sending information out of flash... is that it?

Wow JT that almost looked like you knew what you were doing!
 
yep that's right. i am trying to send information out of flash and i am pretty clueless to be honest...

but i'll check that link for a start!

thanks!
 
sorry i meant i am trying to send information into flash...

I've had a look at that link and i still couldn't find the solution. do you know anything about the gotolink function that i can incorporate into my flash movie?
 
You can't call a function within Flash, but using the Flash methods (above link) you can either pass a variable and have an onEnterFrame checking function in the Flash movie, which would then execute the function (or whatever else...), or send the playhead to some frame where the function is called.
I'd use the first technique, if I really understand what you're trying to do.

Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
ok, i think i see what you mean.

so if i would use the getvariable method and call it for example home - how would i be able to call it in flash? do i have to call all the different functions in the first frame of the movie? or in the frame where the actual variable should be called in (as i said before the variable home in the frame where home can be seen and so on?)? and how would i do that?

sorry i am pretty new to flash and a little confused!

thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top