You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to HaxeFlixel
Hello!
I'm new to HaxeFlixel but I have some experience with OpenFL. I want to set the width of my sprite to be the width of the screen. In OpenFL I would do this using sprite.width = Lib.current.stage.stageWidth. But I don't know how to do this in HaxeFlixel.
So if you know how to do this, please help me!
Andrei Regiani
unread,
Sep 26, 2015, 9:56:57 AM9/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to HaxeFlixel
Try this
var scaleRatio:Float=FlxG.width / sprite.width; sprite.scale.set(scaleRatio, scaleRatio);
dexxz
unread,
Sep 26, 2015, 1:18:03 PM9/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxef...@googlegroups.com
This makes the sprite fill almost all the width but there is still 1/4 of the sprite width left unfilled.
SARFEX
unread,
Sep 26, 2015, 6:32:02 PM9/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message