ActionScript 2.0 :: [MX] Change Size Of A Button
Sep 12, 2003How do I refer to a button in its own handler.I need to change the size of a button on rollover using actionscript code. this._height doesnt seem to work.
View 5 RepliesHow do I refer to a button in its own handler.I need to change the size of a button on rollover using actionscript code. this._height doesnt seem to work.
View 5 RepliesI want to reduce the size of Swf using the size mentioned in the object tag of html. Same swf file size can be different for different request.
The problem is this if we reduce the size all control in swf reduced according to the change in swf size. But we want the buttons and one more graphics remain same size for any change in size of swf file. How can we make it ..
How can i resize my stage or embedded swf by a button click event? My Code is not working and my stage is not resizing.
var mcStage:Stage; mcStage.scaleMode = StageScaleMode.EXACT_FIT;mcStage.align = StageAlign.TOP_LEFT;mcStage.stageWidth= 980;
mcStage.stageHeight = 690;
I've got a bunch of text boxes that I need to be able to change the text size of with the click of a button. All the text needs to be embedded so I tried to use a tlf text field and target it but to no avail. This is what i have.
ActionScript Code:
import flash.events.MouseEvent;
fifteen_btn.addEventListener(MouseEvent.CLICK, changeSize);
function changeSize(evt:MouseEvent):void
{
[Code].....
I'll try to be brief. I've built a teleprompter projector file app in Flash CS4 and it works great on PCs & MACs. Only one bug. the program works in three phases: Welcome & instruction screen / Text input screen / Prompter screen.Problem occurs when you first enter prompt screen
basic navigation and functionality includes:
BUTTONS: button to return to INPUT screen, a BEGIN button, a MIRROR text button, and a SAVE prompting position KEYBOARD: SPACE begin prompting, LEFT & RIGHT ARROW increase & decrease font size, UP & DOWN ARROW increase & decrease scrolling speed, HOME returns script to top, PAGE UP & PAGE DOWN moves script by 600 pixels.
MOUSE: MOUSE_WHEEL increases and decreases scrolling speed *(would like to add a ctrlKey modifier to change font size on mouse wheel - another day perhaps)
THE PROBLEM: When you enter the prompt screen and hit PAGE DOWN the script correctly moves down 600 pixels, but does not redraw on the stage. If you then hit PAGE UP it correctly moves up and the text is back on the stage. Hit PAGE DOWN again and it moves but does not render. You can repeat this continuously. I have a Y position reference that shows the Y coordinates of the text field, so I'm confident that the MC is correctly moving, it's just not rendering. If you hit PAGE DOWN and hit BEGIN the text renders in the correct place. Once you start the prompter, you can stop it and use PAGE DOWN and it renders correctly, but if you change the font size larger > 100 and hit PAGE DOWN the font again does not render. Again if you hit BEGIN the font renders correctly in the correct position.
WHAT I THINK: I've been trying to find a way to update or refresh the text field that is being manipulated on PAGE DOWN and font increase; no luck with updateAfterEvent or redraw. I've tried to start and stop the prompter programmatically in one frame at the end of the PAGE DOWN function & font increase.
POSSIBILITIES OR NEW STRATEGY? I'm a media production specialist with a school district in Florida, and I'm hoping to release this app to all our schools and to sourceforge.net. It's a small bug, but I'd rather not have to explain it if I can find a way to fix it. The following code block only contains the functions related to the navigation and prompter text box manipulation.
//Begin button toggle code.Toggle between begin and stop.startBtn.addEventListener(MouseEvent.MOUSE_OVER, startOver);function startOver(e:MouseEvent)[code].....
A Visual Basic & ASP.NET programmer I work with looked at the bug with me, and he believes the error is somehow related to the actual CLICK of the BEGIN button. As I noted earlier, we tried a workaround by using code to start and stop the prompter in one frame after the font size change, but that did not correct the issue. Yet when you physically click begin with the mouse it renders the text.What is it about clicking the mouse that causes the text box to render? Is it a focus issue? Like the keyboard has focus, but when you click BEGIN it returns focus to the text box and it redraws then?
var tfNum_mc:MovieClip = tl.attachMovie("tfID","tfNum_mc_",tl.getNextHighestDepth());
If I'm to assign the above code to a dragDrop action. Is there a way to change the font size of tfNum_mc_.tf? I've tried;
tfNum_mc_.tf.size = 12;//did not work
var format1:TextFormat( = new TextFormat();
format1_fmt.size = 12;
tfNum_mc_.tf.setNewTextFormat(format1);//did not work
I am trying to change my radiobutton size and label size in pure as3...
searchRB = new RadioButton();
searchRB.name = "search";
searchRB.group = rbg;
[Code]....
I need to make a button animate from its normal size to a larger size but in a fluid scaled motion. I'm using a png image I cant seem to get it to scale from small to big when animating, and I have inserted a motion tween.
View 3 Repliesi want to know how did the creator of otradesign accomplish the effect in his site like the menu and the main contents change size and the menu position according to the size of main contents.
View 5 RepliesI'm wondering whether it's possible to change the size of a flash application at runtime?
I know I can scale the SWF with HTML/JavaScript, but I'm not talking about scaling here. I want to change the actual size, not just enlarge it visually. Let's say my SWF is 400x300 pixels. At runtime, I want to change it to 500x400. All the elements inside the SWF (buttons or whatever) should remain the same size. It's the Stage itself that should change.
I want to change frames instead of Size. How can I revise this?
s1.addEventListener(MouseEvent.CLICK,changeSize);
s2.addEventListener(MouseEvent.CLICK,changeSize);
s3.addEventListener(MouseEvent.CLICK, changeSize);
s4.addEventListener(MouseEvent.CLICK, changeSize);
[code]....
i mean..i dont want my user to maximize or minimize the file..like u ppl must have seen the softwares setups..their window file size cannot be changed.
View 1 RepliesI have a flash file with the stage size 800x600Now I change the stage size to 1024x768 but all the constant ( movie clip, images, buttons..) do not fit with the new stage size.
View 2 RepliesSo I was doing my usual work with flash when I switched to my brush. Wanted about an 25 or so but i couldn't change the stroke size. It doesn't say anything it just won't let me drag it. Its really irritating..
View 4 RepliesHow can I change the size of the document dynamically? The document has a fixed size and when I use the Movieclip(root).width/height I change the size of the movieclip but not of the document. How can I access the width/height of the document?
View 3 RepliesI'm trying to work with a very long image that scrolls through a page. Piecing it together, it's roughly 12000 pixels wide. I can't view the image because the pasteboard seems to only be around 3000 pixels. Is there a way to increase pasteboard size?
View 7 RepliesChange document size with it?
View 8 RepliesOkay so I want to add:
if (_root.Gir_mc._x<=595) {
_root.Gir_mc._xscale=80;
_root.Gir_mc._yscale=80;
[Code].....
Is it possible to change the size of the document (or stage) from an AS file?[code]...
but evidently it is not "Document" - or if it is, there is another include I need to use.
So I was making one of my first flash animations in Flash Pro CS5.5 and... when I select the brush tool the "Stroke" is greyed out, it's there, but I can't move it. The strange thing is I can change the fill colour and change the stroke size on the pencil, but why can't I change the stroke on the brush?
View 1 RepliesHow to change the size of cursor in flash,when we use dynamic text box or input text box the cursor is covering the whole height of the text box.is there any way to reduce the size of cursor
View 2 RepliesIn my movie, I have a dynamic textfield on the timeline starting the first frame and going to the end. At various points during the movie, I change the text in the textfield (and that works just fine), but I also want to change the font-size when I do that. I've tried using setTextFormat to a different TextFormat object, but that doesn't seem to work. Maybe someone has a better idea?
[Code]....
I have a flex tree control bound to an xml data from the database. I have item renderers for the tree items. My concern is, when my tree item size is huge, if I scroll using the mouse, it scrolls in 4-5 items at a time. I need it to scroll item by item. When it scrolls 4-5 items at a time, there seems to be a rendering issue as I have overriden lot of properties of treeitemrenderer and also the custom control i have put into the item renderer
Is there any way I can change the scroll size?
In Flex, is there an easy way to change the size of a Checkbox? I want to make the checkbox bigger, but the label beside it the same font size
View 2 RepliesHow can i change font size in all flex application?
View 3 RepliesI want to read width and height from XML and then change the stage size based on these numbers in an EXE file of Flash. Imagine the main size of flash application is for example 1024 x786. I write a code which interact with user as touch screen and all startup data(like image file names and key coordination) come from an XML file. My problem is, for different PCs, I must set the size of application manually. Some touch screens have different ratios like 1280 * 400! The only way is set the stage size on startup the application butstage.staheWidthandstage.stageHeightdont change anything for me.
View 1 RepliesI have a Cube, and I want to change it's width depending on it's container width...
ActionScript Code:
private var _sceneWidth:Number = 500;
override public function set width(value:Number):void
[code]....
How do I set the image size of an externally loaded image? The external image is 80x80, but when I load the image into my scrollBar I need it to be 1/2 that size. I tried setting the loader width and height but that make the image disappear completely. I suppose I am missing something fundamental?[code]...
View 2 Repliesthis code when I open swf file, it is change size of mc. Code is working. But, I want to play with animation.
[Code].....
I've got a component with a few classes like this:
Code:
[Embed(source='assets/images/Road Works Signs/TW-01_0A.png')]
public static var RW0Icon:Class;
[Embed(source='assets/images/Road Works Signs/TW-01_0B.png')]
public static var RW1Icon:Class;
And I am calling them and adding them to a button in another module like this:
Code:
var a:int = 0;
while (a < 6)
{
[code]....
I'm just having trouble trying to change the size of the image. I want to be able to change height/width the image embedded in the RW0Icon class, but don't know how to reference it.