Professional Web Applications Themes

Maintain alpha transparency. ^Help^ - Macromedia Director Basics

Hello, thank you for taking the time to look into my challenge. I found this script to does everything I need except maintain the 32 bit alpha transaparency of the images in the external folder. The script dynamically imports the items (which is exactly what I want), sadly it trims the whitespace. Any help would be most welcome. Thanks in advance. global myDirectory, mytmpDir, fileList, fileCount, fieldList, dirSelect, currentFile global myScale, hozSize, vertSize, newFileLocation, fExtension, myField global fCurrentFrame, fTotalFrames, fMakerLength, fMakerPosition, fPercentage global pNum, tpNum on prepareMovie myDirectory = the moviePath&"images" put myDirectory into field("myDirectory") getFiles end on startMovie -- ...

  1. #1

    Default Maintain alpha transparency. ^Help^

    Hello,

    thank you for taking the time to look into my challenge.

    I found this script to does everything I need except maintain the 32 bit alpha transaparency of the images in the external folder. The script dynamically imports the items (which is exactly what I want), sadly it trims the whitespace. Any help would be most welcome.

    Thanks in advance.

    global myDirectory, mytmpDir, fileList, fileCount, fieldList, dirSelect, currentFile
    global myScale, hozSize, vertSize, newFileLocation, fExtension, myField
    global fCurrentFrame, fTotalFrames, fMakerLength, fMakerPosition, fPercentage
    global pNum, tpNum

    on prepareMovie


    myDirectory = the moviePath&"images"
    put myDirectory into field("myDirectory")
    getFiles

    end

    on startMovie
    -- go "start"
    end


    on getFiles tmpDir



    fileList = [ ]

    repeat with i = 1 to 1000
    n = getNthFileNameInFolder(myDirectory, i)
    if n = EMPTY then exit repeat
    fileList.append(n)
    end repeat

    fileCount = filelist.count
    put "Number of files = " & filelist.count into field("myFileCount")

    fieldList = []

    repeat with i = 1 to fileCount

    importFileInto (member(i,2), myDirectory & "\" & fileList.getAt(i))
    end repeat

    end if

    end



    Green Edges webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Maintain alpha transparency. ^Help^

    Look up the importFileInto command in Director help, and take note of how you can turn trimwhitespace on and off. Everything you need to know is right there.

    Also, try different file formats to import from - some support alpha transparency and some do not.

    Andrew Quested
    [url]http://www.quested.com.au[/url]
    Questy webforumsuser@macromedia.com Guest

  3. #3

    Default Re: Maintain alpha transparency. ^Help^

    Thanks for taking the time to respond to my question...I really appreciate it.
    The solution was to add the #dither and #whiteSpace value to 0.

    Cheers


    Green Edges webforumsuser@macromedia.com Guest

Similar Threads

  1. Alpha in Targa, not transparency
    By Ken Warren in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 6
    Last Post: November 27th, 06:48 AM
  2. ImageGlue.NET flash export alpha/transparency
    By wizdave@gmail.com in forum ASP Components
    Replies: 1
    Last Post: July 10th, 11:59 AM
  3. images with alpha transparency flashing
    By tacbob in forum Macromedia Director 3D
    Replies: 2
    Last Post: March 20th, 07:20 PM
  4. What is the best way to maintain synchrony?
    By Aaron in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: April 21st, 04:08 PM
  5. Maintain appearance
    By Shawn in forum ASP Database
    Replies: 6
    Last Post: July 9th, 03:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139