Flex :: Diffrent Values Of Alpha For Different Regions Of A Sprite?
Feb 18, 2010
I have a Sprite covering the entire screen.Other than a certain rectangle of this sprite.I want the rest of the sprite to have alpha = 0.5. And for that particular rectangle, I want alpha = 0.
im making a game is it possiable in flash to make it change mp3's once you go into another zone? because id like opera for the high class town,dnb for street racers part and beats for the low class town i was thining somthing like an image map but for mp3s?
I've got a small action-script chart, that's meant to be live updating, and also be able to support more than 10000 points of data. The way it's currently set up it doesn't need to redraw the whole chart if the new line we wish to add doesn't extend that chart's boundaries. Yet it does, the redraw regions show the whole chart as being redrawn as opposed to the single line i need to add. When the chart gets a new piece of data from the javascript it does the following.(some stuff has been stripped for clarity.[code] Is there any better way to do that, that won't redraw the whole screen? Is my coding pattern wrong for this type of update?
Im trying to create animations for use in sprite sheets for xna but am having some problems with exporting png seqeunces from flash with alpha.I know that if everything is on the main timeline then using the export as png seqeunce with alpha works fine, but when there are movieclip symbols on the main timeline, which themselves are animations, the movie symbols simply remain at their first frames on export.
I'm having a strange problem in computing alpha values because the results of computations differ from the results obtained making the same computations using a normal variable of "Number" type.I compute this way (incrementing alpha property and another Numer variable by 0.01 starting from 0):
var delta:Number = 0.01; var myNumber:Number = 0; myLoader.alpha = 0;
If I change some value for a parent sprite, the same value will affect all of its children. So if I set alpha or width on the parent, the child will automaticly get the same value.
I need to make the buttons that are associated with this code, toggle, so once you press them they become greyed out. So I was thinking of after you press a button, the alpha is reduced to 40%. Can someone help me place that piece of code into this monster? -I know it should go into the presto function of my script. Which works fine, but then it stays at 40%alpha after the user click on a different button. I need it to toggle off once someone clicks on the next button. [code]
If my holder's alpha equals 0 can its child's alpha be effectively > 0 ? In my case I have holders (custom clases) with many children, some of which are holders them selves (with their own children and holders and so on).
I would like to: -pick out a single holder from the 'tree' -have all of the 1st level children of that are NOT holders themselves have an alpha of 1.
I'm confused that values of mouseX&Y properties for a same sprite are changing as its scaling (when you make scaleX out of 1.0). I would like to know the precise mechanism (or detailed definition) of MouseX, MouseY property.
I've checked this behaviour: If I define a sprite (by programming) as: var square:Sprite = new Sprite(); square.graphics.beginFill(16750899, 1); square.graphics.drawRect(0, 0, width, height); square.graphics.endFill(); return square; When I check the position of the sprite ( square.x, square.y), they reference the TOP-LEFT CORNER.
If I create a symbol by Flash CS4 and export to Actionscript (I also associate one class which extends Sprite for doing "new()" in my code): var square: MyClassExtendsSprite = new MyClassExtendsSprite(); When I check the position of the sprite (x, y), they reference the CENTRE of the sprite!
The graphics object I am using has it's alpha value set to 0.1.
When these points are plotted iteratively, and the line being drawn overlaps another line drawn earlier, there is no visible change in the colour at the intersection.
If I draw the line differently, not using an array of points, the alpha is not ignored.
ActionScript Code: public function render(e:Event):void { if (segmentsCollection.length > 0)
[Code].....
This all occurs on each ENTER_FRAME event until the array is emptied.
I have tried loads of options but the alpha is always ignored.
I'm looking to make a slider bar reveal movie clips on my stage as you drag it along. I've written some sloppy code that works, but isn't smooth by any means. I basically put MCs on different frames on the timeline, and I want those MCs to fade in or out relative to where the pointer is on the bar. This was a workaround, what I think I need is a boolean solution, but I'm not familiar enough with AS to write one from scratch. Here is the code I have so far. Does anyone have any ideas?
I have a Movieclip of my player in the player movieclip i have 4 keyframes..on each keyframe i have a diffrent movieClip containing a different animation..
the animation works fine and no problems with that, but when i give 1 of the 4 movieClips in my playerMovieclip a instance name, it doesn't load and the only thing i see is my stage..
the instance name is not even connected to any actionscript...
I have three FLV movie files that are places on diffrent frames on the main time line. When the viewer clicks on diffrent buttons I send them to that specific frame by go to and stop action and the flv start playing, but if they click out of that frame by pressing another button the video still plays on the background and they can hear the audio.this doesn't hap stop the video from playing by pressing thepen if they stop button on the flv player.
I am trying to write a flash app that will allow a user to select various regions of an image, similar to that of the selection tool in photoshop where a square region can be stretched and selected.
Would anyone have any ideas or tips for me that could get me going in the right direction? I have been researching for tools to help me write this but haven't been able to find anything useful..
Using Flash CS3 If I draw two overlapping rectangles with two different fill colors, I get the expected results.If I draw two overlapping rectangles with the same fill color, the overlapping region appears white, almost as if there were an exclusion blend applied.
when we are running movieclips in flash for a few minutes, white regions or white artefacts will start to appear on the screen, and it will slowly grow in size.we have cleared the objects from memory, but these white regions are still coming.
I have a project where i'm drawing to a stageSized bitmap by using BitmapData.drawusing the 'show update regions' feature of the debug player, i can see that the player always updates the whole stage although i changed only a small part of the bitmapdata.Can I somehow make the player only update that part of the screen where there were changes made to the bitmap data?
I have a fla wherein when I Roll Over on the respective regions some text and images are displayed in the respective position ( text loaded in a dynamic text field). Now all these info are from XML file. I want to format it but have no idea how to do this one. I like to make it underline, want to make some paragraph , like to make some text bold and so on ...........
I have a .png image of all 44 US presidents, I'm trying to figure out how I could break it apart so that each president can be clicked on. I'm a fairly experienced actionscript programmer, have done some game development work in the developer role but never in the design/UI role, thus I'm not great (or even good!) at some of the beginner stuff regarding UI. I was thinking I could use the lasso tool to select an area, then somehow make that selection into a grapic or movie clip symbol, but I can't seem to get that to work and I'm wasting a lot of time experimenting!
I just wanted to know about a website's logo application. The website is www(dot)Logomaker(dot)com and I have question about how can the images be selected at various regions and their color can be changed ? What format are the images in the flash?
I've been making a flash animation for a client - the dimensions of the stage are 2,000px wide, 800px tall. They want a graphic in the background and a snow effect in the foreground.
The code I have written uses TweenMax to move a snowflake that has been dynamically loaded from the library on to the stage using attachMovie. When the clip leaves the stage, it is deleted and a new clip is created at the top of the stage.
I expect flash to redraw the background that the flakes pass over, but flash seems to also be redrawing space between the flakes - as if they were one movieclip - even though they are separate instances.
Is there a way in flex (Flash Builder 4) to make regions like in c#, to group a part of the code allowing us to collapse it and see through our project more easily?
I need to save email-id in my login form through the cookies. if I use shared object I am able to save but my requirement is need to save in cookies. How can I save? I got sample code from net. Attaching that code `package com {
import flash.external.ExternalInterface;
/** * The Cookie class provides a simple way to create or access * cookies in the embedding HTML document of the application.