ActionScript 3.0 :: Possible To Change Layer Properties?
Sep 16, 2009Is it possible to change the background of a certain layer in flash using code.
View 4 RepliesIs it possible to change the background of a certain layer in flash using code.
View 4 Replieshow to change the property of one layer on a rollover of another?For instance,I want to change the color of some words on a different part of the page when I rollover a button.
View 9 RepliesJust been playing around with the tutorials, on the Set properties/Get properties. Everything is all cool, except the "instance name" aspect. I dnt really understand that too well. Is it possible to change an Mc Name dynamically? If you look at my FLA when you hit the top left red button you will get a trace of the mcName as "square". Now if you input a new mc Name on the right hand side, you will see it change on the left hand side. But i want to know why it doesnt remain as the new mc Name, it still goes back to square.
View 3 RepliesDon't know if the flash layer on the view stack contain only the compiled flash swf file
View 1 RepliesI wish to show balls being added on everyframe. But I want to to be able to increase/decrease the speed of it without changing the speed of everything else.
View 1 RepliesI've seen the tutorials 'Flash Buttons with Action Script 3'Tried to make my own but PROBLEMS.First here what I want to learn:- have layer 1 with one button- new layer 'action1' with action for button on layer 1- have layer 2 with text- from start You only see layer 1 with the button- when click this button You see layer 2 with text and notsee layer 1 and it's stop herethis is my AS3 code:
btn1.addEventListener(MouseEvent.CLICK, click1);
function click1(evt:MouseEvent):void {
gotoAndStop("5");
[code]....
I've got an Adobe Captivate file which is pulling through an SWF which I have created. I am not sure exactly how the CP file is importing this SWF but it is.I'd like to ensure that this SWF is on the uppermost layer when the file is published as at the moment it is placed further down the order - which leaves it obscured by other elements on screen. Is there any AS3 code like onEnterFrame or something like that in AS3 which would lift it to the highest depth?
View 3 RepliesI have a movieclip object that I'm changing the color of.
ActionScript Code:
var colorTransform:ColorTransform = mc.transform.colorTransform;
colorTransform.color = 0xFF0000;
mc.transform.colorTransform = colorTransform;
My problem is that I have multiple layers in that movie clip and the code above changes every layer to that color. Is there a way I can change only the first layers color?
I am making an animation with subtitles (separate layer) but at the menu I have made a subtitle button that should change the visibility of the second layer, but I can't get past that bit.
View 1 RepliesIs there a way to change the background color of the layers the Flash timeline itself? I'm using XP, and there is not enough difference in the color of a selected layer and one with extended keyframes that is not selected. At school I use a Mac and there is definitely a blue vs. a gray. On my computer, they are two very close shades of gray.
View 1 RepliesI've got a spiral
-----------------
function spiral(centerX, centerY, radius, sides, coils, rotation){ with(this){ moveTo(centerX, centerY); var awayStep = radius/sides; var aroundStep = coils/sides;// 0 to 1 based. var aroundRadians = aroundStep * 2 * Math.PI; rotation *= 2 * Math.PI; for(var i=1; i<=sides; i++){ var away = i * awayStep; var around = i *
[code]....
and I want some movie clips to appear infront as well as behind it, but right now it always appears on the bottom layer. Is there a way to attach the drawing to a movie clip or something so I can change it's depth?
I have a template that I am editing. I have created new layers by duplicating an existing layer. The problem I am having is that anytime I make a change to a duplicated layer it changes the original as well. ie if I attempt to edit the action script on the new layer it changes the action script on the original? It seems as though they are linked and I can not find a way to unlink them??
View 1 RepliesIs it possible to change the color of one layer in the timeline?I would like to do this to create a kind-of separator...
View 0 Repliescan i change the depths of two movieclips on the same layer with swapdepths? like...
mc1.swapDepths(mc2 + 1);
it's not working for me. So i figure you can't do it with two mc's on the same layer...
What I did was simple: I loaded a swf into an empty MovieClip[code]...
background.swf's stage was set up with 300X200 aspect-ratio, but it was further larger than that size when I tested it.[code]...
I was doing a project for class and all of a sudden i cannot change anything in my brush properties except color. the stroke, style, scale, cap, join is all locked. i was using it fine earlier and it works for all the other tools but only the brush isnt working.
View 1 RepliesIs there a way to change a graphic, but keep the properties across frames such as size and positioning, so that the new graphic does everything the same? That's pretty much all I can ask since I don't really know where to start.
View 1 RepliesWhat I have done is create a preloader that loads an SWF file. I used the same preloading technique used at this site [url]...
What I want to do is when the browser window resizes I want to change the swf files height and width properties to the size of the window.
Is this possible or should I approach the preloader differently so that my main swf gets loaded by the browser so I can use javascript to change its properties.
I have a text whitch I created with: createTextField command. Somehow I figured out how to change the text's color and size but I'm still not able to change it's font although I used the command text.textFont=arial; (I used Arial too).
Basically I wanted a list with command that you can change text properties..
how do i make a movie clip move right 5 pixels every time i press SPACE with actionscript 3?how do i change under properties for input text box, paragraph, behavior and make the password characters be black circles or dots instead of asterisks in flash cs4?how do i take a screen shot of the microsoft windows login screen when I switch on the computer?how do i test movie in full screen in flash cs4 or publish it in internet explorer and have the trace("blah") command or output shown there?
View 2 RepliesHow would i go about changing properties of a Combo Box?
There are two things I would like to change that differs from an orginal Combo Box.
1. Make it so some of the labels within the Combo Box are unselectable, yet are still displayed.
2. Make the colour of certain labels different.
I currently have a scene in Flash CS4 that consists of an image layer1 (converted to a motion tween), image layer2 (converted to a motion tween), an actionscript 3.0 layer, and a hotspot layer. Let's say the animation is 10 frames long for simplicity. At frame1 I want the visibility of image layer 1 turned on and the visiblity of image layer 2 off. Then, I want to spin image layer 1 and 2 simaltaneously (I know how to do this with motion tweens of course) but mid-spin, say at Frame 5, I wish to turn on the visiblity of image layer 2 and turn off the visibility of image layer 1.
How do i change the visiblity properties of my image layers with actionscipt? I assume there is a class I need to load and then change the properties of the image layers in the actionscript layer at the corresponding frames I wish those properties to change.
I'm loading a swf to my main stage and im adding a child to a childMovieclip in the loaded movieclip
but when i play the loaded swf and it goes back to frame 1 and starts plating again the changes i made aren't there?
I have 4 mc's that are acting as btns inside an mc on the main timeline...[code]there are 3 other mc/btns and all come up at different frames in mainbranch_mc (mainbranch_mc is on the main timeline)
first question, if I add the above codes to each mc at the beginning or end of mainbranch_mc I get a null error, so the only way I do not is if I add actions to the frames the buttons start in. (is this correct?)
second question, since btn mode is true I do not need to change the mc properties from mc to button correct?
last question, since newolivefour_mc and the 3 other btns (which I did not list are all inside the branch_mc timeline) how and where do I code so the btns when released to getURL's.
I am running a for loop to bring in movie clips from an array, and I have a couple buttons that I want to affect the properties of all of the mcs. The buttons (labelsOff_btn, labelsOn_btn, increaseSize_btn, decreaseSize_btn) are only affecting the second-to-last item on the list, although the drag functions targeting the same mcs (thIcon) are working for everything. Code is pasted below:
[Code]...
if you can set and change different properties of a graphic symbol using AS? I know you can change MC's and buttons. I also know that you can change graphic symbol properties using the prop inspector. I was thinking that since you can change properties like _alpha in the Prop Inspector, how to you set and control them using AS.
View 3 RepliesI have say 50 movie clips on the stage. each has a name like "button1", "button2" etc and I want to move each one using a for loop instead of hard coding "button1._x = 50"
When I try this it doesn't work.
Code:
var buttonName = "button1";
buttonName._x = 50;
I want to load an image, and then change widht and height of this .jpg. So I'm making something like this:
Code:
_imageSprite = new Sprite();
var imgRequest:URLRequest = new URLRequest( "data/image.jpg" );
var imgLoader = new Loader();
[Code].....
Even if I try to get _imageSprite.widht, I'm getting 0? Why?
Maybe I'm doing something wrong? Because I need to get width and height of this image. Also to change this properties.
Does anyone recall how to change the color of the text and the background box when one clicks and drags over text in an input textfield?
View 3 RepliesSo I draw a line using the graphics object on a Shape or Sprite, using something like:
Code:
mySprite.graphics.lineStyle(1, 0x333333, 1, false, LineScaleMode.VERTICAL, CapsStyle.NONE, JointStyle.MITER, 10);
[code].....