Embedding SWF in HTML

  • cosmic_billion
  • Newbie
  • Newbie
  • User avatar
  • Joined: Nov 05, 2009
  • Posts: 14
  • Loc: Amsterdam, the Netherlands
  • Status: Offline

Post November 5th, 2009, 12:54 pm

Hello,

Can somebody help me, please? This is an HTML/CSS based question by the cause that my flash file works fine.

However when I embedded the flash component into HTML and select a button in the flash component that loads an external swf, it doesn't pick up the external swf file...this is my problem

The external swf loads smoothly when I run it in flash player.

Regards
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 5th, 2009, 12:54 pm

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 23404
  • Loc: Woodbridge VA
  • Status: Offline

Post November 5th, 2009, 1:03 pm

It's most likely a path problem in your code for the URL for the button.

Make sure the path to the external swf is not an absolute path.

For example assuming the external swf is in the same directory as your main flash that has your button, your actionscript would be

ACTIONSCRIPT Code: [ Select ]
on (release) {
getURL("external.swf");
 
}
 
  1. on (release) {
  2. getURL("external.swf");
  3.  
  4. }
  5.  


make sure it isn't something like:
ACTIONSCRIPT Code: [ Select ]
on (release) {
getURL("c:\intepub\wwwroot\external.swf");
 
}
 
  1. on (release) {
  2. getURL("c:\intepub\wwwroot\external.swf");
  3.  
  4. }
  5.  
"There's no place like 127.0.0.1 except for ::1."
Alexandria Networks. Leader in IT consulting for associations/non-profits, and small to medium sized businesses around the northern Virginia and Washington D.C. metro area.
  • cosmic_billion
  • Newbie
  • Newbie
  • User avatar
  • Joined: Nov 05, 2009
  • Posts: 14
  • Loc: Amsterdam, the Netherlands
  • Status: Offline

Post November 5th, 2009, 6:08 pm

Hello ATNO/TW,

Thanks for your quick response.

Yes, the paths are correct.

The external swf(movie) does load when I run the flash file, however the problem is when I embed the swf into html and run it through a web browser, then it does not load the external swf (movie) from the directory.

any more ideas?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post November 6th, 2009, 12:19 pm

getURL is intended to load pages OUTSIDE of flash. The best solution is to bring the other swf into your current swf via loadMovieClip() or to create a separate html page containing the new swf and link to the page.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • bilhasry4you
  • Novice
  • Novice
  • No Avatar
  • Joined: Feb 12, 2008
  • Posts: 33
  • Status: Offline

Post November 25th, 2009, 8:07 pm

uhm, how about to put swf in HTML code or embed withot JS
  • cosmic_billion
  • Newbie
  • Newbie
  • User avatar
  • Joined: Nov 05, 2009
  • Posts: 14
  • Loc: Amsterdam, the Netherlands
  • Status: Offline

Post December 15th, 2009, 6:38 pm

Great, I got it working, I just started over, recreated the index.htm and embedded the swf again..and..well..it worked.

This sometimes happens to me, not sure why but I have to remember this post in the future..hehe :)

CosmicBliss

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 130 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.