ActionScript 2.0 :: TextFields Filled With XML Data - Setting Margins

Aug 18, 2011

I have a movie in which I created several boxes with textFields inside (they are filled with some xml data). The thing is, I have to set them in place within the box, but I don't how to get rid of the space up and down the text (with a autosize true textfield). Here is an image [URL]. I would like to have the same margin top and bottom, as the the margin right and left...

Code:
for (var i=0;
i<(newsletters[target_mc.num].length-1); i++) {
var txt_mc:MovieClip = target_mc.txt_mc.createEmptyMovieClip("txt"+i+"_mc", target_mc.txt_mc.getNextHighestDepth());
[Code] .....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: TextFields Filled From A XML?

Nov 11, 2010

I've recently been trying to rebuild a project we did at work so that we'd have a better and more flexible architecture for future projects. So far all is done, and work great, but I've been wanting to make the text we use (and we use a lot) easier to modify, so I thought having it outside my Flash/ActionScript files would do it. That way, I can change the text and have it working without having to recompile.

Unfortunatly, I've noticed that having the text in a .txt file puts random linebreaks which I really don't like, but XML severely limits what characters we can put in our text (no " < and so on, unless I'm missing something). Not to mention linebreaks would/could be a pain in an XML.

So, I'm wondering if you guys would have any ideas on how to do this, or even tips on how to do it in an XML or txt file that would work.

View 2 Replies

Professional :: Change The Drawing Setting To Show The Objects Filled?

Apr 30, 2011

When I create drawing shapes I cant see any color or fill. I know there is a setting that need to be changed so I can see them. Here is a pick of what is happening on my screen

View 2 Replies

Filled Colour As A Variable / Setting Layer To Not Block Content Underneath?

Dec 10, 2009

I wonder if it's possible to take the filled colour (filled with myColor.setRGB(0x993366); like a colouring style) and set the colour filled to be a value of a variable in an if statement? if yes, anyone know how to do it?and is it possible to set a layer's content so that it does not block any button underneath it? I'm trying use that movie as a mask but I do not want it to block any activity underneath it. or is it better to use the myMovieClip .setMask (maskMovieClip)I only need the masking to appear when a specific button is pressed.

View 8 Replies

ActionScript 2.0 :: Email Data From A Filled Form?

Jan 20, 2004

I have a form that calculates totals. What I want to do is send the results by email.

I tested a simple email form with success (name, email and body message, all input txt fields). The form also works fine (thanks again bamb0006). My problem is getting the resulting data of the filled form in the email body message.

View 7 Replies

ActionScript 2.0 :: Email Data From A Filled Form

Jan 20, 2004

Here's my question: I have a form that calculates totals. What I want to do is send the results by email. I tested a simple email form with success (name, email and body message, all input txt fields). The form also works fine. My problem is getting the resulting data of the filled form in the email body message.

View 7 Replies

ActionScript 3.0 :: Setting Dynamic Widths For Textfields?

May 28, 2009

I have 3 textfields. they're in a sprite container. 1. date 2. pipe_mc movieclip 3. title field. I need to set it so that the textfield/mc/textfield;s x property changes dynamically when a shorter or longer date gets added into the field, via XML.

[Code]....

View 6 Replies

Flex :: Particular Cell Can Be Filled With Any Color In Advanced Data Grid?

Mar 15, 2010

How a particular cell can be filled with any color in advanced data grid.

View 1 Replies

Flash :: Eliminate The Difference Between Captured Bitmap Data And Filled FXG Paths?

Feb 13, 2012

I am trying to find a way to avoid using FXG in one of my applications but run into a problem where the captured bitmap is not exactly the same as the original filled FXG paths.Originally, let's say I have a 3 shapes that are adjacent to each other (you can imagine a pie chart with 3 slices). I used "cutImage" function below to capture the filled bitmap data and display the 3 pictures. However, we discovered that there is a 1 pixel gap on the side where each shape meets the other shapes. Not sure if there is any relationship, but the captured bitmap is exactly the same as displaying the filled path directly but with "cacheAsBitmap" set to true. If we just display the filled paths with cacheAsBitmap set to false, there are no gaps between the shapes

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code].......

View 1 Replies

ActionScript 2.0 :: Making A News App That Loads Xml Data And Diplays The Data Onto 3 Separate Textfields

Mar 21, 2008

Been butting my head against the wall on this one. Im making a news app that loads xml data and diplays the data onto 3 seperate textfields. The 3rd textfield has auto size set to true, so that the height of each instance of the attached movie is always going to be different from each other. I need to figure out how to get the height from each instance of the attached movie and use those numbers for the verticle tiling so that they dont run into each other.

heres what I got so far. Its the "duke news" box. If you scroll down in the news box, you will see that the text starts running into each other.

[Code]...

View 2 Replies

ActionScript 3.0 :: Textfields To Display Xml Data

May 22, 2011

I am using textfields to display xml data. I am creating a mp3 player and the textfields display the song's name, artist and album. As the code is now, the textfields display the correct information. But when another song is played. The new textfields just appear on top of the older ones. i have been unable to remove the older texfields. no matter what i try.[code]

View 8 Replies

ActionScript 3.0 :: TextFormat: Top And Bottom Margins?

Apr 10, 2008

I'm using TextFormat to format a text field and I've noticed that, while there are properties for leftMargin and rightMargin, there are non for top and bottom margins. Is there any way to add some padding to the top and bottom of a text field? My text field has a background color, and right now the text is flush with the top and bottom edges of the box, which looks ugly

View 4 Replies

ActionScript 3.0 :: Set Print Margins In PrintJob ?

Feb 21, 2009

I want print some sprite which is created by "draw(someSprite)" method in BitmapData.Everything is fine but... I want put some margins in my print page, and I don't know how .Of course I could set right position of my "someSprite" but I don't want change my site to print it. (Using Rect... in BitmapData.draw() and addPage() dont work.) Simple flashdevelop project is in zip file.

Code is below

ActionScript Code:
package
{
import flash.display.*;

[Code]....

I don't want to change position of "printBitmap" - alternatively "bitmapData" - or anything else.

View 0 Replies

ActionScript 3.0 :: HtmlText And Stylesheets - No Control Over Indents/margins?

Jun 5, 2008

I'm trying to figure out htmlText in Flash, and a number of things don't seem to be working:

- The first line of each paragraph is slightly indented. I can't seem to find a setting to remove this.

- There doesn't seem to be any way to control the amount of space before or following a paragraph. Setting "marginBottom" doesn't do anything - and of course it's not defined in the class anyway.

- Can't control how indented <li> elements are, or how much space is before/after them.

Is there any way to get more precise control over formatting of text, using style sheets or some other method?

View 4 Replies

ActionScript 3.0 :: Get Control Over Page Margins When Working With PrintJob

Aug 29, 2011

I just step into the task of printing jobs in as3. All I have to do is to print the text in a dynamic text field which is in a movieclip. The text filed has a scroll bar to show the rest of the content. I am using the following lines of code to print the page.
 
pJ.addPage(txtContainer)
 
I have also tried printArea and pageHeight,pageWidth, paperHeight, paperWidth properties. But still I am not able to control the margins of page.

View 3 Replies

Flash CS3 :: Printing - Dynamically Set Print Page Margins?

Oct 29, 2009

//I can get the right margins by defining a rectangle and giving it the following dimensions:

var rect1:Rectangle = new Rectangle(0, 0, 792,612);

//When the print button is pressed the following code executes using the dimensions defined by rect1:

prntCover_btn.addEventListener(MouseEvent.CLICK, printCover);
function printCover(evt:MouseEvent):void {
front_mc.visible = false;

[Code]....

This is not working to place the mc correctly on the page. This is all the Adobe help provides. Also Googled and tried different variations but no success.

View 1 Replies

ActionScript 3.0 :: Set Left And Right Margins In Textfield To Be A Certain Amount Of Inches?

Dec 27, 2010

I am trying to set left and right margins in textfield to be a certain amount of inches. How can I do this if the margin can only be set in pixels?

Won't it change whenever the resolution change?

I want the textfield in the application to be exported as a document file and printed. Is there anyway to set the margins that they are always the same no matter what computer or resolution it is on?

View 2 Replies

Flex :: Mxml - Change The Margins Inside Cells Of A DataGrid?

Nov 17, 2010

I am using the following code to insert a DataGrid object into a basic Panel:

<mx:DataGrid borderThickness="0"
height="120" dataProvider="{collection}"
rowHeight="12" fontSize="9"
showHeaders="false" verticalGridLines="false">
<mx:columns>

[Code]...

View 1 Replies

Data Integration :: Setting Parameters Flash From Php?

Apr 6, 2007

I would like to set these parameters in flash using a php/mysql database :

button1.maxQuantity
button1.name
button1.option1Name
button1.option1Value
button1.price ;

How would I go about doing that?

View 13 Replies

Php :: Setting Session_id Unreliable When Using Flash To Send Data?

Jul 31, 2010

I'm using PHP version 5.3.2 on both my local development server and remote web server.I'm trying to use uploadify to upload several files to the server. In the receiving script, I would like to use data stored in the session, however because uploadify sends files to the script using flash it doesn't send the session cookie.The workaround for this problem is to get uploadify to GET or POST the session id to the script, however I'm finding this very unreliable.In my script I have the following:

<?php
ini_set('session.use_only_cookies', FALSE);
ini_set('session.use_trans_sid', TRUE);

[code].....

View 2 Replies

Flex :: Setting SelectedColor Of ColorPikcer When Binding Data

Jul 5, 2011

How do you set the selectedColor of a colorpicker when you bind data from a database? I have a bindable variable, objProject, with a field called color and it has a color code such as #ff00ff in it. I want to set the selectedColor. I tried to cast the color as a uint, but no joy.

objProject = cmbProject.selectedItem;
c = uint(objProject.color);
<mx:ColorPicker id="graphColor" x="17" y="219" width="128" height="40"
selectedColor="{c}" editable="true" />
I did try selectedColor="{objProject.color}" and that didn't work either.

View 2 Replies

ActionScript 2.0 :: Loading Data From An Xml-file And Dynamically Create Movieclips With Textfields Inside Of Them Return "undefined"?

Oct 22, 2004

i'm loading some data from an xml-file and dynamically create movieclips with textfields inside of them, but I'm kinda stuck. I'm not up to the point where I completely understand how you can refer to a nested object using this syntax: _root[movieClipName]. If you want to nest something inside of that movieclip, you have to work like this:

[Code]...

View 1 Replies

ActionScript 3.0 :: Setting ComboBox Default Selection Using Data Field?

Jul 20, 2009

I've got a comboBox with defined data and label fields. On Event.CHANGE I capture the data field. I need the comboBox to default back to the user selection if they should navigate to another screen and then come back. Normally I've got an array of labels that I can use to just lookup the index: comboBox.selectedIndex = labelArray.indexOf(user selection); In this case I don't have labelArray. What I really want to do is something like this (only with real AS, not fake):
 
comboBox.selectedData = storedDataString or, if the data array is accessible: comboBox.selectedIndex = comboBox.data.indexOf(user selection); Is there an easy way to do this, or should I just suck it up and add yet another global label array?

View 2 Replies

ActionScript 2.0 :: Setting ComboBox Default According To Shared Object Data?

Dec 4, 2006

I have a Flash Form that is fairly long (about 8 short pages), so I have set the form up so that it can be reviewed when the filler-outer is done and they are ready to submit it. I'm using a Shared Object to store the information they enter so they won't lose their information if they hit refresh or need to come back later.

If they go back to the page with comboboxes on it, the comboboxes have reset to the default. The answer and data in the SO haven't changed, but it looks like it to the consumer/viewer.

So, I'd like for the boxes to display the choice they picked when they were on that page. I need use the value from the database to show the particular value in the ComboBox whenever the user returns to that page.

View 4 Replies

Actionscript 3 :: How To Declare A Filled Vector

May 27, 2011

I am using Vectors in Flash 10 for the first time, and I want to create it in the same way I used to do with Arrays, e.g:var urlList : Array = [url1, url2, url3];I have tried various different methods but none seem to work, and I have settled on the following as a solution:

var urlList : Vector.<String> = new Vector.<String>();
urlList.push(url1, url2, url3);

View 2 Replies

ActionScript 2.0 :: Dimensions Of Dynamically Filled MCs?

Nov 5, 2004

i have the following code:

[AS]
MovieClip.prototype.blattkopie = function(bildpfad, bildanzahl, bildbreite, bildhoehe, spalten, abstand) {
y = 0;

[Code]....

But: getBounds always returns that the MC has no dimension (x,y), also with _height or _width, the MC is always taking up zero space. is there any solution to return the dimensions for the state after it was filled dynamically by the createEmptyMovieClip and loadMovie functions?

View 3 Replies

ActionScript 2.0 :: Check To See If All Variables Are Filled In?

May 26, 2004

I have a form that uses PHP to check to see if all variables are filled in. I have a button with

on (release) {
formcheck();
}

that checks the formcheck function and then sends the form or gives a popup that tells what part of the form needs to be filled in.

My problem is that I have a movie that I'd loike to act as a button. I've done this before with any other command (gotoAndPlay, getURL, etc), but the

on (release) {
formcheck();
}

does not work with a mc button, only with a regular button. Does anyone know a way around this, or why it does not work?

View 4 Replies

ActionScript 3.0 :: Dynamic Text Filled By Key Stroke?

Nov 16, 2008

I have set up the the user clicks a key and gives me the output of what they clicked however how do I put it into a dynamic text field.I am having trouble with the AS3 code for it.Here is what I have so far.

package AS {
import flash.display.MovieClip;
import flash.display.DisplayObject;[code].....

View 2 Replies

Flash :: Possible To Check If Mask Is Completely Filled?

Sep 6, 2011

With brush_mc you can brush over a mask, wich turns the pixels to transparent in brush strokes.So visually it erases the mask and the masked movieclip appears. I want to trace, if the mask is completely turned transparent. Is it possible to check if the mask is turned completely transparant without bitmapdata?

// this creates a mask that hides the movieclip on top
var mask_mc:MovieClip = new MovieClip();
addChild(mask_mc)

[code]....

View 2 Replies

ActionScript 2.0 :: Draw A Filled Rectangle With No Border?

Mar 25, 2006

I'm trying to draw a filled rectangle with no border. Here's the code for my test project:

ActionScript Code:
myMC = this.createEmptyMovieClip("", this.getNexthighestDepth()-1);
myMC._x = 0;

[Code].....

If you take a look at the coordinates, this was suppose to draw a 180x22. Well, it looks lika it draws a 180x22 rectangle, but only if the zoom is at 100%. If I zoom in on the flash player, there are two problems:

1) the line, as it is scaled, goes over the shape edge. Basically, as the border line has 1 pixel, Flash starts do draw it half pixel up and half pixel left; 2) the rectangle is in fact a 179x21 pixels, instead of the 180x22.

I'm sending an example project on an attachment. In this example I have 2 vertical rectangles which act as buttons:

1) the first button draws the rectangle step-by-step;
2) the second button cycles through 3 different styles:
2.1) line with 1 pixel, normal border rescale. This is the style at start;
2.2) no line;
2.3) line with 1 pixel, no border rescale.

The background is a checker texture, with 1 pixel per square. This gives you a perfect look on how the line is drawn.

The drawing instructions are executed on the yellow movieclip, which serves as reference, considering that it has the desired dimensions (180x22). *

If you zoom a couple of times you'll be able to see the problems I'm experiencing.

All you have to do is to click the first vertical button several times to draw the lines, to press the second vertical button to reset the draw and to change the border style, and finally to look at the draw with some zoom in, in order to see it in detail.

So, what can I do in order to draw a perfect rectangle, meaning that the border will not go outside the shape (it would be nice that when the border is rescaled, it does it inside the boundaries of the shape) and the rectangle has right dimensions (why am I missing one pixel in each direction?).

* By the way, is there a way to draw in a movieclip using the lineTo in such a way that the drawing is on the topside instead of the bottomside? I had to make the yellow rectangle partially transparent in order to see my drawing.

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved