How to apply alpah to BitmapFill when drawing image to stage??

I'm just starting with AS3 from AS2, but understand basics of code, so bear with me.
I got this code from www.kirupa.com; 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);
this.lineTo(Stage.width,0);
this.lineTo(Stage.width, Stage.height);
this.lineTo(0, Stage.height);
this.lineTo(0, 0);
this.endFill();
Thanks if you can help, I'll keep looking
Howard

Well I created the Class using the import.flash.display.BitmapData
then created a var: tile to hold the instance with var tile:BitmapData = BitmapData.loadBitmap("holidaytile");
Then this.beginBitmapFill(tile);  I believe loads the Bitmap with the instance
And the following code writes it all to stage
this.lineTo(Stage.width,0);
this.lineTo(Stage.width, Stage.height);
this.lineTo(0, Stage.height);
this.lineTo(0, 0);
this.endFill();
But where would I put the alpha control?? I've tried in a few places e.g
BitmapFill.alpah = 0.5; But there is no change.
Howard

Similar Messages

  • How to modify the code to use the image on stage instead of in library?

    Hi, The following code I found on website is for working with the image which is in library. But how to modify it to work with the image on stage. Because I don't want to use it from the library. The second question ------ Is it the AS2 code or AS3. If it is AS2 code then please let me know how to modify it to work with AS3. animator = CreateEmptyMovieClip('animator',1);
    bg_1 = animator.attachMovie('bg_mc','bg_1',1);
    bg_2 = animator.attachMovie('bg_mc','bg_2',2);
    bg_1._x = bg_1._width/2:
    bg_2._x = bg_2._width/2:
    speed = 1;
    cloudWidth = 380;
    animator.onEnterFrame = function(){
    bg_1._x -= speed:
    bg_2._x -= speed:
    if(bg_1._x <= -bg_1._width) bg_1._x = cloudWidth;
    if(bg_2._x <= -bg_2._width) bg_2._x = cloudWidth;
    } Thanks.

    There is no need for attach the clip if it is not in the library and it is the AS2 code below is the relevant code in AS3 when it is in stage:
    i) Convert your first image into a movieclip with the instance name "bg_1"
    ii) Convert your second image into a movieclip with the instance name "bg_2"
    iii) Actions:
        var speed:Number = 1;
        var cloudWidth:Number = 380;
        bg_1.x = bg_1.width/2:
        bg_2.x = bg_2.width/2:
        this.addEventListener(Event.ENTER_FRAME,fn);
        function fn(e:Event):void{
            bg_1.x -= speed:
            bg_2.x -= speed:
            if(bg_1.x <= -bg_1.width) bg_1.x = cloudWidth;
            if(bg_2.x <= -bg_2.width) bg_2.x = cloudWidth;

  • How to apply a gradiant to a photoshop image?

    How do I apply a gradiant to a photoshop image?
    I have tried looking at a number of online blogs and instructions but they were the wrong version -- or they assumed too much knowledge that I did not have and thus stepped over some steps.
    I am using Photoshop version CS6

    Here's a visual illustration of Charles' technique to help you along:
    a.) Set the foreground color to white.
    b.) Go to Layer > New > Layer
    Select the gradient tool.
    Select the white transparent gradient in the drop down gradient menu.
    Now draw your gradient.  You can select different gradient patterns by clicking the buttons next to the drop down gradient menu.

  • How to apply lens correction profile to multiple images at once?

    I have a quick newbie question and I couldn't find an answer in a brief search that I did. Is it possible to apply lens correction profile automatically to multiple images at once? For my RAW images, LR automatically detects the lens and applies the correction profile for an image if I manually click on "Enable lens correction" option under Develop module (in the right pane where adjustments are made). However, I would like to do this to multiple images all at once.
    Thanks,
    Osho

    Be careful using develop setting synchronization for lens profile across mutiple images! This allows applying an incorrect profile (i.e. Canon 17-40mm profile with synchronization to images shot with multiple lenses) First use the 'filter' tool to make sure you select images shot with only one (1) lens type. Then follow one of the procedures here:
    http://help.adobe.com/en_US/Lightroom/3.0/Using/WS0E6E6886-E223-4050-B6E0-A97B5B62EF7D.htm l
    You can also change the "default" develop settings with 'Lens Profile' option checked and then save as the "new default" setting. LR will then "automatically" apply lens profile correction on import of new images.

  • How does one set the DPI when resizing images in Bridge?

    I am sure I am missing something here (so excuse me if its a simple answer) but I am used to using Photo Mechanic and there you are able to set lots of variables while resizing.  I don't understand this Bridge resizing window when using Batch Processing thru Photoshop. 
    -There are two boxes for sizing.  If you put the same dimension in both does it just set the longest dimension to that size?
    -What if I want say a 10x10 inch image at 72 DPI for web use as opposed to a 10 x10 inch image at 300 DPI for printing purposes, where does one enter that info?
    Thanks,
    Joshua

    You don't "resize" anything in Bridge, nor does it set PPI, pixels per inch—and most certainly NOT "DPI" (Dots [of ink] Per Inch) which is exclusively a feature of the printer.
    Bridge is just a File Browser.  It used to be called simply the Photoshop File Browser".  It doesn't open, edit, manipulate resize or even save anything.
    It merely hands the file(s) over to the appropriate application, whether that be Photoshop, adobe Camera Raw, Illustrator, InDesign or even MS Word.
    You wrote:
    -What if I want say a 10x10 inch image at 72 DPI for web use as opposed to a 10 x10 inch image at 300 DPI for printing purposes, where does one enter that info?
    Again, you mean PPI in both instances there.
    You enter that in whatever application you're sending the image from Bridge.
    For instance in Photoshop:

  • How to get rid of flipping when loading image...

    Hi, everybody.
    I 've programed one applet loading and showing images.
    It has two part, one of both is large one, in which the picture will be shown larger.
    Another one is list of pictuers, so when I click one of them, it will be shown in large part.
    It looks like Thumbnail showing.
    The thing is when I click one image, then it is shown, but very fliped.
    In fact I didn't use bufferedImage for large picture due to out of memory.
    So, any suggestion? any help or advice?
    I'am expecting... thank you.
    genette.

    You installed the Conduit spyware. To remove it, select Go ▹ Go to Folder… from the Finder menu bar, then enter the following text in the box that opens:
    ~/Library/Application Support/Conduit
    Delete the selected item, if it exists.
    Now select Go to Folder… again and enter:
    /Library
    From the folder that opens, delete the following items, if they exist. You may be prompted for your login password.
    Application Support/Conduit
    InputManagers/CTLoader
    LaunchAgents/com.conduit.loader.agent.plist
    ScriptingAdditions/ct_scripting.osax
    Close the folder. Now press the key combination shift-command-A. The Applications folder will open. Delete this item from the folder:
    Toolbars
    Close the folder. Log out and log back in.

  • Rotate view when drawing

    I know it's not possible to do that like in Photoshop (I have submitted a feature request).
    How do you handle this problem when drawing with a tablet?

    Rotate the Tablet?

  • Flash cs5 keeps crashing when importing images.

    Flash cs5 keeps crashing when importing images onto stage.  I plan on tracing a drawing I made.  They aren't that big so I don't know why cs5 crashes.  Any ideas how to fix that? Thanks
    I'm using windows 7- 64 bit.
    Quard processor and 8 gb of ram
    Here is the error I recieve:
    Problem signature:
      Problem Event Name:    APPCRASH
      Application Name:    Flash.exe
      Application Version:    11.0.0.485
      Application Timestamp:    4badda9d
      Fault Module Name:    ntdll.dll
      Fault Module Version:    6.1.7600.16385
      Fault Module Timestamp:    4a5bdb3b
      Exception Code:    c0150010
      Exception Offset:    000845bb
      OS Version:    6.1.7600.2.0.0.768.3
      Locale ID:    1033
      Additional Information 1:    2865
      Additional Information 2:    2865b1bb537c4d5e61b79207bc968f0a
      Additional Information 3:    ddf9
      Additional Information 4:    ddf98ab5688195f8b48f91f047120c5a
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt

    I got the same problem. I tried to import into Flash cs3, cs4, cs5 - constant error in each application.
    But seems I've found the reason why this happened in my case.
    I just deleted the installed system video codecs (divx, xvid, third-party codecs).
    I do not see a direct connection with the import objects into flash. But fact, immediately after the removal of codecs it has to work.
    I suspect that the reason could be a third-party codec that is associated with playing QuickTime. Maybe.
    Also if it does not help you this way, I used a temporary solution.
    Open the psd in Adobe Ilustrator, copy images to clipboard, paste it into flash.
    In my case the images are not displayed on the screen after insert, but put into the library.
    Don't touch objects, just save the file, close the Flash.
    Launch Flash and open saved file. In my case in the first run was an error.
    Close the application and open it with file again.
    The second time the error was not followed, the images were within the document 8-)
    This option made it possible to work until the issue is not solved completely (adobe, wake up!).
    win7 64, cs5 (cs3, cs4 had the same issue)
    Perhaps it can be useful for someone.
    thx
    Sorry for my English.

  • Missing pages when printing images

    Hi,
    I'm fightig against a very strange problem when printing. When drawing images with g2.drawImage often everything is ok.
    But sometimes the output is incomplete - perhaps all pages after # 2 or # 7 are missing. Or no pages are missing but some images and later drawen elements of the affected pages are missing - next page will be ok.
    Printing 15 pages with 1 image per page goes wrong 2 times of 12 trys.
    Facts:
    - image is loaded completely (from database)
    - there are no ignored Exceptions
    - Thread.setDefaultUncaughtExceptionHandler is used - without response, as expected
    - all pages are requestet by print(Graphics g, PageFormat pf, int pi) and processed without errors
    - jdk 1.4.2, 1.5.0_04, 1.5.0_06 compatible ...
    - using g2.create() for the image doesn't help
    - problem exists on all printers which testet and Adobe-PDF-"printer"
    - increasing memory doesn't help
    - it seams as doubleBuffering=off will increase correct pages before get one damaged/missing
    - WinXP SP2
    Any idea?
    Thanks
    Stefan

    Thanks ! - and you are most "welcome" "lera1981" ! .........
    With respect to the printing problem with Reader 9.x and your report of your experiments with Reader 9.x and with network-printing then I tend to agree  with your assessment that it would seem as the problem is probably with Reader 9.x's printing capeability .
    Just for the record I would like to report that my experience with network-connected office-class HP printer has been that some printing problems I've seen in the past with Adobe Reader X.xx has been rectified though the change of driver-type and/or driver-generation such as a switch from e.g. a "PCL 6" driver to a "PCL 5" driver .   Last time I experienced a printing problem with a network-connected office-class HP printer I then had to change the driver to their "HP Universal Print Driver".
    While I would say that you are probably right that a change of printer-driver would not make a difference in your case then the point of my writing is that Adobe Reader X.xx or (it's interaction with) Windows seems to be "printer-driver tech-sensitive" understood as that Reader printing tends to respond differently to different "driver tech" !
    Kind Regards
    Fiat Lux !

  • Same shooting, multiple lenses, how to apply the appropriate lens correction when importing ?

    Hello everyone,
    How do you handle this:
    For each camera, i have a default preset i'm choosing manualy and applying when importing my raw files into lightroom.
    I'd like to also add some default lens correction to those presets.
    The problem is that multiples lenses (meaning different corrections) may be applied.
    How to apply the correct lens correction for each file, in the batch import ?
    Thanks for your ideas ...
    Aymeric

    Update your existing develop presets so that the Lens Corrections are checked (see attached screen shot). Select the develop preset in Import dialog. Lr will automatically apply the appropriate default lens profile to each individual image during import.

  • How do I get the screen to refresh when drawing a line larger than the art board

    How do I get the screen to refresh properly when drawing a line larger than the art board when the screen scrolls? Everything turns white in CS6, CS5 and CS4.

    Existing art - not the new art.  The new art just gets a proxy shape - seen in my example as the blue rectangle.  The existing art is what gets smeared as you drag past the edge of the screen.  If it's anything other than an Ilustrator thing, it's a Mac thing. I've never known it to be any other way other than maybe in the past showing blank white instead of stuttered art on probably 10 different macs over the years.
    Take any art that you've ever created.  Zoom in so that your art is bigger than your screen (so that there's somewhere to scroll).  Rectangle tool (or move, scale, rotate(?) something, or draw a line) Start your rectangle anywhere, drag so that you are at the edge of the screen, causing it to scroll.  The existing art will get all effed up.  The rectangle you're drawing will draw as you expect it to - that's not the issue.
    How does Wade take his videos?

  • HT1386 I have an iphone 4 which quit working and I had my iphone 3 reactivated until I get my 4 replaced or fixed.  My computer does not recognize my iphone 3 when I plug it in. I also cannot figure out how to apply my last backup to my iphone 3

    I have an iphone 4 which quit working and I had my iphone 3 reactivated until I get my 4 replaced or fixed.  My computer does not recognize my iphone 3 when I plug it in. I also cannot figure out how to apply my last backup to my iphone 3

    If your iPhone 4 was running iOS 5, you can't install iOS 5 on an iPhone 3G which means you can't restore the 3G from the backup of the iPhone 4 running iOS 5.
    http://support.apple.com/kb/TS1538

  • How do i enable Redaction and apply it so that when I save it NO ONE can undo it

    How do i enable Redaction and apply it so that when I save it NO ONE can undo it

    In Acrobat Reduction is a two-step process.
    1. Tools->Protection->Mark for Reduction. In this step you mark all content that you want to reduct out.
    2. Tools->Protection->Apply Reduction. Then save the reducted PDF (with a different name/location if you want to have the original available).
    The Reduction tool in Acrobat permanently removes the reducted content from the saved PDF, so that it is not there. Because of that anyone who opens saved reducted PDF cannot undo reduction because the reducted content is not even in the file.
    Make sure that you performed step 2. If you just performed step1 and saved the file, the to be reducted content is still there. This is useful wgen several people reduct the same PDF and want to see what has been already reducted.

  • How do i reset my ipod when it has the apply simply and a white line undernest

    how do i reset my ipod when has the apply simply and a white line undernest

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                                                       
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • How to change the default JRE when there are several version of JRE in Sys

    How to change the default JRE when there are several version of JRE in System?
    i have installed j2sdk1.5.0 then installed j2ee1.4,then installed Weblogic6.1 which use jdk1.3
    Now the JRE is jdk1.3\bin
    When run class that was compiled with jdk1.5,throw:
    java.lang.UnsupportedClassVersionError
    How can i change the jre to 1.5?

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

Maybe you are looking for

  • How to create a group including several  roles?

    Hi experts, Hereby a simple question but urgent, that is, how to create a group in portal which includes several roles. For exemple a group for manager contented the roles for managers and another group for employees. Thus it simplifies the role assi

  • Error in the worklist control[[WLI-Worklist:493028]Internal error: unexpect

    Hi, The exception bellow is being raised when I call the getTaskInfos from a worklist control. Caused by: com.bea.control.ControlException: Error in the worklist control[[WLI-Worklist:493028]Internal error: unexpected ejb exception.]      at com.bea.

  • Problem in updating entries in Table Maintenance of custom table

    Hi Gurus, Need help. When I update existing entries in the table maintenance generator, they do not get updated after save. Is there a setting in data dictionary that causes this?

  • Problem with group by and sum function

    In one of the report I'm using grioup by clause on one column. However when I use this function the sum function on other column is not working. Any idea how we can resolve this?

  • Error 1401 while installing of Adobe Reader 8.1.2

    Error code 1401 while installing of Adobe Reader 8.1.2 to my vista home. The pop-up menu said that @@ Error.1401 could not create key\.rmf\acroexch.rmffile\shell.new, verify that you have sufficient access to the key @@ Any of you have idea of this??