ActionScript 3.0 :: BitmapFill Adds White To Transparency?

Jan 13, 2010

I'm using to bitmapFill to add tile grid to a movieclip which contains an image and it's adding a white fill in the transparency parts of the movieclip even if I set the transparency true, here's the code snippet I'm using.

ActionScript Code:
var mySprite:Sprite = new Sprite();
var myBitmap:BitmapData = new BitmapData(2, 2, true);[code]......

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Bitmapfill Ignoring Png Transparency?

Jun 30, 2007

I have an issue which confounds me. I am working on a parallax engine which can be seen here. See all those trees with the white trim? The white bit should actually be transparent. The .png I am using can be found here. Aaaand here are the classes which pull in the .png and apply it to a custom shape as a bitmap fill:

[Code]...

View 9 Replies

ActionScript 3.0 :: PrintJob Adds A White Rectangle To Stage

Oct 23, 2009

I currently have a button that triggers an event merging the movieclips on stage into one sprite, and passing it to a printer class. The printer class looks as follows:

ActionScript Code:
public class Printer {
private static var printJob:PrintJob = new PrintJob();
private static var printJobOptions:PrintJobOptions = new PrintJobOptions();

[Code]....

The problem is that when clicking the button, the stage gets a white rectangle in the upper left corner that can't be removed!

View 1 Replies

Flex :: MultiDPIBitmapSource In BitmapFill?

Feb 27, 2012

I'm trying to select background image depending on the dpi, but even I can write the following code it do not work.

[code]...

View 1 Replies

Flex :: Set Source Of S:BitmapFill Dynamically?

Apr 12, 2010

In Flash Builder (flex 4) I try to use next code to set selected by user (from file system) Image as a repeated background. It worked with mx:Image but I want to use cool repited capabiletis of s:BitmapFill.BTW: Technic I use also does not work with S:BitmapImage. Also FP does not return any errors. What Shall I do with my code to make it work?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" [code].....

View 1 Replies

Flex :: 3 - Bug Scrolling On Bitmapfill With Big Containers - 3.6

Jul 7, 2011

I have the following scenario: I create an HBox with a width of 1000000px (one million pixels of width). this big HBox is contained inside another small HBox that has a width of 1000 px

[Code]...

Inside this big HBox I create a bitmapFill of a simple image, its just a pattern of lines the problem is that the scrollBar of the small hbox doesnt work well, it just stops halfway, the thumb of the scrollbar keeps going, but the scrolling stops and the end of the big hbox is not beign reached. Here is the part of the code that makes the bitmapfill:

[Code]...

View 1 Replies

ActionScript 3.0 :: Flex BitmapFill Using Dynamically Loaded Images?

Oct 20, 2009

I have a rect that i need to fill with a tiling image. The problem is that there seems to be no way of doing this without using embedded images, which isn't a possibility for me.how to work around this? The reason i can't embed the images is that they are selected by the user from a list, generated by a plsql procedure. it's flex 4 beta 2 by the way,

View 9 Replies

ActionScript 3.0 :: Apply Alpha To BitmapFill When Drawing Image To Stage?

Dec 4, 2009

I got this code from [URL]; it writes an image to stage as a way of tile it.

holidaytile is an instance of a Gif Image.
 
But I want to change the Alpha so that my top layer shows through it, and I can't seem to figure out how to do that.
 
import flash.display.BitmapData;var tile:BitmapData = BitmapData.loadBitmap("holidaytile");this.beginBitmapFill(tile);

[Code]....

View 3 Replies

ActionScript 1/2 :: Change The Background Color To White And Should Also Display The Text ''white'' In The Dynamic Text Box

May 20, 2009

I'd like to be able to click on each of the buttons and have the background color change and also have its color name loaded in the dynamic text field. E.g. Clicking the white square would change the background color to white and should also display the text ''white'' in the dynamic text box. I've sorted out the colour changing part with the following code:

[Code]...

View 4 Replies

Actionscript 3 :: Resizing A Sprite Without Resizing Its BitmapFill (or Its Contents For That Matter)?

Nov 1, 2010

I am not simply trying to contain things and have the container resize without the contents resizing. I would just use a simple MovieClip for that.. My main focus is on the use of BitmapFill. I'm trying to make a repeating background image for a container; thus far I'm able to draw my BitmapFill sprite to the size I want. (Which is the stage's height) but when the stage is resized, I want to re-size my container but have my containers BitmapFill crop or add more as the window is resized bigger or smaller. Allow me to illustrate what I mean:

I've got a simple rectangle sprite that fills with a bitmap from the library and a simple resize handler function that detects when the window has been resized.what I would like to do is have my rectangle resize to the height of the stage.stageHeight maintaining its bitmap fill, but not resizing the bitmap fill or any children within the sprite.

From what I've read, this is a little tricky because the sprite resizes in relation to what it contains.. or.. something like that.. I really don't know any more.. I saw one example where a person extended the sprite class but I don't know why or how..

in my library there is an image called 'pattern' and my code looks like this:

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, resizeHandler, false, 0, true);

[code]....

View 2 Replies

ActionScript 2.0 :: Adds 10 To A Dynamic Text Box?

Aug 17, 2009

I need a code that adds 10 to a dynamic text box?

View 8 Replies

ActionScript 2.0 :: +=1 Does Not Increase Variable But Adds 1 At The End

Oct 19, 2009

I have this code, which should work fine, but it doesn't.

Unit1_Mobs_Destroyed += 1;

Text="Unit 1 destroyed "+Unit1_Mobs_Destroyed+" Mobs!" It should set Unit1_Mobs_Destroyed to current value + 1 If Unit1_Mobs_Destroyed is 5 at the start, it should be this: Unit 1 destroyed 6 Mobs But that doesn't happen instead I get this: Unit 1 destroyed 5 1 Mobs

View 2 Replies

ActionScript 3.0 :: Adds 100 Movieclips To The Screen?

Jan 4, 2011

i have successfully created a loop that adds 100 movieclips to the screen but my problem is that they all appear on the screen at the same time. what is the best way to make the movieclips appear within a few seconds of each other?

ActionScript Code:
for (var i:Number=1; i<=100; i++) {
var circle:MovieClip = new ball();
addChild(circle);
circle.x=Math.random()*stage.stageHeight;
circle.y=Math.random()*stage.stageWidth;
}

View 1 Replies

ActionScript 2.0 :: CSS Adds Extra Line?

Jun 23, 2007

I'm having a problem with extra lines being added to my text anytime the stylesheet is applied??

Here's the actionscript:

this.createTextField("bodytxt", 0, 50, 30, 430, 200);
bodytxt.html = true;
bodytxt.border = true;

[Code].....

View 3 Replies

ActionScript 2.0 :: GotoAndPlay To Another Frame With The Value Adds To 5?

May 6, 2008

I have two buttons one that adds 2 and one that adds 3.

Code:
score.text = 0;
add2.onPress = function():Void {
score.text = Number(score.text) + 2;[code]....

I want to gotoAndPlay to another frame with the value adds to 5. Say if I press the add2 button and the add3 button, I want to go to another frame.I tried making score.text a variable and it didn't work.

If (score.text =5){
gotoAndPlay(1);
}

View 2 Replies

ActionScript 3.0 :: Embedding Adds 150kb To SWF

Nov 29, 2009

Due to my need to tween TextFields, Flash managed to botch up simple scale Tweening.Right now, the font is embedded, and it's doubling the total SWF size.I want to be able to tween the size of the TextFields, without that "jerky" motion. Some way to convert it to vector graphics would likely be the best option.I tried rendering as a bitmap, but it isn't getting the desired result, and the hit areas of the TextFields seem way off. Also, it tends to blur quite a bit, even though the scale is only 1.2.

View 12 Replies

ActionScript 3.0 :: Unloading A Swf That Adds Itself After A Given Time?

Apr 7, 2011

i am working on this code

[as]portfolio_btn.addEventListener(MouseEvent.CLICK, portfolio);
home_btn.addEventListener(MouseEvent.CLICK, home);
var loader:Loader=new Loader();
loader.load(new URLRequest("portfolio.swf"));

[code]....

so i can click on a button and after 2 seconds my swf loads fine. but then when i click on the other button to unload, remove it. It plays again...how can i remove it so it doesnt keep adding itself.

View 2 Replies

Professional :: Creating Simple Rotating Adds

Jan 14, 2010

i can use flash a bit. can any one point me in the right direction of making a add like this [URL] the 3 picture one

View 1 Replies

Professional :: Motion Tween Adds New Layer?

Oct 18, 2010

I'm rather belatedly getting to grips with the new tweening system introduced in CS4.  To be quite honest it's been a nightmare, but I'm starting to see its good points now.One thing that still drives me crazy is when you create a new tween and Flash creates a new layer for you and puts the tween into it.  Why?  And how do I stop it?  Over the course of a 10 min animation with a lot of tweens I could end up with hundreds of layers

View 2 Replies

ActionScript 3.0 :: A Single Button That Removes And Adds MCs

Feb 5, 2011

I'm trying to create a button that, when first clicked, will add a MC to the stage. Then, on the second and subsequent clicks will remove the existing MC and replace it with a new one. The code I'm using is:

stop();
draw1.buttonMode = true;
draw1.useHandCursor = true;

[Code]....

Is there a better way to handle this than what I have above?

View 3 Replies

ActionScript 3.0 :: Which Parses Xml And Adds A Value To The Second Via An Internal Set Method?

May 17, 2011

I have two classes, both in the same package, one of which parses xml and adds a value to the second via an internal set method. This initially works fine but as soon as add a public get method to the second class I get an error (1059: Property is read-only).
 
The problem goes away if I make both methods public or internal but in this situation I would like to have one of each. Is this possible? I thought I had done this in the past without any problems but maybe not.

View 1 Replies

Javascript :: Capture Clicks In Flash Adds?

Dec 18, 2009

I am trying to track the exit clicks of the users in the adds in my page.

Can I somehow capture with Javascript the click event of a user in a external Flash add I have inserted in my page?

I have been searching and trying by myself, but it seems like the flash object inside of my page is a black box, where I could not access anyway.

View 1 Replies

ActionScript 2.0 :: Create A Calculator Which Adds Several Variables

Oct 12, 2006

A friend was asked to create a calculator which adds several variables together and produces an output which has other pre-determined variables added or subtracted...[code]The problem now is that the people that asked for it forgot to say they needed a further calculation which between us we just can't work out! Basically, if net_estate is under 285000, then tax_liability is to be 0. but if it's over 285000 then tax_liability = 40 / 100 * net_estate (as in the above code).

View 2 Replies

ActionScript 2.0 :: Unable To Rotating Banner Adds?

Jun 6, 2003

How do I create an fla that rotates banners made in flash (external flash animations) upon refresh on the browser?

View 5 Replies

ActionScript 3.0 :: AddChild Adds Only To The Stage, Not Nested MC

Jun 8, 2009

I have a class that adds to the main stage fine, but not inside an MC

var SliderTestClass = new SliderTestClass;

mContent01.addChild(issSlider); //trace says undefined
addChild(issSlider);//trace says [object SliderTestClass]

Why would it refused to be added to mContent01 which is a visible MC on the stage?

View 8 Replies

ActionScript 3.0 :: Button Adds To Total Score?

Dec 3, 2009

I can find my way in Actionscript 2.0, but 3.0's hell for me. I've been following a bunch of tutorials and I suppose I understand the 'basics', although I'm beating myself over this 'cause most of you will probably consider this basic aswell.

The problem at hand : I made a few movieclips, that have a transparant button on the first frame inside of them, and on layers below it an animation that starts once you click it, then stops at the last frame.

(Example : You see a snail, you click it(but really click the transparant button that's above it) and the movieclip starts playing, showing a snail that crawls back inside it's shell, then it stops. Pretty simple, but it's a fun and easy way to have multiple interactive graphics on a page.)

The task at hand : Somehow make a score system that allows you to see how many of them you've clicked, meaning everytime you click a snail (for this example, anyway) there's a +1 function somewhere.

Currently, inside the movieclip (the transparant button) I have :

stop();
alpha_btn.addEventListener(MouseEvent.CLICK, nextClick);
function nextClick(event:MouseEvent):void{
gotoAndPlay(2);
}

Which is pretty straight forward. alpha_btn is the button that makes the animation inside the movieclip play. At frame 30, there's a stop(); function.Then, there's the main timeline.

function scorePoints(myPoints:Number):void {
if (Number(scoreBoard.text)) {
scoreBoard.text = String(myPoints);

[code]...

It works, but only once. After the snail is clicked, I have it looped (no stop(); at the end of the moveclip, but it moves to the first frame again. Meaning, the button's there again and it's clickable again.) but everytime I click it after that, there's no points added to it.So I'll break it down to this : I need simple button that, when clicked, adds a number of points to the scoreBoard.

View 4 Replies

Replacing Flash With Another File Adds Border In Firefox?

Jun 19, 2009

I have a flash that I took out of a template to customize. (I'm using CS4). Same size, hell mostly the same file with small changes. None of the changes were to the file height or width.I have looked all over the code, checked all my spacing/padding/etc, and went line by line through the code and it's identical...I preview it in IE and it's fine. Everything matches. I preview it in FF, and there is about a 10-15px gap b/t the header and the body. I am at the end of my rope! The rest of the site is just about ready to go live, and I can't do that until I figure this out.

View 3 Replies

Flash :: Compare 2 Arrays For Adds, Removes & Updates?

Apr 13, 2010

I'm wondering if there is a better way to approach this than my current solution...

I have a list of items, I then retrieve another list of items. I need to compare the two lists and come up with a list of items that are existing (for update), a list that are not existing in the new list (for removal) and a list of items that are not existing in the old list (for adding).

Here is what I'm doing now - basically creating a lookup object for testing if an item exists.

[Code]...

View 2 Replies

ActionScript :: Instantiate A Sprite Subclass That Adds Itself To The Stage?

Dec 31, 2010

I've created a wrapper around Sprite called ClickableCircle, which is meant to add itself to the display list when instantiated. Here's a toy version:

public class ClickableCircle extends Sprite {
protected var circle:Shape;
protected var myName:String;

[code].....

View 2 Replies

Flex :: Coldfusion - Adds Incorrect Port To CFC Call?

Mar 7, 2012

I have a Flex/CF app that sits on 2 redundant servers behind a load balancer. Both the Flex and CF side make calls to the same CFC. The Flex, CF and CFC are all in the same folder. When the CF code calls the CFC, there's not a problem. However, when the Flex code calls the CFC, it adds an explicit port "84" to the URL.This causes a problem for the load balancer which only accepts traffic from port 80. As I understand it, the load balancer would internally route requests from port 80 to 1 of the 2 servers on port 84 (but that internal routing should be invisible to the client).

[Code]...

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved