He doesn't do much, just an integer what adopts a value between 0-100. I also have a line drawing function. He does lots of things and draws lots of pretty lines. All in just one colour mind.I'd like to be able to change that colour based upon the value of 'n', but I don't know how to convert this integer into the 0x000000-0xFFFFFF format used by linestyle. I can scale and convert 0-100 into a hex string but I'm stumped at how to prepend 0x to the string and how to use this within linestyle...Here's what I have so far....
I have managed to create a method which changes the colour of a line.I now...need a seperate method which changes the thickness of the line, however whatever I try messes up.[code]
I'm trying to pass the contents of variable playnoyes to the long line of code below to decide whether or not to autoplay the flash movie, but doing it as I have below, the resultant line of code has the variable in quotes and therefore the code doesn't execute it as expected. My question is, how can I pass the variable so that the resulting line of code doesn't have the quotes around the variable value.
var playnoyes='true'; var testtext = "<script type='text/javascript'>AC_FL_RunContent ('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.[code]....
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.
I've been reading this site for a while now but it's only now that I have a problem that I turn to you guys in the forums for help... stupid unsociable me. I'm new to ActionScript development, and I've been able to figure out pretty much everything on my own so far, but this particular problem really has me stumped. I'm totally at my wits end here, so maybe one of you smarty folks can help me out.
The following code is a stripped down version of what I'm trying to do with a game-type application. Basically I create some new movie clips, put them in an array, give them each unique attributes, and then refer to those attributes later in another function. When I do this, the attributes for ALL clips have all been set to the attributes of the last clip created! Which in this case means that all the moving elements have the same velocity, when really I want them each to have different ones.
I have a flash menu that reads from an XML file and creates a graphic menu based on the images and URLs that are specified in the XML file. Problem is, I don't want to load a URL. I need to do something like this:
I'm building a site at the mo with pop up that can be activated and covers the main page with a new info page. This popup can be activated at anytime and will cover whatever is in the main page. Trouble is, buttons are still active from the main page when popup is displayed and given the site design the only way to stop this problem is disabling the buttons below. What is a good way of doing this? I was hoping flash keeps some sort of array of mc content and the buttons could be identifed this way but somehow i don't think this is likely!
I'm building a site at the mo with pop up that can be activated and covers the main page with a new info page. This popup can be activated at anytime and will cover whatever is in the main page. Trouble is, buttons are still active from the main page when popup is displayed and given the site design the only way to stop this problem is disabling the buttons below.
I want to create a flash document that allows me to change the colous of an image using a colour palette of my own. I am a complete beginner and have no idea where to start this, hence i would need to know what to do and how to do it. I basically want the image to be a simple 2d image that i will create using different layers in photoshop and import them into flash, the layer images will all be one colour so the colour of the whole layer changes. so the colour palette will be on the side of this and when i click on an image and then a colour the image changes to the colour i clicked.
I am parsing colour codes that I get from a Flex(Flash ActionScript) application, then creating HTML div elements with that same colour. My Problem: The colours are all only 8 digits long. So they cant be RGB colour values can they? What color value format are they in? If I can figure the format they are in I can convert them to RGB. Maybe the last/first digit signifies its 0. alpha value?
PS: Should I convert the colours to RGB or something else?
This is an example of the colour code values I getting from the flash application:
i have a background and i want to be able to change the colours of it using a colour picker... if the MC was to cover the whole stage... how could i then get a colour picker and make it so it would change to whatever colour i wanted from the colour picker?
how do I store and retrieve rather large multi-lined texts blocks that contain hard returns in a url or embed code?
Hah, yeah, probably a ridiculous request but this is used in a flash/custom BBcode partnership. The idea being that the user posts on the bulletin board and wraps their text in [customtag][/customtag]. It spits that information out as an embed code with the text stored as a variable that calls the flash applet and displays their post in a fancy way. This is for a browser based game so it's basically for admin's to post RP style messages.
I need to change all the elements in my movie that have the color X and change their color to color Y. Is it possible to have this in AS? like, if i press one button all the elements that have the color black (graphic, text, background, etc) change their color to yellow?
I have a Debug class I've written, and I'd like to include a static trace() method in there, unfortunately I have no idea how to then access global / top level trace as effectively I've blocked it with the local static scope.[code]
all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable
Would removing the (Variable definitions / Spaces / Have everything on one line) make the project run faster.Testing my projects most beefy loop without variable definitions seems to make it run slightly faster.
why my i variable in the script below doesn't carry through to the "mySubMenus[i].alphaTo (100,1);" line. When I trace, it returns a value of 3, but it's working for myButtons[i]. There must be a way to pass that [i] value someplace else,BTW, this is a variation of one of the mc_tween samples.
var myButtons = [this.servicesBtn, this.portfolioBtn, this.peopleBtn]; var mySubMenus = [this.servicesLevel2, this.portLevel2, this.peopleLevel2]; Loops on all buttons from the first to the last one[code]....
I'm trying to work out how to create a simple demo that works as follows: A ball falls from the top of the stage.Player is able to draw a line anywhere on the stage. The ball will bounce/roll along the line such that the player can guide it at will. I don't think the coordinate rotation will be a problem for me but I can't figure out how to transform a line drawn by the player into a hit detectable sprite -- or realkly any way that I can get those line coordinates into my coordinate rotation routine. To keep it simple, I'm just working on the first part of the problem, getting the line to where I can hit test or know its position.Here is my code so far:
in Flash CS4 I have static text like: Line1 and line2 It's in 9 point Arial Regular as a device font. If I set the line spacing below 3.9 the second line dissappears from the compiled SWF file. It still shows in the FLA file. The same thing happens at 6pt but NOT at 5pt or less.
Is it possible to load a text file using line breaks as a delimeter rather than having a &var= at the beginning of each line? Like by a for instance? I have a text file with about 1000 lines that I need to load/display.
I'm in the process of teaching myself the components of the CS4 Design Premium package using the Adobe Classroom in a Book series. I'm currently going through the Flash CIAB and i've started using the pen tool. The task involves creating a wave like design across the stage. Whilst this in itself is simple, the final instruction is to click on the first anchor point to close the shape. In the illustration, the closed shape seems to automatically extend around the stage, however when I click on the first anchor point, the line automatically connects between the two points in a straight line.
Am I doing something wrong? The next step is to fill this area, but with the straight line effect that I am getting, this becomes impossible. I should point out that the instruction states that the pen tool line should extend off the stage. I have done this, but even then on clicking on the first anchor point the shape is closed incorrectly.
I am trying to dispatch an event but not sure when I should do it to get the right results. The first event "submitClicked" is in the right spot and works great. However, the second event "dataReady" seems like it might be a problem. I need it to be dispatched after this.compiledFormData is set.Does AS3 wait for each line of code in a function to be executed before moving on to the next line?
// -------------------------------------------------------------------- public function submitForm() {
I am using Flex 4 and AS3 and I am trying to make it so that the user can draw a freehand line with the cursor - I have this part done.However, I also need the line to be a dashed line instead of one solid line like it is now. below is my code I am using. I have found some examples on how to do this, but they are all for straight lines, not for a freehand line.
When a Dynamic Multiple line text field is used in Flash CS3, it has a very annoying feature that auto inserts a line break at the end of inserted text. It also auto inserts a line break if no text is entered too.
I'm having a problem with this because the text is being saved from flash to a text file on the desktop. With every multi-line text field there's a nasty looking line break.
Any way of "turning off" this auto-line-break-at-the-end feature?
I need to replace multiple contiguous new line/line feed characters in flex with a single new line character.
Example:
The string
"My name is blah blah
My name is blah "
Should be converted to
"My name is blah blah My name is blah "
Hope the example makes it easier to understand.
I am using a component to render it.
I guess using regex would be the easiest way to do this, but still it would be great if people can point me out to references/examples to get this done with ease.