Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » Flash width in html


Flash width in html

Reply
  #1 (permalink)  
Old 08-16-06, 12:56 PM
Jack Stone Jack Stone is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Flash width in html

Hi

I hope this is really simple, does anyone know how to get your swf to display at 100% width in the <td>

I can't seem to get this working

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 08-17-06, 02:44 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
place this in your code where you want the flash application to be:
Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="300" height="214">
        <param name="movie" value="my_application.swf">
        <param name="quality" value="high"><param name="SCALE" value="exactfit">
        <embed src="my_application.swf" width="300" height="214" scale="exactfit" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
    </object>
if you are using macromedia flash, just use "publish" to generate the correct html code for your flash application. it can be found here: file >> Publish
then go to the directory where you store the application, and you'll see a html file. copy the code that resembles mine, and then it should work

Greetz,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #3 (permalink)  
Old 08-17-06, 12:11 PM
Jack Stone Jack Stone is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
?

Hi

This doesn't seem to be working

heres my code

Code:
print "
<div style='z-index: 0; position:relative' id='flashfooter'> 
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0' width='730' height='90'>
<param name=movie value='bubbles.swf'>
<param name=quality value=high>
<param name='wmode' value='transparent'>
<param name='SCALE' value='exactfit'>
<embed src='bubbles.swf' width='730' height='90' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' wmode='transparent' scale='exactfit'>
</embed> 
</object>
</div>";
Please advise if im an idiot or if this code is right

Yeah sorry about the smiley the code behind it is :_D without the underscore

Last edited by Christian; 08-17-06 at 08:12 PM.
Reply With Quote
  #4 (permalink)  
Old 08-17-06, 08:13 PM
Christian's Avatar
Christian Christian is offline
Community VIP
 
Join Date: Mar 2005
Location: ProgrammingTalk
Posts: 2,449
Thanks: 0
Thanked 6 Times in 5 Posts
Quote:
Originally Posted by Jack Stone
Yeah sorry about the smiley the code behind it is :_D without the underscore
Resolved, I just changed the [quote] tags to [code] tags.
__________________
:: ImperialBB :: New version in the works! :: http://www.imperialbb.com ::

:: Have a question about the board? The Rules? An Infraction/Warning? :: Contact Form ::
Reply With Quote
  #5 (permalink)  
Old 08-19-06, 05:27 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
is the swf file located in the same directory as the html page? if not, you have to link the src of the embed-tag to the directory.

try removing the classid, as it is the same as mine. that might give some problems, i don't know for sure.

it should work, after this
if it doesn't, just post back,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #6 (permalink)  
Old 08-19-06, 01:02 PM
Jack Stone Jack Stone is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
sweet

Hi

Finally got it working - thought I would just post how for anyone else wanting to do it.

Using Flash 5 - go to publish settings then to the HTML tab and change the dimention settings to %.

Use the movie with this code
Code:
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0' width=100% height=90>
<param name='movie' value='bubbles.swf'>
<param name='quality' value='high'>
<param name='wmode' value='transparent'>
<param name='scale' value='exactfit'>
<embed src='bubbles.swf' width=100% height=90 scale='exactfit' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' wmode='transparent'>
</embed> 
</object>
Hope this helps someone else out.

Thanks for the help
Reply With Quote
  #7 (permalink)  
Old 08-21-06, 12:24 PM
ragnartm ragnartm is offline
Newbie Coder
 
Join Date: Aug 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
If you want it to play at once and loop you can just use an Iframe:
Quote:
<iframe src="file_location" width="width_of_file" height="height_of_file">You have to use a browser that supports iframes to watch this object</iframe><
If you want more advanced settings you can use this html code.. (What you should edit are marked with '||'s)
Quote:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="550" height="400" id="crazydancer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="||your_movie||.swf" /><param name="play" value="||false for pause/true for auto-start||" /><param name="loop" value="||true for loop/false for 1 time||" /><param name="quality" value="high" /><param name="bgcolor" value="#||bgcolor||" /><embed src="||your_movie.swf||" play="||false for pause/true for auto-start||" loop="||true for loop/false for 1 time||" quality="high" bgcolor="#||bgcolor||" width="||width||" height="||height||" name="||name||" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tutoral thefrtman HTML/XHTML/XML 5 04-27-09 10:25 AM
Can an html link tell a flash applet what to do? chrisrobertson Flash & ActionScript 4 08-01-06 05:47 AM
flash in html dhanashree Flash & ActionScript 1 06-12-06 07:30 AM
getting flash file width and height phizzlecom PHP 2 01-21-05 06:29 AM
PHP, HTML, Flash, Java, & web designers avaible soccerglory.com Job Offers & Assistance 0 12-23-04 04:58 AM


All times are GMT -5. The time now is 06:24 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.