https://linen.dev logo
Join DiscordCommunities
Powered by
# openfl
  • yeah, the range for gradients is 0-255. or 0x00-0xFF, if you like hexadecimal.
    r

    rhythmic-wolf-50922

    04/10/2023, 3:15 PM
    yeah, the range for gradients is 0-255. or 0x00-0xFF, if you like hexadecimal.
  • 255 is not a pixel value. it's more like 0% - 100%, so if you want it to be 255 pixels, you need to do some math.
    r

    rhythmic-wolf-50922

    04/10/2023, 3:27 PM
    255 is not a pixel value. it's more like 0% - 100%, so if you want it to be 255 pixels, you need to do some math.
  • yeah, it's kind of weird. I'll bet the original folks at Macromedia wished they had done 0.0-1.0 instead. that would be more consistent with other Flash APIs (like scaleX/scaleY, for instance).
    r

    rhythmic-wolf-50922

    04/10/2023, 3:43 PM
    yeah, it's kind of weird. I'll bet the original folks at Macromedia wished they had done 0.0-1.0 instead. that would be more consistent with other Flash APIs (like scaleX/scaleY, for instance).
  • like, to get the colors, i would need to get the colors no matter the width?
    e

    enough-lawyer-1858

    04/10/2023, 3:56 PM
    like, to get the colors, i would need to get the colors no matter the width?
  • I feel like maybe you just need to play around with it. there are a lot of parameters in the beginGradientFill() API that can change how it behaves, so it's difficult to know if I'm answering your question correctly or not.
    r

    rhythmic-wolf-50922

    04/10/2023, 4:04 PM
    I feel like maybe you just need to play around with it. there are a lot of parameters in the beginGradientFill() API that can change how it behaves, so it's difficult to know if I'm answering your question correctly or not.
  • a

    able-printer-41379

    04/17/2023, 2:38 PM
    how and where are openfl events dispatched at 🤔, like ENTER_FRAME
  • r

    rhythmic-wolf-50922

    04/17/2023, 3:42 PM
    events are dispatched from many different classes, so there isn't a single place. however, a number of core events, including
    ENTER_FRAME
    , are dispatched from the
    Stage
    class.
  • d

    damp-artist-60225

    04/18/2023, 3:12 AM
    I've been trying for hours to send cookies with an URLRequest, but it seems nothing I try works. I can send them through Thunder Client, so I'm guessing it's not an issue with the server. Is there something special that needs to be done to send cookies with openfl?
  • m

    modern-quill-15664

    04/18/2023, 12:45 PM
    Is it possible to run a process in background and redirect the window output to a openfl sprite or something?
  • r

    rhythmic-wolf-50922

    04/18/2023, 3:38 PM
    cookies should work on most targets, I think. at least ones set by the server. I seem to recall that they don't work on HashLink yet, though.
  • r

    rhythmic-wolf-50922

    04/18/2023, 3:40 PM
    there is an
    openfl.desktop.NativeProcess
    class to run a process in the background. you can listen for a standard output event and do whatever you want with the string it returns.
  • m

    modern-quill-15664

    04/18/2023, 3:41 PM
    Any way to redirect the like display of the window
  • r

    rhythmic-wolf-50922

    04/18/2023, 3:41 PM
    I'm not sure what you mean
  • m

    modern-quill-15664

    04/18/2023, 3:42 PM
    Like running chrome in the background and making the rendered page display in openfl
  • r

    rhythmic-wolf-50922

    04/18/2023, 3:42 PM
    no, probably not possible. maybe there's a way to create your own C++ native extension, but that's unlikely to be easy.
  • m

    modern-quill-15664

    04/18/2023, 3:42 PM
    Or anything like even a game
  • e

    elegant-twilight-61392

    04/18/2023, 8:35 PM
    you would need to hook into the applications renderer, and how to do that differs between rendering apis, and some apps just use native ui. this wouldnt be something built into openfl or lime, and would be very hard to inplement. consider sharing what your actual goal is and maybe someone knows a better solution
  • d

    damp-artist-60225

    04/22/2023, 11:20 AM
    For some reason the .build file in one of my projects stopped updating. If I create a new project it works... what could have gone wrong? I don't really know how the file is created, so I don't know where to look
  • b

    broad-gpu-14081

    04/22/2023, 2:25 PM
    Did you try to delete
    .build
    file?
  • b

    broad-gpu-14081

    04/22/2023, 2:33 PM
    I suppose it is line 1262 inside
    lime/tools/CommandLineTools.hx
    . When you change the code run
    lime rebuild tools
    to recompile lime tools and make your changes work.
  • d

    damp-artist-60225

    04/22/2023, 2:37 PM
    I did try deleting it, it doesn't appear when I build again
  • d

    damp-artist-60225

    04/22/2023, 2:37 PM
    Thanks for the tip, I'll see if I can find anything
  • t

    thousands-state-46635

    04/22/2023, 8:52 PM
    is hxCodec only available on Windows machines? I'm on Linux and I'm trying to use it but it seems like it's not implemented, or atleast vscode is lying to me.
  • t

    thousands-state-46635

    04/22/2023, 8:53 PM
    (https://github.com/polybiusproxy/hxCodec)
  • t

    thousands-state-46635

    04/22/2023, 8:55 PM
    wait i just had a typo and wrote instead of thats why it wasnt recognizing hxCodec 😭
  • t

    thousands-state-46635

    04/22/2023, 9:15 PM
    I do get this error when trying to compile with hxCodec though I have vlc installed, soim not sure whats my issue
    Copy code
    /usr/bin/ld: cannot find -lvlc: No such file or directory
    /usr/bin/ld: cannot find -lvlccore: No such file or directory
    collect2: error: ld returned 1 exit status
  • t

    thousands-state-46635

    04/22/2023, 9:19 PM
    installed libvlc-dev, so the -lvlc error no longer shows up but the one for vlccore does
  • t

    thousands-state-46635

    04/22/2023, 9:20 PM
    oh libvlccore-dev is a library, ill try it out
  • t

    thousands-state-46635

    04/22/2023, 9:20 PM
    well now it compiles
  • e

    enough-lawyer-1858

    04/22/2023, 10:23 PM
    is there a way to get the output of a shader and plast it onto a bitmapData?
1...495051...57Latest