/ Forside / Teknologi / Multimedie & design / Flash / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Flash
#NavnPoint
bentjuul 4251
molokyle 1978
Klaudi 1488
jhvp 1265
pallenoc 1160
katekismus 1020
Fnollerpi.. 790
slander 510
Flash77 500
10  Dr.Disco 500
Javascrip:popupwindow()?????
Fra : Kate Justin


Dato : 24-01-02 00:10

Can someone help a norwegian girl in trubble?????

I want to create a JavaScript pop-up window to be opened from a button in a
flash movie.

I have created a button, and given my button a get URL action and have added
the following to my button in the URL field;

Javascript:popupwindow( )

The following script have been pasted into the HTML between the Title and
the Head where my swf. file are linked;

<script LANGUAGE="JavaScript">
function popupwindow(){
window.open("www.sol.no.html","","height=425,width=550,menubar=0,resizable=0
,scrollbars=0, status=0,titlebar=0,toolbar=0,left=0,top=0")
}
</script>

My problems starts when I want to have several buttons in my swf.-file.
I want them to open different pop-up windows with different adresses.
How can I give the buttons in my swf.-file spesific script so they know
witch script they are related to?

Any help would be gratefully received

Kate Justin



 
 
Mikkel Schultz (24-01-2002)
Kommentar
Fra : Mikkel Schultz


Dato : 24-01-02 00:39

"Kate Justin" <kjustin@frisurf.no> skrev i en meddelelse
news:YoH38.906$pd5.20884@news2.ulv.nextra.no...
[snip]
> Any help would be gratefully received

You just have to send an URL as a parameter when you call the
javascriptfunction from your flash movie:

Javascript:popupwindow('http://www.whatever.com')

And then change the javascript in the HTML so that it will open the URL that
has been send from the flashmovie:

<script LANGUAGE="JavaScript">
function popupwindow(url){
window.open(url,"","height=425,width=550,menubar=0,resizable=0,scrollbars=0,
status=0,titlebar=0,toolbar=0,left=0,top=0");
}
</script>

In this way you can call your javascript with different URL's depending on
with button is clicked.
If you need different size etc. on you popup windows, it is also a
posibility send these as parameters from the flashmovie.

/Mikkel


>
> Kate Justin
>
>



Jesper Stevnhoved (24-01-2002)
Kommentar
Fra : Jesper Stevnhoved


Dato : 24-01-02 01:11

Mikkel er helt rigtigt på den

Med fgl. kan du eselv styre dine features (eks. størrelse) fra den enkelte
flashfilm :

1st ; hvor du selv sætter dine preferencer i Flashfilmen:

<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
</script>


this 2nd is to center your movie on the users screen:

<script language="JavaScript">
function PopWin(url,h,w) {
leftPos = Math.round((screen.availWidth-w)/2);
topPos = Math.round((screen.availHeight-h)/2);

window.open(url,'nyt','width='+w+',height='+h+',left='+leftPos+',top='+topPo
s+',toolbar=No,menubar=No,location=No,scrolling=NO,resizeable=NO');}
</script>

Hilsen Jesper

www.www.jspr.dk









"Kate Justin" <kjustin@frisurf.no> wrote in message
news:YoH38.906$pd5.20884@news2.ulv.nextra.no...
> Can someone help a norwegian girl in trubble?????
>
> I want to create a JavaScript pop-up window to be opened from a button in
a
> flash movie.
>
> I have created a button, and given my button a get URL action and have
added
> the following to my button in the URL field;
>
> Javascript:popupwindow( )
>
> The following script have been pasted into the HTML between the Title and
> the Head where my swf. file are linked;
>
> <script LANGUAGE="JavaScript">
> function popupwindow(){
>
window.open("www.sol.no.html","","height=425,width=550,menubar=0,resizable=0
> ,scrollbars=0, status=0,titlebar=0,toolbar=0,left=0,top=0")
> }
> </script>
>
> My problems starts when I want to have several buttons in my swf.-file.
> I want them to open different pop-up windows with different adresses.
> How can I give the buttons in my swf.-file spesific script so they know
> witch script they are related to?
>
> Any help would be gratefully received
>
> Kate Justin
>
>



Søg
Reklame
Statistik
Spørgsmål : 177554
Tips : 31968
Nyheder : 719565
Indlæg : 6408852
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste