C# :: Determine Portion Of Font Rendered To Left Of Black Box?
Jan 12, 2011
I have a font - 'Saginaw' that when renders has some portion of the glyph to the 'left' of the starting position/box: [Picture here] [URL] The above snip is of the font in Photoshop.. I did a 'select all' to show the black box.. I'm trying to figure out what that offset/value is [portion of the W rendered on the left outside the box]
client decided on a different font (after we finished everything), so i had to go change the font. in one page, whenever i change the font in one text block, the XML-driven lists stop being rendered. they load, according to the trace statements, but nothing actually renders. when i change it back to the original font, boink! everything is just fine. if i delete the text and create a new field... same thing. i finally had to hide the thing and make a new text block in it's place.
Does anyone know of a way to determine if a glyph is available for a system font, as returned by Font.enumerateFonts()? It turns out Font.hasGlyphs only works on embedded fonts set to export for ActionScript.
Is it possible to convert an image (runtime) in Actionscript 3.0 from black/white to black/*color* ...Does someone know a solution? Matrix? Blending methods maybe? Pixel bender?
I have a list of fonts obtained via Font.enumerateFonts() and I want to display them all as 12 pixels tall. The problem is that I cannot simply set the point size because this can vary in actual pixel size for each font. So basically I want to determine what the correct point size is for a font in order to make it exactly 12 pixels tall. Because I'm doing this with a potentially large list I'm looking for an efficient method to do this.
I'm trying to embed a font in my project by using url("font.ttf") rather than local("Font Name"), but it doesn't seem to pick it up. The font in question is called "Gotham Bold". When i view the details of the font, the font weight is regular, however when i use local("Gotham Bold") in the css i have to specify fontWeight: bold or else it wont pick it up. But when I use url("folderGotham-Bold.ttf"), and specify fontWeight: bold, it says that font weight is not found for that TTF. If i remove the fontweight, there's no errors, but the font is not applied to the text.
i hav a left right moving thumbnail gallery from xml, i need that on the last image image come on focus from the left side so automatically the left button will be disable or opacity goes 0 anything and same thing from right side also.
I have a series of thumbnails that should scroll from left to right & right to left when you roll over the movie clip buttons on either side. IT was working in another flash movie, but I moved it to a different flash file and now it's not working. The hit buttons within the movie clip buttons have this action script:
looking to create an image/mc slider that moves form right to left via user clicks of a left and right button.I would assume I would create an array to hold a series of mc's in (my images) and then tell the left and right buttons CLICK events to move linearly through the array (displaying next in line and previous etc.
I've some components with dynamic heights. They have to be aligned with respect to the bottom of my canvas container, so I cannot set the same y for all components.
I could compute their heights and successively set the y but I was wondering if there was an easier way to do it.
I have an Image called "PanoramaImage" (which is very long in width). I want this image to move from right to left & from left to right automatically.
I am using flash as3. I am loading this image from the same folder where the .fla file exist. my image to move by using Up & Down arrow keys.
The following is the sample code i found on web.
var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, completeHandler); loader.load(new URLRequest("panorama.jpg"));
I have an Image called "PanoramaImage" (which is very long in width). I want this image to move from right to left & from left to right automatically.I am using flash as3. I am loading this image from the same folder where the .fla file exist. Right now I have the code which will help my image to move by using Up & Down arrow keys.The following is the sample code i found on web.
var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, completeHandler); loader.load(new URLRequest("panorama.jpg")); var content_mc:Sprite = new Sprite();
My vision is to have a colored square at the top of the site Im working on which should span across the entire browser window. I have created a square 1280 x 100 pixels in size and imported it to the stage, alignment is set to x=0, y=0 ad alignment. The scene is the same size as the square I 've imported. When I view my Flash creation its displayed 8 pixels from the top left corner of the browser window. The flash file only contains the square and nothing else. take a look at the 3 files I've attached: issue-scrreen1-3.jpg. The first 2 screens are my Flash, properties and library screen shots. The third screen shot is my browser window.
I am creating an animation with sound.The sound syncs with objects.Everytime I synch an object with a sound, I test the animation out by hitting cmd+enter.Is there a way to only test out a certain portion?It's a big time waste to test the whole animation every single time.
The problem is not playing part of an mp3, I know that can be done. But I'd like to cut down on bandwidth by loading a specified two-minute portion of each mp3. These files can be up to 20mb, and since users will play many of these songs (and probably move on after a minute or two of listening), it would be very inefficient to load the whole mp3. Can this be done or is there another method you can suggest? Possibly a server side script that slices and/or lowers the mp3's bitrate?
This should be straightforward, but I'm having problems getting a portion of a string from a dynamic textfield, which I need to manipulate. Say I have a dynamic textfield onstage that successfully gets populated with some data from a query string e.g.
Code: FlashVars: 352746583part1
So basically I want to get a hold of the part after FlashVars: for further manipulation. I've tried something like this: (assuming that above text is visible in a textfield called t1)
I've been trying to develop a custom button that can better fit my needs, however I have had a problem with it: it is not showing up. I can't really see why.
I have a Template that I bought for a client that wanted it. It has background looping music and my customer wants to add videos (FLV), no problem. Now she wants the background music to sop when the FLVs are playing and start when I exit the FLV and go to another portion of the site. I hope I am being clear.
I need the background music to sop playing when the FLV videos are playing. I have Google and found nothing really.
I am trying to use a MC instance name inside of a function from an event listener. How the hell do I use only part of the instance name example: MC instance names are "size1", "size2", etc. I want the numbers only. I have been looking for hours.
3D Rotation I'm trying to rotate a diamond... and I already have a flash file which can do this left to right when the cursor moves over it... though I'd really like one like the linked plane file.I believe this is constructed using 16 left/right renders, done 17 times in terms of up/down rotations.
I've used, for the first time, the htmlText method to render the text in my textfields as html text that is provided by a xml. So in the xml i introduce the html tags. Don't have experince with this so i'm asking you how can i do it properly? Every time i use a tag except <p> i get another extraline. For instance: "This is my text. <b>Starting</b> with a boldy little line."
I need to know which part of the text is been modified by the user inside a Flex TextArea. I'm listening to TextArea's Event.CHANGE and my code run on everychange but i don't know what the user have done to the text and it's too long to process it again at every keypress or paste
We are still with Flex 3.5 but i may consider Flex 4 if the solution is easier.
I'm trying to solve a similar problem as was described here - to create a Windows Service for taking snapshots of rich webpages (html+js+flash) and saving them to a PDF file.
The bundle Firefox+cmdlnprint did the trick for me. I wrote a simple program running as a service that invokes Firefox to make a PDF. All seems well, the PDF gets created, but Flash is completely missing. Although, when started not as a service, Flash renders just fine.
Can anyone shed a light on what blocks Flash from rendering and if there's a workaround?
I'm working on a SmartVersioning ad using MediaMind using ActionScript 2 (the publisher doesn't allow AS3).
Skipping over how it's implemented - basically what I have is a collection of MovieClips on the main timeline that contain a swappable image (through the Smart Versioning service). You can only define objects as Smart Versioning objects if they are on the main timeline.
What I'm doing with this is using BitmapData to use the assets on the main timeline as a source for the graphics throughout the animation.
Should be as easy as:
import flash.display.BitmapData; var bmd:BitmapData = new BitmapData(143, 230, true, 0); bmd.draw(_root.person1); attachBitmap(bmd, getNextHighestDepth());
I have done this a million times in AS but not quite getting it in AS3.. maybe my brain is just fried..i have a rectangle_MC that is moving around the stage.. inside that rectanlge_MC i want to constantly redraw the stage, well only the portion of the stage that is covered by the rectangle..o if my rectangle for instance is currently at x:60 and y:80, and its demensions are 200x200, want it to redraw just the ares of the stage that starts a x:60, y:80 and goes to x:260 and y:280..
I have multimoduled application and I need to monitor when the mouse is moving or not moving on a protion of my swf file.The app is consisted of video player , text part and video list on the right.So I want monitor when the mouse is moving just over the video player not the whole swf application.I have this function
Code: vidPlayer_mc.addEventListener(Event.ENTER_FRAME, checkMouse); function checkMouse(e:Event):void { if (sw==0) {
[code]....
I use vidPlayer_mc.mouseX/Y; property but i doenst seem to work.I need the functionality when mouse moves over video player the playbar on the bottom shows up and vice versa.