Dynamic Object Resizing Runtime
hello everybody
I am working on a project where we have to resize an object on runtime .ie it will have a bounding box from where user will change its size.but i dont have much idea about it .I tried it with movie clips changing there size with mouse position but what about the bounding box.
Help me out of this
Thanks in advance
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-02-2007, 10:37 AM
View Complete Forum Thread with Replies
Sponsored Links:
Resizing Dynamic Movieclips At Runtime
Hi guys,
I have a CS3, AS3 application I'm working on where I create instances of movieclips at runtime by clicking a button.
I would like the user to be able to resize these movieclips the same way the designers do by using the free transform tool to stretch it.
I know this is possible as I've seen it on other websites. Unfortunately I do not have a clue how to even start this and I've been searching for a while so any hints, tips or working examples would be very much welcomed,
thank you
View Replies !
View Related
[F8] Dynamic Scaling Object Runtime
hello everybody
I am working on a project where we have to resize an object on runtime .ie it will have a bounding box from where user will change its size.but i dont have much idea about it .I tried it with movie clips changing there size with mouse position but what about the bounding box.
Help me out of this
Thanks in advance
View Replies !
View Related
Resizing Dynamic Object Boxes
Ok, this might be hard to expain, but here goes.
I am creating floating windows in flash using an array and multiple buttons. Each buttons calls the graphic, sets the content, be it an external swf or a jpg, sets the title, and displays it. The window is dragable and sizable. All the components of the window are sized/positioned by my dragBox mc.
The problem I am having is that I want to set the INITIAL size of the box. I have tried targeting my dragBox in many different ways, I know all the paths are correct because I can change the opacity of it. It just does not want to respond to _width or _height.
If anyone has any ideas they would be greatly appriciated,
thanks for taking time to read this,
Henry + Chester
View Replies !
View Related
When I Rotate A Dynamic Text Object, The Text Disappears At Runtime
Can someone explain why the text of a dynamic text object disappears at runtime when rotated?
It happened when I rotated a MovieClip object via actionscript that contained a dynamic text object. So, to test whether this happens all the time, I created a movie clip again with a dynamic text object in it, populated the dynamic text object with a single letter, and rotated it by hand and ran the movie - the letter disappeared.
LOL in a happy, rare accident, I discovered the answer myself. Page 432 of the Flash 8 Actionscript Bible says, "Aside from just allowing text to look the way you want it to look, embedded fonts actually enable your Textfield objects to do some things they wouldn't otherwise do. For example ... a TextField object that uses device fonts (nonembedded fonts) cannot be rotated nor can you change the alpha. But once you embed the font, you can do both of these things."
Alright - now to embed that sucker...
How: (for dynamic or input text objects) clicking the Embed button in the Property inspector.
Note, this will increase the size of your swf. Just embedding the lowercase and uppercase letters from a-z of one font increased the swf filesize from 3-9KB.
View Replies !
View Related
Resizing Stage At Runtime
Hi,
What i am trying to do is create a small flash movie that i will use as my home page. What i want is two horizontal lines that extend the entire length of the browser window no matter what resolution you are viewing it at. I plan to have some content in between these lines. An i want them in the center of the viewable browser area. I do not want the content to be resized at all. Such that when the browser is resized the content remains the same size but just shifts location to be in the middle of the viewable region
eg.
----------------------------------------------------------------
logo a few nav buttons an image
----------------------------------------------------------------
How do i think about starting this? Do i start with a stage of size 1024x768 and use action script to detect the screen resolution and draw lines to fill this? Do i use javascript to do any of this? I've been messing around with this for a few days now and have become somewhat frustrated. Any help would be appreciated.
thanks
Andy
View Replies !
View Related
Resizing Images At Runtime
I have a flash 8 file that I pull in images through an xml document. I have them loading into a movieclip instance, but becuase there is a lack of realistate, the images are pretty small. Is there a way I can have the end user click on or drag the picture to a larger size for viewing?
View Replies !
View Related
Resizing Objects At Runtime With Mouse
I want to put together a web site entirely with flash. On one page, I will be displaying pictures with a description beside them. (Each description may be several paragraphs long.)
I want the user to be able to left click the mouse and pull the picture size to a larger size. (It is okay if this process overlaps the description, although it might be nice to have 'splitter window' functionality where the description is also resized.)
Where can I find documentation on how to do this?
View Replies !
View Related
Resizing Pictures Loaded At Runtime
I'm writting a small script that loads pictures at runtime and then displays them in several sizes (2, actually =P). The thing is, I managed to load the pictures and everything, but I'm not beeing able to resize them to my needs. What I have so far is something like this:
//------------------------------------------------------
// Variables
//------------------------------------------------------
var pictureList:Array = new Array();
var vars:LoadVars = new LoadVars();
var picturePath:String = new String(".");
//------------------------------------------------------
// loadList
//------------------------------------------------------
loadList = function() {
var i:Number;
// Load list
for (i=1 ; i<=vars.picCnt ; i++)
pictureList[i] = vars["pic" + i];
// Load pictures
_root.createEmptyMovieClip("largeDisplay", 1);
largeDisplay.loadMovie(pictureList[1]);
// :: TODO :: TODO :: RESIZE HERE!
}
//------------------------------------------------------
// Main script
//------------------------------------------------------
// Load picture list
vars.load(picturePath + "/pictures.lst");
vars.onLoad = loadList;
I tryed using "largeDisplay._width = nSomething" but whenever I do this, the presentation just goes blank (no picture is displayed).
Does anybody know what's wrong?
Best regards
View Replies !
View Related
Creating An Object At Runtime
hello, im somewhat new to action script and im slighlty confused, i have an object that has an instance name "bullethole", everytime i click on a button i want a new bullethole to appear at the position i click,
any ideas?
View Replies !
View Related
Urgent(bring Object To Top On Runtime)
hello all
I have 4 movieclip ,each moviclip contain one button when pressing this button the movieclip will start drag and when release it will stop drag.
so I want to bring the movieclip which is dragged to top
is that possible please tell me
and if you want to tell you more details just mention.
thanx
View Replies !
View Related
Drag Runtime Object WITH REALTIME Tracking
I know how to use startDrag() and stopDrag() on a movieClip, but HOW do you find out where it is and track it WHILE it is being dragged?
Is there some sort of onMouseStillDown or some other event that can be run while the mc is being dragged? Is there a property that I can watch during the drag? Will the _x and _y of the MC keep changing during the drag?
Thanks
View Replies !
View Related
Tinting An Object At Runtime Without Breaking Tweens
hi everyone,
I'm currently quite stumped at something I think should be possible.
I have a complex object that is motion tweened, and I want to change its tint at runtime.
However, it seems whenever I try to set a tint (or to that matter even try to set anything in the transform object) it resets the entire matrix/transform data. So I am stuck with a scaleX/scaleY of 1, and a static object with the color I tinted to.
A demo of what I am trying to do is here:
http://www.mediafire.com/?nzsebpjzdbg
Any idea how and why this happens?
Thanks,
Ehud
View Replies !
View Related
How To Change Appearance Of Selected Object At Runtime?
Hi all,
I created a little application that allow the user to drag some objects
around the movie area.
But I cannot find a way to change the appearance of the selected object
while dragging it and resetting his appearance to default once the object
is released.
What can I do to achieve something similar?
It could be enough to change the alpha properties (aplha 30) by using the
setproperty command, but even if I can change it while dragging, once I
drop the object (stopdrag) the alpha is not changed to default (100).
Any suggestion will be really appreciated.
tia
tony :(.
View Replies !
View Related
Resizing Object
hi,
i found this code for resizing, to fit a jpg everytime it's loaded. Anyway here it is.
// All the credits go to Gorlim from www.flashxpress.net
// You need 2 clips in the library: btn and fond
cmpt = 0; //handles depth to attach
maxWidth = 500; //of an image
maxHeight = 500; //of an image
nbEtapes = 20; //nb of steps for the resize
images = ["dv_02_17", "dv_02_16"]; //names of the pics without ".jpg"
this.attachMovie("fond","fond", cmpt++);
//loadJpg called when you click a button
loadJpg = function () {
jpg._xscale = jpg._yscale=100;
//load the file corresponding to the button
jpg.loadMovie(images[Number(this._name.substr(3))]+".jpg");
//check the loading
fond.onEnterFrame = function() {
if (jpg.getBytesTotal()>0 && jpg.getBytesLoaded() == jpg.getBytesTotal()) {
// it's over. We hide the pic until the end of the resize
jpg._visible = false;
// resize the image if pic too big
if (jpg._width>maxWidth || jpg._height>maxHeight) {
jpg._xscale = jpg._yscale=Math.min(100*maxWidth/jpg._width, 100*maxHeight/jpg._height);
}
// total width of the container
fondWidth = jpg._width+btns._width+20;
// increment
deltaX = Math.round((fondWidth-fond._width)/nbEtapes);
fondWidth=deltaX*nbEtapes+fond._width;
deltaY = Math.round((jpg._height+20-fond._height)/nbEtapes);
// actual resize
jpg.onEnterFrame = function() {
if ((fond._width<fondWidth && deltaX>0) || (fond._width>fondWidth && deltaX<0)) {
fond._width += deltaX;
fond._height += deltaY;
btns._x = fond._width-btns._width-10;
} else {
//resize over, delete onEnterFrame of the resize
this._visible = true;
delete this.onEnterFrame;
}
};
}
// delete the onEnterframe of the load
delete this.onEnterFrame;
};
};
// container of the buttons
this.createEmptyMovieClip("btns", cmpt++);
btns._x = btns._y=10;
for (var i = 0; i<images.length; i++) {
btns.attachMovie("btn", "btn"+i, i, {_y:40*i, image:images[i], onRelease:loadJpg});
}
// container of the pics
this.createEmptyMovieClip("jpg", cmpt++);
jpg._x = jpg._y=10;
i was just wondering if anyone knows how to set it so that when it resizes, it expands guided by the center position. In this example, the top corner stay's put and expands. I want it to be always centered. I hope i didn't confuse anyone.
any suggestions?
View Replies !
View Related
Resizing An Object
Hi!
I want to resize an object when you click one of two buttons.
If you click the xscale button - i want the yellow rectangle to grow in the x direction, if you click the yscale button - i want the yellow rectangle to grow in the y direction.
I have put a bit of code on each button but it doesn't seem to work - any ideas why not?!
Cheers
Chris
I have attached my fla file for you to have a look at!
It is in flash mx 2004 professional format
View Replies !
View Related
Resizing Object
hi,
i found this code for resizing, to fit a jpg everytime it's loaded. Anyway here it is.
ActionScript Code:
// All the credits go to Gorlim from [url]www.flashxpress.net[/url]
// You need 2 clips in the library: btn and fond
cmpt = 0; //handles depth to attach
maxWidth = 500; //of an image
maxHeight = 500; //of an image
nbEtapes = 20; //nb of steps for the resize
images = ["dv_02_17", "dv_02_16"]; //names of the pics without ".jpg"
this.attachMovie("fond","fond", cmpt++);
//loadJpg called when you click a button
loadJpg = function () {
jpg._xscale = jpg._yscale=100;
//load the file corresponding to the button
jpg.loadMovie(images[Number(this._name.substr(3))]+".jpg");
//check the loading
fond.onEnterFrame = function() {
if (jpg.getBytesTotal()>0 && jpg.getBytesLoaded() == jpg.getBytesTotal()) {
// it's over. We hide the pic until the end of the resize
jpg._visible = false;
// resize the image if pic too big
if (jpg._width>maxWidth || jpg._height>maxHeight) {
jpg._xscale = jpg._yscale=Math.min(100*maxWidth/jpg._width, 100*maxHeight/jpg._height);
}
// total width of the container
fondWidth = jpg._width+btns._width+20;
// increment
deltaX = Math.round((fondWidth-fond._width)/nbEtapes);
fondWidth=deltaX*nbEtapes+fond._width;
deltaY = Math.round((jpg._height+20-fond._height)/nbEtapes);
// actual resize
jpg.onEnterFrame = function() {
if ((fond._width<fondWidth && deltaX>0) || (fond._width>fondWidth && deltaX<0)) {
fond._width += deltaX;
fond._height += deltaY;
btns._x = fond._width-btns._width-10;
} else {
//resize over, delete onEnterFrame of the resize
this._visible = true;
delete this.onEnterFrame;
}
};
}
// delete the onEnterframe of the load
delete this.onEnterFrame;
};
};
// container of the buttons
this.createEmptyMovieClip("btns", cmpt++);
btns._x = btns._y=10;
for (var i = 0; i<images.length; i++) {
btns.attachMovie("btn", "btn"+i, i, {_y:40*i, image:images[i], onRelease:loadJpg});
}
// container of the pics
this.createEmptyMovieClip("jpg", cmpt++);
jpg._x = jpg._y=10;
i was just wondering if anyone knows how to set it so that when it resizes, it expands guided by the center position. In this example, the top corner stay's put and expands. I want it to be always centered. I hope i didn't confuse anyone.
any suggestions?
View Replies !
View Related
Resizing An Object.
Hi. If you tak a look at .OTRADESIGN.COM and browse the menu you will see what im talking about.
I was wondering if anybody new aobut a tutorial wich describes that function. I think it is pretty neat and would love to master it some day.
Thanks
View Replies !
View Related
Resizing Object Problems...
lemme explaing my set up ... I have an three ojects:
hero, hit, player
hero moves around the stage using the arrow keys unless it touches hit then it stops ... player gets bigger as hero moves down, and smaller as hero goes up. Make sense? Ok only problem is ... I don't want player to keep growing if hero is stock on hit and up/down key is being held ... any ideas on how to make player resize only if hero x is increasing/decreasing?
View Replies !
View Related
Resizing Video Object
Hi I've been working on a flash video player to play flv's. The problem is that its going to be playing videos at different sizes. How would I resize the video object to be the size in the metadata? I've tried this but it didn't work.
Code:
// Attach Video to netstream object resize & play
theVideo.attachVideo(ns);
ns.onMetaData = function(obj) {
duration = obj.duration;
videoWidth = obj.width;
videoHeight = obj.height;
}
this.onEnterFrame = function() {
theVideo._width = videoWidth;
theVideo._height = videoHeight;
}
ns.play("test_video.flv");
Any help would be greatly appreciated.
View Replies !
View Related
Resizing An Object From The Center Point?
I want to resize an object, but I want it to resize it to where the center point stays in the same spot but it resizes outward. Right now it does this:
start
http://moose.cc/uploaded/resize_ball_1.jpg
after resizing
http://moose.cc/uploaded/resize_ball_2.jpg
You can see that the tops are still aligned, but on the resized one it resized downward, I don't want that, I want to keep the center point the same and expand its size outward.
How can this be done?
View Replies !
View Related
Object Resizing On File Import
Basic question, probably, sorry, but can't find anything in the help files/knowledge base.
I'm using Flash Professional 7.0.
I wanted to import a 400 x 300 pixel animation into flash as a sequence of frames. It does this fine, except it resizes the images for some reason to 192 x 144.
Question 1: why does it do this? Under what circumstances could it possibly be useful for the programme to resize the images to some dimensions of its own choosing?
Question 2: how do I stop it doing this? (There are so many frames to the animation, I really don't want to have to resize and reposition every frame manually.)
View Replies !
View Related
Resizing Drag&Drop Object In A Movie
Hi People :-)
I've got a question that is probably really obvious but I haven't been able to find any answers to it on here or various other Flash sites.
Basically I want to create a drag and drop object that a user can resize/scale, as well as move around. Similar to what you'd use when scaling an object in the flash stage environment...mousedown on a corner and drag big or small to change the size of the entire rectangle for example.
I've seen it done before, and think it has something to do with the 'x_scale' etc but I'm not sure how to string it all together.
I have a basic knowledge of actionscript and good knowledge of general flash techniques.
I'd really appreciate some tips and/or script examples of what to do :-)
Thanks in advance...hehe :-)
Kate
View Replies !
View Related
How To Control Mouse Events When Object Is Resizing
I have some Movieclips that play sounds on mouse over, and end the sound on mouse out. That has worked fine for me.
I just implemented some tween animations on the rollover (they enlarge), but now I am having problems because the animations cause multiple mouse over/out events.
Is there an easy way to handle this?
You guys are awesome. Thanks for the help.
View Replies !
View Related
Dynamic Text At Runtime
Ok, using the LoadVars action, I'm trying to get text to load from a .TXT file so that I am able to give non-Flash friendly employees the ability to input news on our company homepage.
I'm able to get the functionality to work as it's explained in the tutorial, however, if the file contains more text than will fit in the size of the field, it's truncated.
My question is, using this functionality, am I able to get it to scroll in some way? If not, would anyone have any suggestions on how I could create a system where my employees could post news items without having to dig into the Flash file???
Thanks for your help!
Daniel (Flash NOOB)
FYI - The site (in development) can be seen here: http://hyperblitz.com/demo/commandcenter/
The home page is the location of this.
View Replies !
View Related
Question In Resizing The Flash Movie In The Object Tag In HTML
Good Day!
Anyone can help me. Regarding my Problem
I have an compile swf file with Width = 753px and Height = 200px
Then in the HTML object tags if the Width = 753px and Height = 200px its ok same as the Width and height that i compile. But i want to change the width and hieght in the HTML object tag to make the movie smaller like w=400 and H = 150. Problem is it will distort the image that will load. How can it be that the image will not distort?
Please any one can help me or explain it to me. thanks
Here is the Pbject Tag.
Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="400" height="150" id="image_banner" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="image_banner.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="image_banner.swf" quality="high" bgcolor="#000000" width="400" height="150" name="image_banner" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
View Replies !
View Related
Dynamic Text Fonts At Runtime
I hope that someone can help me with this question:
In a site that I am currently working on, the text for the menu will be dynamic text that will be bound from external XML data at load time.
My question is: that when the site is being served on the internet from a web server, will any special fonts used have to be installed on the client machines in order to see them or will they be viewable if the fonts are on the server?
I hope that makes some sense!
View Replies !
View Related
Dynamic Import For Runtime Sharing
Hi;
how is it possible to create a movie clip using action script with "Import for runtime sharing" set?
Or how to type a variable name instead of movie name in the textfield that appears when you set a movieclip to "import for runtime sharing"?
Thank you
Erasmose
View Replies !
View Related
Embedding Dynamic Fonts And Runtime In AS3
I have made a post at my blog that has the source files and a small break down of whats happening and how to use the files.
http://gfxcomplex.com/blog/?p=74
The hole point of runtime font loading is simple.By being able to separate the fonts from the main document you dramatically reduce the file size of the main document and you speed up the time it takes to load.
You can mange the fonts used with out editing the main document every time you need to change a font.
You can load as much or as little as you like at runtime. Save bandwidth on your sever by only loading content when and if it's needed.
You can make a library with every font you ever wanted and access it later in your projects. This will speed up production time as you can address fonts used in your projects before you ever need to use them
I think people with text editors and others that require a lot of custom fonts will really benafit from this.
Also though I have only one font per swf you could load as many fonts in to a single swf and load that at runtime. I will try to write a more in depth tutorial some other time until then Enjoy.
- Josh Chernoff
View Replies !
View Related
Manipulating Dynamic Text AT Runtime
Hi
I know its possible to have dynamic text added to the screen at runtime! but is it possible to then change its font, type, size, colour, drag it around the screen and even rotate it - all at runtime!
anyone know of tutorials, examples? - if this is even within Flash 8 capabilities! (must be Flash 8 I dont have CS3 yet!)
thanks
-manphp
[I laugh at aliens]
View Replies !
View Related
Can Not Get A Dynamic Text Field To Import At Runtime
OK, guys...here are some total assinine questions I am sure, but this is the first site I am trying to develop totally in flash.
I am trying to get it to pull news onto the news page from a txt file, but can not get it to work. I have tried to emulate the way I did it in the tutorial (which worked fine when I did it, of course...story of life), but every time I go to test the file for the news page the text field will not load. I have worked on this for a week to no avail...I really hope someone can help me.
Now, onto another note: I would REALLY like to find a way to import html tables/etc into some of my pages, but can not figure out how. Any suggestions? Please?
Here is the site URL so far:
http://www.wings-of-fury.com
View Replies !
View Related
Change Dynamic Txt Field @ Runtime(new MX Properties)
hi guys,
I have built a simple form
username
emil
website etc...
on the submit but i have the usual for checking entries in the text fields.
I have started to tinker about with the
"SetNewTextFormat"
Code:
on(release){
if (!username.length) {
username.border = true;
username.borderColor = 0xF3C079;
username.background = true;
username.backgroundColor = 0xffffff;
username.text = "Field missing !";
Selection.setFocus(username);
}
}
works just fine.
Now what i am tring to do is set the origanil state of the text field after the user starts to input the data. I thought i had it but the coding i thought didn't work for me:
example:
Code:
this.onEnterFrame=function(){
if (Selection.getFocus == username) {
username.border = false;
username.background = false;
}
};
Anyone
Cheers
View Replies !
View Related
Dynamic Runtime Shared Libraries In Flash
Runtime shared libraries in Flash only seem to work if there is a direct import link into the file that wishes to use the shared library item. Why can't the main swf dynamically load a shared.swf containing the shared library items into itself and therefore allow all child swf's that are loaded after that event to access the items? Or why can't you load the shared.swf containing the shared library items into the requesting file on the fly and grant access to the items from the requesting file that way? Creating direct import links to shared libraries in all child flash documents is very annoying in larger applications!
Ideally it should work like this...
All cross domain security issues have been dealt with.
I have a main container.swf.
The main container loads a remote shared library swf that contains the shared library items.
After the load, the main container loads swf files that will need to access shared library items.
One of the loaded child swf's contains a TextField with a style sheet attached. We need to have access to a shared font from the shared.swf library to enable us to set embedFonts to true and to have the TextField render correctly. Unless the import link to the shared library was created manually within the child swf containing the TextField, the TextField will not render the text with the embedFonts set to true.
This also seems to be the case when dynamically attaching shared move clips with linkage id's to the stage. Unless a direct import link to the shared library was created within the requesting file or should I say the file that is running the script, the script fails. It seems that libraries are kept isolated from one another, probably to stop linkage id confliction etc. the same way as the _global scope isn't shared between swf's originating from different domains.
Using something like, libraryName.linkageID could combat this, but I need to know if I'm wasting my time...
I hope this makes sense. There wasn't a solution last time I checked, but it's been awhile and I was hoping someone out there has come up with a solution at this stage or even knows the official word on the subject.
Is this possible Adobe?
Cheers,
Derek.
View Replies !
View Related
Dynamic Runtime Shared Libraries In Flash
Runtime shared libraries in Flash only seem to work if there is a direct import link into the file that wishes to use the shared library item. Why can't the main swf dynamically load a shared.swf containing the shared library items into itself and therefore allow all child swf's that are loaded after that event to access the items? Or why can't you load the shared.swf containing the shared library items into the requesting file on the fly and grant access to the items from the requesting file that way? Creating direct import links to shared libraries in all child flash documents is very annoying in larger applications!
Ideally it should work like this...
All cross domain security issues have been dealt with.
I have a main container.swf.
The main container loads a remote shared library swf that contains the shared library items.
After the load, the main container loads swf files that will need to access shared library items.
One of the loaded child swf's contains a TextField with a style sheet attached. We need to have access to a shared font from the shared.swf library to enable us to set embedFonts to true and to have the TextField render correctly. Unless the import link to the shared library was created manually within the child swf containing the TextField, the TextField will not render the text with the embedFonts set to true.
This also seems to be the case when dynamically attaching shared move clips with linkage id's to the stage. Unless a direct import link to the shared library was created within the requesting file or should I say the file that is running the script, the script fails. It seems that libraries are kept isolated from one another, probably to stop linkage id confliction etc. the same way as the _global scope isn't shared between swf's originating from different domains.
Using something like, libraryName.linkageID could combat this, but I need to know if I'm wasting my time...
I hope this makes sense. There wasn't a solution last time I checked, but it's been awhile and I was hoping someone out there has come up with a solution at this stage or even knows the official word on the subject.
Is this possible Adobe!
Cheers,
Derek.
View Replies !
View Related
Dynamic Text Won't Load Into Runtime TextField...
I can't get my text to show in a text field created at runtime within a movieclip on _root. I use a trace statement and it loads into the Output box but is not visible in the textField area. Thanks for help or ideas. btw...there are no masks in the movieClip.
My function for creating it...
// Call the function to create textField
printBtn.onRelease = function() {
makeTxtBox("text/print.txt");
}
// Create the textField
function makeTxtBox(txtFile) {
var txtFile;
this.createTextField("txtBox",0,87,-58,358.4,198);
txtBox.multiline = true;
txtBox.wordWrap = true;
txtBox.border = false;
txtBox.embedFonts = true;
this.loadVariables(txtFile);
txtBox.variable = infoText;
txtBox.text = infoText;
trace(txtFile + "<-- **LOADED** -->" + infoText);
defaultFormat = new TextFormat();
defaultFormat.font = "Futura MdCn BT";
txtBox.defaultFormat.size = 16;
txtBox.defaultFormat.color = 0x666666;
txtBox.setTextFormat(defaultFormat);
}
View Replies !
View Related
Dynamic Text Won't Load Into Runtime TextField...
I can't get my text to show in a text field created at runtime within a movieclip on _root. I use a trace statement and it loads into the Output box but is not visible in the textField area. Thanks for help or ideas. btw...there are no masks in the movieClip.
My function for creating it...
// Call the function to create textField
printBtn.onRelease = function() {
makeTxtBox("text/print.txt");
}
// Create the textField
function makeTxtBox(txtFile) {
var txtFile;
this.createTextField("txtBox",0,87,-58,358.4,198);
txtBox.multiline = true;
txtBox.wordWrap = true;
txtBox.border = false;
txtBox.embedFonts = true;
this.loadVariables(txtFile);
txtBox.variable = infoText;
txtBox.text = infoText;
trace(txtFile + "<-- **LOADED** -->" + infoText);
defaultFormat = new TextFormat();
defaultFormat.font = "Futura MdCn BT";
txtBox.defaultFormat.size = 16;
txtBox.defaultFormat.color = 0x666666;
txtBox.setTextFormat(defaultFormat);
}
View Replies !
View Related
|