?
Solved

Special link / URL in Flash

Posted on 2004-08-25
10
Medium Priority
?
170 Views
Last Modified: 2010-04-03
Hi,

I have NO Flash knowledge at all, it's just that our developer doesn't know how to do this:

We want to have a link from a specific part in a Flash. Not a link like "http://www.microsoft.com", but this is what the link would look like in HTML:

<a href="https://site.domain.com/authentication/12345/login.html" onClick="window.open(“https://site.domain.com/authentication/12345/login.html”,'','status=yes,menubar=no,yes,resizable=yes,location=no,toolbar=yes,width=800,height=600');return false;" >This is tha link!</a>

I already learned through Google that a link in Flash looks like this:

on(release)
{
getURL("http://www.flash-here.com", "_blank");
}

I hope this is possible from Flash? Please let me know....
0
Comment
Question by:georgedb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 

Accepted Solution

by:
webas69 earned 200 total points
ID: 11894874
You can use javascript in the flash,
like this:

on(release)
{
getURL("javascript:void(window.open('https://site.domain.com/authentication/12345/login.html','','status=yes,menubar=no,yes,resizable=yes,location=no,toolbar=yes,width=800,height=600'))");
}

0
 
LVL 7

Assisted Solution

by:fixitben
fixitben earned 200 total points
ID: 11899399
I don't want any points

This is basically what webas69  said but It is another way to do it.  Create a function in the script part of the webpage.  like so

<script>
function newWin() {window.open('https://site.domain.com/authentication/12345/login.html', 'newWin', 'status=yes,toolbar=no,location=no,scrollbars=no,width=400,height=500,left=200,top=50,screenX=200,screenY=50');}
<script>

Then inside flash just call up the function

on(release)
{
getURL("javascript:newWin();")
}


I don't want any points I just wanted to point out another way to do the same thing.  Which is to create a pop-up from flash.

Also Don't try to Add this code to just the timeline have it added to a button.  If you don't most pop-up blockers will block it , but if it used on a button it should work fine with out being blocked.  But you probably arlready know this if that is the code you were using in html anyway.

Fixitben

0
 

Author Comment

by:georgedb
ID: 11900639
Hi,

Code works, except for one nasty thing: when you click on the link in the Flash, a new window opens with the page from the URL, great! However, ANOTHER _empty_ window opens. I have no idea why, cause there is only one "window.open" in the JavaSript and we don't use the extra parameter "_blank" ???

If you leave the windows open and click the link _again_ in the Flash, the window with content is refreshed, the other one remains and there isn't a third window added, so behavior seems a bit unpredictable...

The Flash isn't published on the website yet, so we click the link in the Flash design program. Might that be a reason? Any other solutions?

We choose webas69's solution, otherwise we have to change things in the Tridion component/template (=CMS); Fixitben, thanks for your comments!

This is the site where we use it: http://www.acnmobile.com/mobile/se_se/index.jsp and the link is in the Flash behind the word "här"...

Cheers,

George
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:fixitben
ID: 11908874
georgedb


That is cause it is calling on the function Javascript:void()  Which there is not a function inside the html that is void such as my function newWin() .  Since there is nothing there it does what is in the ( )  but also opens a new window for the function Void that it can't find.  So Try Mine and it should work all you have to do is add that little bit of code right below the title part of the html.  Then add the code for the on(release). It will call the function newWin() and that is it and I know it works.

Fixitben
0
 

Expert Comment

by:webas69
ID: 11909851
I put Vodi at the beginning because the window opens separately without it. But there's something I forgot to mention, if you use the function inside the standalone it will open the window every time, try it on an html  ( if you are using MX 2004 just hit F12 to do the preview in the browser)
0
 

Author Comment

by:georgedb
ID: 11910842
Hi,

We have a problem in using the Fixitben solution, as that means we have to change things in the component in Tridion, which we only want to do as a last resort.

I sent the following to the developer, this seems to work in HTML, though them you have to use a <A href="#" ...> with it:

on(release)
{
getURL("javascript:window.open('https://site.domain.com/authentication/12345/login.html','','status=yes,menubar=no,yes,resizable=yes,location=no,toolbar=yes,width=800,height=600')");
}

So, I removed the whole void thing as to my knowledge the window can be opened straight... I'll get back to you as soon as we have the results. If that doesn't work, I'm afraid we'll go for the solution with the function that Fixitben provided.

Any way, would it be fair to split the 100 points between the both of you?

Cheers,

George
0
 
LVL 7

Expert Comment

by:fixitben
ID: 11913406
I really don't care much about the points just helping people.  So What ever you want to do.  

Fixitben
0
 

Author Comment

by:georgedb
ID: 11913469
My last solution didn't work either. I'm afraid we'll go for the Fixitben solution:

<script>
function newWin() {window.open('https://site.domain.com/authentication/12345/login.html', 'newWin', 'status=yes,toolbar=no,location=no,scrollbars=no,width=400,height=500,left=200,top=50,screenX=200,screenY=50');}
<script>

Then inside flash just call up the function

on(release)
{
getURL("javascript:newWin();")
}


and I hope that works without any problem...

Cheers,

George
0
 
LVL 7

Expert Comment

by:fixitben
ID: 11913855
Hey I just noticed something you need this /  before the bottom <script>  so it will look like this </script>

<script>
function newWin() {window.open('https://site.domain.com/authentication/12345/login.html', 'newWin', 'status=yes,toolbar=no,location=no,scrollbars=no,width=400,height=500,left=200,top=50,screenX=200,screenY=50');}
</script>

Sorry I didn't realize this.

fixitben
0
 

Author Comment

by:georgedb
ID: 11914515
No prob. I'd seen that, just normal HTML syntaxis, thanks
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question