Alpha transparency for a SWFobject
Hi everybody.
I'm doing a image gallery based on a template called 'SimpleViewer' and I embeded on my html file, but it seems that alpha code doesn't work.
Here I put the link and code for the web page: http://www.condadoplazahotel.com.mx/flashSite/habitaciones/galeria.html
Please HELP ME!!! T_T
CODE:
<body>
<div align="center"><table width="800" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="32%" height="77" bgcolor="#75aeb3"><img src="../imagenes/logo.png" width="141" height="70"></td>
<td width="68%" bgcolor="#75aeb3"><h3 align="left" class="Estilo1">Galería de Habitaciones </h3></td>
</tr>
<tr>
<td height="10" bgcolor="#CCCCCC" colspan="2" align="center"> </td>
</tr>
<tr valign="middle" background="../imagenes/fondo.png">
<td height="720" colspan="2" align="center"><div id="flashcontent">
<p>AutoViewer requires JavaScript and the Flash Player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "simpleviewer", "480", "680", "8", "#4f8b91"); <== THIS IS WHERE I DON'T GET IT RIGHT!!
//Optional Configuration
fo.addVariable("langOpenImage", "Open Image in New Window");
fo.addVariable("langAbout", "About");
fo.addVariable("preloaderColor", "0x999999");
fo.write("flashcontent");
</script></td>
</tr>
</body>
What do you mean by alpha code?
Also if you are trying to have a transparent background in you swf file, this will not work (at this time), as the player itself has a 'stage' color set.
There is also a problem with how you are inserting your <object> code for flash.
(refer to - Help - index page has disappeared after removing code that was recommended regarding Flash
in this forum for an example of how to (about 60% of the way down)).
PZ
Similar Messages
-
Exporting Alpha Transparency for a PC from motion5...?
I am trying to export alpha transparency for a lower third I've done in Motion5.
I know that proress422(proxy) can be used , but this does not import well into my PC (premiere pro).
Is there anyway of creating alpha transparency from m5 so that my PC will happily recognise it ?
thanks,If you're using Alpha for *anything* -- you must use ProRes 4444 (if Premiere will accept it.) It is the only ProRes that supports transparency and the only export option in Motion 5 that supports transparency. (Older versions of Motion could export with the "Animation" codec which also supported transparency.)
If Premiere (on the PC) doesn't handle ProRes 4444, then
You can export just the alpha channel from Motion and use a "Track Matte Key" in Premiere (as I *understand* it -- I've never used premiere.)
On export, go under the Render options panel and set Color: to Alpha (default is Color + Alpha).
It's basically a B&W movie of the alpha data -- the "layer" is used as a luminance map in the travel matte key. I actually don't think it matters what codec you use for export -- it's not really transparency -- black is transparent and white is opaque.
HTH -
"Preserve alpha transparency" with flattening for PDF
For what reason, in Illustrator CS3, is the option for preserving alpha transparency not available in the PDF flattener, but only under the object menu by choosing Flatten Transparency...
The reason i'm asking, is because when using some effects and spot colors, the background of the flattened object becomes a white bounding rectangle that overlaps other objects. I can workaround this by saving a copy, flatten all objects and then save a PDF. But isn't it possible to directly save a correctly flattened PDF from the original unflattened file with spot colors, without having to flatten the objects manually?here is an example, when I upload this image to the printers I loose the white background and eveything on the bottom of the card is pushed up. The same thing happens with the brochure I have. I can't upload that because this site will not allow it.
-
Alpha transparency borders on dynamically loaded images for use with textures
Hi there folks. Well, I have been beating my head over this
and am hoping one of you can help me out.
Essentially I have 16bit images that are loaded into my
shockwave application at run-time. These images are user defined
which means that I will not know their size ahead of time. Once the
images are loaded I then create textures and apply them to various
shaders. Ok, all of this works just fine. What I need to do though
is create an alpha transparent border around the images, so when I
apply them to their surfaces I only see the image and nothing
around it. I am doing this because these images will only appear at
specific parts on a surface, textureRepeat will be false, and many
models will be stacked in the same exact location using the same
model resource. I have everything working, but I cannot figure out
the alpha part for the life of me. Also, when I test the alpha
based image by itself it works just fine. It is not until I try and
combine the 16bit (converted to 32bit at run-time) image that I run
into problems.
I have tried:
- Creating a 32bit alpha image in Fireworks with a
transparent border and a black rect for the inside. I then copy the
dynamic image over the alpha image (only after going from 16bit to
32bit in imaging Lingo) and leave a little room at the edges for
the transparency. Well, I get a crazy amount of streaks here even
when I try to up the trans border by around 24 pixels on each side.
- Using another similiar alpha based image as a mask with
copyPixels and extractAlpha/setAlpha like this... (code is a little
rough here)
newImage = new(#bitmap)
newImage.name = "place_Test"
newImage.image = member("place").image
newAlpha = new(#bitmap)
newAlpha.name = "AHH"
newAlpha.image = image(newImage.image.width + 24,
newImage.image.height + 24, 32)
newAlpha.image.useAlpha = true
newAlpha.image.copyPixels(member("vase").image,
newAlpha.image.rect, member("vase").image.rect)
newAlphaInfo = newAlpha.image.extractAlpha()
newAlpha.image.useAlpha = false
--reverse dark to light
iAlphaReverse = image(newAlpha.image.width,
newAlpha.image.height, 8, #grayscale)
iAlphaReverse.fill(iAlphaReverse.rect, rgb(0,0,0))
iAlphaReverse.copyPixels(newAlphaInfo, iAlphaReverse.rect,
newAlphaInfo.rect, [#ink : #reverse])
--newAlphaInfo.copyPixels(iAlphaReverse, newAlphaInfo.rect,
iAlphaReverse.rect, [#ink:#subtractpin])
newAlphaMask = iAlphaReverse.createMask()
rescaleAbs(newImage, newImage.image.width,
newImage.image.height, "place_Test", 32)
destImage = member("place_Test").image.duplicate()
destImage.fill(destImage.rect, rgb(0,0,0))
newAlpha.image.useAlpha = false
destImage.copyPixels(newImage.image, newImage.image.rect,
newImage.image.rect, [#maskImage:newAlphaMask, #ink:#add])
destImage.setAlpha(iAlphaReverse)
destImage.useAlpha = true
member("place_Test").image = destImage
I apologize for the messy code. I have cut and pasted from
all over the place and am getting confused. In any case, I think I
am making this harder then it needs to be and hope someone can
help.
Thank you in advance,
DaveHi, you can try using other texture layer as mask on the same
shader. As usually you create the texture from a dynamic loaded
image, then apply this texture to the shader on the texture list
index 1 (textureList[1]). Next part does the job, create other
texture from a 32 bits image with the alpha information and fill
all pixels with white color, this is very important because the
second texture layer will be multiply with the first texture layer.
This texture set its render format to rgba8888. Apply the mask
texture to the same shader at texture list index 2, verify that the
blendFunctionList index 2 is #multiply.
I include the code of a project that use this masking
approach:
property pMember
property pEarthSphere
property pNightSphere
property pLastTransform
on beginSprite me
pMember = sprite(me.spriteNum).member
me.setupWorld()
end
on setupWorld(me)
pMember.resetWorld()
repeat with i = pMember.light.count down to 1
pMember.deletelight(i)
end repeat
vEarthModelResource = pMember.newModelResource("EARTH MODEL
RESOURCE", #sphere)
vEarthModelResource.radius = 50.000
vEarthModelResource.resolution = 20
vEarthTexture = pMember.newTexture("EARTH TEXTURE",
#fromCastMember, member(3,1))
vEarthShader = pMember.newShader("EARTH SHADER", #standard)
vEarthShader.emissive = color(255,255,255)
vEarthShader.flat = TRUE
vEarthShader.transparent = FALSE
vEarthShader.textureList[1] = vEarthTexture
pEarthSphere = pMember.newModel("EARTH MODEL",
vEarthModelResource)
pEarthSphere.shaderList = vEarthShader
vNightModelResource = pMember.newModelResource("NIGHT MODEL
RESOURCE", #sphere)
vNightModelResource.radius = 50.2000
vNightModelResource.resolution = 20
vNightTexture = pMember.newTexture("NIGHT TEXTURE",
#fromCastMember, member(4,1))
vNightTexture.quality = #lowFiltered
vNightTexture.nearFiltering = FALSE
vNightTexture.renderFormat = #rgba8880
vNightShader = pMember.newShader("NIGHT SHADER", #standard)
vNightShader.emissive = color(255,255,255)
vNightShader.flat = TRUE
vNightShader.transparent = TRUE
vNightShader.textureList[1] = vNightTexture
vMaskNightTexture = pMember.newTexture("MASK NIGHT TEXTURE",
#fromCastMember, member(6,1))
vMaskNightTexture.renderFormat = #rgba8888
vNightShader.textureList[2] = vMaskNightTexture
vNightShader.textureModeList[2] = #wrapPlanar
pNightSphere = pMember.newModel("NIGHT MODEL",
vNightModelResource)
pNightSphere.shaderList[1] = vNightShader
pNightSphere.parent = pEarthSphere
end
on exitFrame(me)
pEarthSphere.rotate(0.0,0.1,0.0)
me.moveMaskNightTexture()
end
on moveMaskNightTexture(me)
vRotationVector = - pEarthSphere.transform.rotation
pNightSphere.shaderList[1].wrapTransformList[2].rotation =
vRotationVector
end -
Creating a alpha transparent video
Hi,
I am tasked to create a video that has a transparent background.
Something like this - http://updates.html5rocks.com/2013/07/Alpha-transparency-in-Chrome-video
I came across a solution called JQuery See Thru - https://github.com/m90/jquery-seeThru
But before the plugin can work, I will need to append the alpha channel below the actual video. I have tried using track matte in AE but it doesn't work.
Any advice or any other solution to create alpha transparent video for html5?
Thank you very much.To build on what Mylenium said, you need to render your video out of After Effects with an alpha channel. If you're looking to deliver a video for the web, it'd be best to render a lossless file out of AE (with Alpha) and use the Adobe Media Encoder to make the FLV with alpha.
-
Appending alpha transparency swatches to a CLUT
I have a 160 swatch color table I generated in PS and I'd
like to append some alpha transparency values to it for PNG8
processing.
In Fireworks CS4 I've loaded up a test image, successfully
loaded in the .act file I exported from PS and then selected 'Alpha
Transparency' from the trns pulldown menu. Briefly some new
swatches show up in the swatch palette, but then they disappear.
I've tried everything I can think of. If there was a way to
manually add and edit the transparency swatches to the act that
would be ideal, but when I try to add swatches to the table I don't
see any way to edit the transparency value, only RGB/HEX etc.. I'm
somewhat stuck at the moment.
Is there a way to do this? Maybe even some sort of
independent color table editor?
It's important that I have exact control over the CLUT file
used as the device that the images will be running on can only have
one CLUT active at any time, and all of the images in the UI need
to be built to reference this single table.
Another tangental issue I've encountered is that the PNG8
alpha transparency in FW seems to be restricting itself for some
reason. For example, I've created a 256 pixel wide image in PS with
a black ramp that goes from 100% opaque to 100% transparent across
x-axis. I open this in FW, select PNG8, adaptive, 256 colors, alpha
transparency and I only get 16 swatches (4bit?), completely
faceting my ramp - however I've seen others online getting 8bit
values of transparency using this same method...
For example
Here
and
Here
Any and all feedback much appreciated.
Natenatronix wrote:
> Jim,
> That one only contains 16 transparent values, if the
optimize palette
> functioned correctly it would be 255.. the source image
I started with
> contained a 256 pixel wide block, blending from opaque
black to completely
> transparent (therefor 1 opaque color and 255 values of
transparency).
>
> However when I select PN8, adaptive sampling, 256 colors
and alpha
> transparency, that file is what Fireworks creates.
>
> I'd described this previously- the posting of this file
was per Linda's
> request to see a PNG8 with non-index transparency, which
it has, albeit not a
> full 8bits.
>
> On another note, I've opened up the .act files in a hex
editor and can see
> that it does not contain an alpha attribute. So my
initial concept of appending
> these new transparent values from Fireworks to the .act
are moot. I've
> discovered the .pal color table format, which is almost
identical to .act
> except it contains an extra hex pair for an alpha value.
>
> Apparently Photoshop use to support importing and
exporting of .pal color
> table files. I don't know what version support stopped
at. I've tested CS3 & 4
> and they aren't playing nice.
>
> It appears as though I'll need to manually concatenate
the .pal file starting
> with the existing .act table that I have, porting the
hex values over, and then
> manually building out the transparent values I want. The
next and final step
> will be to identify a version of Fireworks, or some
other host, that can
> utilize .pal and run optimizations on the files I have.
That or I get a patch
> to Fireworks that fixes the optimize panel, better yet a
patch to Photoshop
> that enables alpha transparency in PNG8.. I'm not
holding my breath.
>
>
Nate can you share the original 256 value set, even if it is
in PSD form?
Jim Babbage - .:Community MX:. & .:Adobe Community
Expert:.
http://www.communityMX.com/
.:Adobe Community Expert for Fireworks:.
http://www.adobe.com/communities/experts/members/206.html -
Since people still insist on using IE 6 and I can't figure out how to use my logo with alpha transparency (despite copying the code exactly), can anyone tell me the code I would use to display my logo in png form for IE 7 and above and my logo in jpg form for IE 6 and lower? Thanks.
Hi instead of using an IE conditional statement why don't you try using the iepngfix.htc file which enables IE6 to display png alpha transparency files correctly.
Instructions on how to use it (and download link) is available here:
http://www.dlnqnt.co.uk/index.php/tag/iepngfixhtc/ -
Culled 3D object not transparent for all views/translations
This code displays a tube that is stored in a VRML file. I modified the 'open WRL file' to import the object as a single color (green) with a alpha (transparency) value of 0.5. The vi also draws an opaque sphere. The sphere can be seen through the tube, but for only certain locations/viewpoints.
This discussion (http://forums.ni.com/ni/board/message?board.id=170&thread.id=280607&view=by_date_ascending&page=2) suggests duplicating the object and culling the front/back faces, which I've also done.
Please look at the code. '3D Control Main' is the main vi. You should notice as the sphere moves through the tube that transparency dissapears. All I need is for the transparency to remain constant. Any suggestions are welcome.
-Joe
Attachments:
3D tube.zip 375 KBHi peabody,
I've tried running your code, but I'm missing C:\Documents and Settings\Smile\My Documents\My Pictures\crosshatch.jpg file. Also, is it possible for you to simpify your code to illustrate the issue better?
Regards,
Stanley Hu
National Instruments
Applications Engineering
http://www.ni.com/support -
Alpha levels for swing components
Hello All,
I am trying to control the alpha levels for a JLabel which is essentially just a rectangle. I have seen examples of how to use the AlphaComposite class and apply alpha levels to graphics, but my goal is generate dynamically sized rectangles and then control their alpha levels.
Here is the rectangle I am currently generating, with no transparency.
protected JLabel createColoredRectangle(Color color, Point origin, int w, int h) {
JLabel label = new JLabel();
label.setBorder(BorderFactory.createLineBorder(color, 1));
label.setBounds(origin.x, origin.y, w, h);
label.setForeground(color);
label.setHorizontalAlignment(JLabel.CENTER);
label.setOpaque(false);
label.setVerticalAlignment(JLabel.TOP);
return label;
}Any suggestions would be greatly appreciated.
Cheers,
Cypherin any case, setting the foreground isn't going to do anything for your boxes, what you need to do is set the background. Here is my test case to get you started:
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(new GridLayout(3,3));
for (int i=0;i<9;i++) {
//create an alpha-green for each box
frame.getContentPane().add(createColoredRectangle(new Color(100,255,100,255/9*i)));
frame.setSize(300,300);
frame.setVisible(true);
static protected JLabel createColoredRectangle(Color color) {
JLabel label = new JLabel();
label.setBorder(BorderFactory.createLineBorder(color, 1));
label.setBackground(color);
label.setHorizontalAlignment(JLabel.CENTER);
label.setOpaque(true);
label.setVerticalAlignment(JLabel.TOP);
return label;
} -
Why can't I export a 24 bit PNG with alpha transparency?
I have just upgraded my Macromedia Studio 8 to Adobe CS3, and
it seems that I still can't export a 24 bit png with transparency
from Fireworks (Photoshop can do it, but it's just not suited for
volume graphic production). Anyone know something I don't, or can
someone at least explain why I can have alpha transparency on 8 bit
and 32 bit, but not 24 bit pngs? Currently, I'm planning to export
everything from Fireworks, then batch-process through Photoshop to
reduce from 32 bit to 24 bit, which is just... gah! Words fail
me.Kathleen13 wrote:
> I have just upgraded my Macromedia Studio 8 to Adobe
CS3, and it seems that I
> still can't export a 24 bit png with transparency from
Fireworks (Photoshop can
> do it, but it's just not suited for volume graphic
production). Anyone know
> something I don't, or can someone at least explain why I
can have alpha
> transparency on 8 bit and 32 bit, but not 24 bit pngs?
Currently, I'm planning
> to export everything from Fireworks, then batch-process
through Photoshop to
> reduce from 32 bit to 24 bit, which is just... gah!
Words fail me.
>
If I'm correct, 8-bit png supports index transparency just
like GIF's
do. 32-bit png's support alpha channel transparency, so you
can get
variable or partial transparency in a full color image(8 bits
for each
color and 8 bits for an alpha channel) and 24-bit png's are
similar
jpegs, only you get lossless compression and no user-defined
settings.
So essentially, when you export a 32-bit png file you are
exporting a 24
bit color image with an 8-bit alpha channel.
Jim Babbage - .:Community MX:. & .:Adobe Community
Expert:.
Extending Knowledge, Daily
http://www.communityMX.com/
CommunityMX - Free Resources:
http://www.communitymx.com/free.cfm
.:Adobe Community Expert for Fireworks:.
news://forums.macromedia.com/macromedia.fireworks
news://forums.macromedia.com/macromedia.dreamweaver -
Why won't PNG8 image use Alpha Transparency?
In CS5, I'm trying to create a PNG8 image with Alph Transparency. Every time I select a color on the image, it changes from Alpha to Index tranparency. Do I have to set a specific Palette, Dither, or Maximum number of colors?
Yes set your canvas to transparent for sure - same as you would for PNG 32. Matte color should not have an impact.
Jim Babbage -
PNG 8 Alpha Transparency Palette Errors
I am attempting to export a PNG 8 image with alpha transparency using Fireworks 11.1.0.205 on Windows 7 64-bit. When I attempt to optimize the image to PNG 8, Adaptive with Alpha Transparency and rebuild the palette it crushed the palette down. The image is a grayscale image and the bug appears similiar to the one reported here http://blogs.adobe.com/sarthak/2010/09/png-8-export-color-palette-issues.html.
Here is a screen cast of someone doing what I want to do, http://brenelz.com/blog/png-8-alpha-transparency-screencast/ (fast forward through the parts of him editing HTML).
This is an example of what I am trying to do, an PNG 8 with alpha transparency (view full image);
This is what I get when I open and then export the sample image out of Fireworks;
It crushes the palette.
This is the optimize panel when the original file is first opened:
This is what happens when the palette is rebuilt, which matched the exported palette;Linda,
I do not appreciate your condescending tone. I have attempted all of your instructions. Embedded is a window capture of my graphic on a TRANPARENT canvas with your suggested settings. Also embedded is the resulting graphic. Finally, embedded is the original graphic that demonstrates what I am attempting to achieve.
Transparent Canvas
Resulting image on export.
Original image
I'm disappointed that you cannot be bothered to attempt to recreate the problem and post evidence to back up your claims.
I have tracked down the creator of the original image who says about using Fireworks "the quality was rarely good enough." The tool used was ImageOptim, http://imageoptim.pornel.net/. -
Opening Fireworks PNG-8s with alpha transparancy
Hi all,
I have to do some work on some files I didn't create -- a couple hundred png files. They are 8-bit, indexed files, but when viewed on the web they have 256 levels of alpha transparency. When opened in Photoshop, they have only one level of alpha transparency :(
Turns out these are in some proprietary Fireworks format ... anyone have any ideas how I can get these into Photoshop without losing my alpha channel, hopefully without having to BUY Fireworks ... oh how I miss ImageReady ;)
Thanks in advance.Photoshop doesn't work with continuous transparency in indexed color mode, only one transparent value is allowed. (ImageReady wouldn't do it, either)
You may need to use another application to convert them to a normal RGB image with transparency. -
How do I disable transparency for the menubar and addressbar in firefox?
How do I disable transparency for the menubar and addressbar in firefox? (This does not mean disable windows aero or transparency in windows 7. A workaround has been posted. Stop spamming threads with disable transparency and aero everytime someone asks about this.)
It is difficult to read.
Edit:
Is there a setting to tone down the Aero usage of the in Firefox 5 so it looks more like Firefox 3.6. Is there a way to do this in the preferences or inside about:config?
I know what Aero is and how to turn it off.
The 2nd reply has images attached show why it is difficult to read. An light spot on a desktop background or an icon can make it very difficult to read. This is the #1 reason why I keep going back to 3.6.If you are up to tweaking some CSS code in a style see
"Color Toolbar(s) to identify profile (DM*)" -- in http://userstyles.org/styles/9514, and you must read all of the description material understand what has to be done.
It is a style, and playing with the code is what styles are about. You will have to copy the section of code in the description to the bottom of the style for it to be complete to remove additional Aero effects, and choose two or three colors for the toolbars. -
How to force IE7 to accept transparency for an iframe ?
When using Firefox, the following iframe is transparent by
default :
<div id="mainContent">
<iframe src="shop/index.php" name="main" width="820"
height="550" frameborder="0" id="if_main"></iframe>
</div>
However, the same iframe is displayed in white (not
transparent) wih IE7.
Is it a solution to force IE7 to accept transparency for the
iframes ?
Thank you in advance for your help.
PS: the allowtransparency option doesn't work !It works. Try this:
<iframe src="shop/index.php" name="main"
allowtransparency="true"
width="820" height="550"
frameborder="0" id="if_main"></iframe>
Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
Maybe you are looking for
-
my laptop is vista & am using mozilla firefox explorer
-
Unable To Share Photo Stream With Anyone
ve been navigating the very unintuitive process to share photos on both the Photos App on the iPad as well as iPhoto on OS X. I understand the iPhone adds yet another different way to do the same thing, so we'll skip that for now as this has more to
-
I have a h67ma-e35 mainboard with a I5-2500K CPU and I wan't to overclock, but it seems to be impossible to do so on this mainboard. Whenever I put the cpu on a higher mulitplyer and reboot it always reverts back to the old multiplyer and thereby und
-
Backup & Restore loses "Groups" in "Contacts" - request for fix
Hi, I am a new Blackberry user and have found that the Blackberry Link backup/restore functions fail to keep track of my Groups within my Contacts list. When I carry out a Restore all my Contacts are restored but all my Groups within Contacts disapp
-
I've been using framemaker for over 10 years, and I have a nagging problem in TOC's. Give that you want standard toc's such as: 1.1 Introduction........................................1.3 Simply put, when you generate your TOC in a book, there may b