TinyPortal

Development => Block Codes => Topic started by: Tron420 on December 05, 2006, 07:24:29 AM

Title: flash pop up window from block
Post by: Tron420 on December 05, 2006, 07:24:29 AM
hi
i have a delima. im trying to make a script to put in a side block that allows this...
an image in the block is clicked and a window showing a .swf opens. but not a normal browser window. i need the window to be "clean". meaning no browser bars or toolbars at all. JUST the flash. it needs to be 488 height and 399 width. thats the exact dimensions of the flash. i can make it open a regular new window but it has all the browser buttons and stuff. but i want the window to look as though its not a browser page. i have the clickable image named tattoos.gif .
i need to put it in a block so when someone clicks it, a new windows pops up in the middle of the screen with the flash in it . but NO VISIBLE BROWSER SIGNS. just a clean window.
i am sorry if this is a dumb question but imma noob at html.

thx
Title: Re: flash pop up window from block
Post by: tarik004 on December 05, 2006, 09:14:54 AM
hi tron



A Pop Up window within flash (http://www.actionscript.org/resources/articles/22/1/Pop-Up-window-within-flash/Page1.html)
Title: Re: flash pop up window from block
Post by: knat on December 05, 2006, 09:59:32 AM
This is usefull for pop up creation = http://www.dynamicdrive.com/dynamicindex8/popwin.htm
Title: Re: flash pop up window from block
Post by: Tron420 on December 05, 2006, 02:40:08 PM
i tried that but it just doesnt work for me at all. it just opens a new normal page. and its not even a seperate window,

http://www.dynamicdrive.com/dynamicindex8/popwin.htm

what am i doing wrong  ?
Title: Re: flash pop up window from block
Post by: gerrymo on December 05, 2006, 02:46:18 PM
Use the code below, just change the URL, text for the text link, and the size attributes to suit. Put it in a scriptbox.


<html>
<head>
<script language="javascript" type="text/javascript">
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>
</head>
<body>
<a href="http://www.google.com" onclick="NewWindow(this.href,'mywin','300','300','no','center');return false" onfocus="this.blur()">YourLinkText</a>
</body>
</html>
Title: Re: flash pop up window from block
Post by: Tron420 on December 05, 2006, 02:50:27 PM
heres what im trying to do in detail.

i want to place this image  - " http://hittemupgaming.com/tattoos1.gif "
and place it in a block .
if someone clicks it a "pop up" window comes up in the center of the screen with this .swf in it - http://www.hittemupgaming.com/tupachqtattoos1.swf



but i need the window to be like this -

No Toolbars or anything . just a clean window w/ no addrees bars or tool bars.
window needs to be 488 ( height ) x 399 ( width )

what in thew world am i doing wrong?

hers the only way i can get it done but its not the way i want it ,

click here -  http://hittemupgaming.com/smf/index.php to see what i mean ( click "2pacs tattoos block on the right)






see how its just a regular browser window? i want to fix the size and remove the toolbars.
can some one help me with this please?



Title: Re: flash pop up window from block
Post by: gerrymo on December 05, 2006, 04:07:48 PM
In a scriptbox:

<html>
<head>
<script language="javascript" type="text/javascript">
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>
</head>
<body>
<a href="http://www.hittemupgaming.com/tupachqtattoos1.swf" onclick="NewWindow(this.href,'mywin','488','399','no','center');return false" onfocus="this.blur()"><img src="http://hittemupgaming.com/tattoos1.gif"></a>
</body>
</html>
Title: Re: flash pop up window from block
Post by: Tron420 on December 05, 2006, 04:17:04 PM
thx very much .
i really appreciate it
Title: Re: flash pop up window from block
Post by: akulion on December 05, 2006, 09:54:14 PM
a popup window will be generated using the code below but will have the Status bar and the Titlebar only.


<a href="http://yoursite.com/file.swf" onclick="window.open('http://yoursite.com/file.swf','flash','height=488,width=399'); return false;">


hope that helps

u can see a demo of this on my site with the media player on the side (http://path-to-peace.com/forum)

Title: Re: flash pop up window from block
Post by: funxlab on January 25, 2007, 06:25:05 PM
Aku !

I created a Block for flash email to admin (me) but it doesn't open in a popup window as in the demo you gave but it opens in a new window (if I click back button on IE toolbar it takes me back to homepage)

Here is the code I have in my block

<script language="javascript" type="text/javascript">
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=yes,toolbar=yes,resizable=yes';
win=window.open(mypage,myname,settings);}
// -->
</script>
</head>
<body>
<a href="http://casestudents.net/feedback/feedback.html" onclick="window.open(this.href,'CASE Students Forum:: Feedback','300','300','yes','center');return false" onfocus="this.blur()">Give your feedback/contact for website updates here</a>

Please help me in this,
Regards,
Jim
Title: Re: flash pop up window from block
Post by: akulion on January 25, 2007, 06:30:34 PM
jim u dont need to include all that

that flash form is really old

infact ill be posting a new one later on this week

but to make the one i posted work just call the form like this (put the link in a script block) on the side or wherever u want it:

<a href="http://casestudents.net/feedback/feedback.html" onclick="window.open('http://casestudents.net/feedback/feedback.html','flash','height=488,width=399'); return false;">

please set the height=488,width=399
to suit ur needs
aku