Flash HTML Help

  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

I have been trying to create a popup window in flash that will open an html popup window. I have been on http://www.kirupa.com and i tried the tutorial. I downloaded the source code and I am having alot of troubles. I cant even get the source code to load. It opens a browser window just fine but the page doesnt load. It just gives me an error "object expected".

When i click on my .swf file, it opens up a flash window. I click on the button and it opens the empty html window with the error.

If i insert that .swf into an html file it works fine, or if i open the .html file and click the button it opens fine as well.

My whole website if flash and i need a button that work as a .swf file. Please help me out if you can. Im a total newb so im not big on action script but heres my codes im using

flash button:
Code: [ Select ]
on (release) {
    getURL("javascript:openNewWindow('http://www.macromedia.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ");
}
  1. on (release) {
  2.     getURL("javascript:openNewWindow('http://www.macromedia.com','thewin','height=400,width=400,toolbar=no,scrollbars=yes') ");
  3. }


html code:
Code: [ Select ]
<script language="JavaScript">
function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}
</script>
  1. <script language="JavaScript">
  2. function openNewWindow(URLtoOpen, windowName, windowFeatures) {
  3. newWindow=window.open(URLtoOpen, windowName, windowFeatures);
  4. }
  5. </script>


thats between the head tags. Please help as i cant get the html popup to comeup with the .swf only the html. thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

moved to flash - and I assume you posted this on
http://www.kirupaforum.com for help?

the problem is, you can't load an html window from an swf file using this
method. the script code has to be in the head tags of an html window,
just as you experienced.

also, please use code tags when posting. Thanks.
  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

Sorry about the improper format. I should have read the instructions.

So i cant trigger and html window through this method? If not do you have any ideas how to open a sizeable popup. It doesnt really have to be html i guess but like I said, I am using an all flash website and i need to be able to trigger a popup window that is sizeable. thanks again for the help.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

there really isn't anything you can do. I would embed the main movie in a html file anyway,
regardless of it being all flash, then you can use this method on unlimited buttons from flash.

there is a big misconception about having an all flash site and not embedding in html anyway.
you really should as even practice.
  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

Thanks for the tip. I think I will change it to html. I would imagine it is a straightforward process right. How about performance issues? Will the animation run any slower since its added to html or not? I would think that it would slow it down a little bit but I have no idea.

So when I publish my swf files in Flash, I have it create html as well and then those files are the ones I can edit to create the desired popups? Thanks again.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

you popups are seperate pages, yes. and you just adjust the params in the flash button
to the size you need to show the content the way you want.

there is nothing to suggest in any way that embedding a flash file into html slows it
down. as a matter of fact, i have never heard anyone ever be concerned with that at
all. so i don't think you have an issue there.
  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

I think it starting to make sense. So the pages I upload to the server are just the html files that Flash creates right?
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

if you use the publish feature with flash, it will embed your flash movie to it's created
size automatically. and all you have to do is edit and upload the html file seperately to
add the popup script. any page that you pop up is its own file of course, which is what i
was saying in the last post.

truthfully, i would mentally start over, and go through the tutorial again with the
mindset that you will be using html files.
  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

I got it. Thanks for the help. Much appreciated.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

good to hear, glad to help :D
  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

Ok one more wuick question....how do I change the title on the popup window? It keep opening to "New Page 1" on the titlebar at the top of the popupwindow. Thanks.
  • DJ Overpour
  • Newbie
  • Newbie
  • DJ Overpour
  • Posts: 11

Post 3+ Months Ago

Can anyone help? I have been trying to figure this out and am having no luck. Thanks in advance
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

DJ Overpour wrote:
Ok one more wuick question....how do I change the title on the popup window? It keep opening to "New Page 1" on the titlebar at the top of the popupwindow. Thanks.


Whatever is in between the title tags of the page being loaded into the popup is going to be used for the title, open the page being loaded into the popup in notepad and look for theese lines.
Code: [ Select ]
<head>
  <title>New Page 1</title>
..........
</head>
  1. <head>
  2.   <title>New Page 1</title>
  3. ..........
  4. </head>
  • turgay
  • Born
  • Born
  • turgay
  • Posts: 1

Post 3+ Months Ago

hi,
i had just the same problem and found the solution in "http://www.kirupa.com/developer/flash5/borderless.htm" as you say. at first i could not work as you. but i realized that i have forgotten to download http://www.kirupa.com/developer/flash5/ ... meless.zip js file. if you move that file to the same directory with the flash it works, i tried.

note : it is shown as fullscreen. if you want to see the window in the size you specify you must change thah line in "chromeless.js"

line 65 : var CWIN=window.open("",n,"fullscreen=1"+s)
if you make "fullscreen=0" it is not fullscreen anymore.

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.