Flash _alpha losing accuracy

I have this piece of code:
this._alpha = Math.round(this._alpha + this.fadespeed);
trace("before:" + this._alpha);
this._alpha = Math.round(this._alpha);
trace("after: " + Math.round( this._alpha));
which is used within a hit test to fade in/out a MC when the
mouse hovers over it. For some reason though, even though _alpha
starts off as 0, and this.fadespeed = 5, and i have the Math.round
function there, i get:
before:4.6875
after: 5
before:9.765625
after: 10
before:14.84375
after: 15
before:19.921875
after: 20
before:25
Anyone know where im going blatantly wrong, or if i need to
do an explicit data type cast anywhere. The Math.round function is
returning the correct value, just the _alpha variable in the MC
doesnt want to hold integers it seems!!!
Im using Flash MX 2k4

> flash stores the _alpha property internally as an
integer between 0 and
> 255.
Actually .. it stores that value as an integer between 0 and
256; where 0 =
0% alpha and 256 = 100% alpha. That's why you can get
accurate results with
(say) 50% (which translates exactly to an internal value of
128.
I know why you might thing it should be 255 .. but its not :)
Other than that, your explanation was correct :)
Jeckyl

Similar Messages

  • Flash to flash paper (losing effect)

    When I export a flash file to flashpaper, I loose all of the
    effects (shadow, bevel, etc). What am I doing wrong?
    thanks!

    No. your only option is to export separate SWFs or image sequences for each layer.
    Mylenium

  • Flash video losing skins in DW

    I am embedding Flash SWF files in my Dreamweaver pages. I
    haven't uploaded them yet, but when I preview in browser the skins
    are missing from the video. I've tried recreating the flash files.
    The skin SWF and the video SWF are in the same folder (along with
    the FLA).
    Any suggestions?

    Please make a test copy of your page (name it something the
    public won't
    know)
    upload all your files (don't forget the Scripts folder)
    post a link to your test page.
    We'll be glad to take a look for you..
    "franciebb7" <[email protected]> wrote in
    message
    news:fk51uk$ovu$[email protected]..
    >I am embedding Flash SWF files in my Dreamweaver pages. I
    haven't uploaded
    > them yet, but when I preview in browser the skins are
    missing from the
    > video.
    > I've tried recreating the flash files. The skin SWF and
    the video SWF are
    > in
    > the same folder (along with the FLA).
    >
    > Any suggestions?
    >
    >

  • Exporting to flash/swf, losing drop shadow?

    Hi guys, when I add drop shadow to 2d text in AE it looks fine in the RAM preview, but when I export to a SWF object its gone.  I tried both the effect and layer style versions of drop shadow.. not really sure what the difference is anyways.  Any ideas?  Googled a bunch and couldn't find an answer.

    We usually need to ask for clarification: how do you know the drop shadow really isn't there? If you're looking at a sample of the clip over black, it might be invisible. But Rick's usually got these things nailed. Drop shaodws from text require AE to create rasterized frames and that will change the processing of the output. As Rick says, it will be much larger because it will be a pixel-based movie of images rather than instructions for vectors.

  • Non-liner changing of _alpha property

    I have following problem: I try to modify _alpha property of
    an object using AS, increasing the _alpha value non-linearily
    I have three frames movie.
    On the fisrt frame there is a mc called "OBJECT", with _alpha
    set to "0", plus this AS:
    speed = 10;
    beg = OBJECT._alpha;
    end = 100;
    difference = end-beg;
    move = difference/speed;
    OBJECT._alpha = beg+move;
    on the second frame I ask if the _apha value has already
    reached the "end" value (which is set on the first frame), if NOT I
    go back for the first frame and if YES I would continue my movie
    if (OBJECT._alpha<(end-1)){
    gotoAndPlay(1);
    } else {
    gotoAndPlay(3);
    BUT thing is that the _alpha value NEVER reach the "end"
    value set on the first frame. Just in case the "speed" value is set
    for "2", every other value DOES NOT WORK ... and that is the
    question - WHY?
    thanks for any helps

    that's not correct. flash represents the alpha as a number
    from 0 to 255 and that's not relevent to your problem.
    what is causing your problem is that flash allows only 8
    significant digits to represent an object's alpha and you chose a
    series of alpha's that converge too slowly. if you'd chosen speed =
    2 (or 3) you'd have no problem.
    or if you'd performed your increments on a variable that
    stored the alpha you would realize the usual flash 15 digit
    accuracy and could have used speed = 10.

  • Flash video from movie

    I've been having a problem figuring out how to get screen
    shots, images and small text into a movie (using Premiere Elements)
    and from there to Flash without losing a lot of sharpness.
    I posted a detailed description of the issue and what I'm
    working with, including links to samples
    here.
    Thanks so much!
    Jay

    Hello Simen,
    Control click on the flash movie clip & a pop up menu dialogue box will open see the settings click on it & see what you can do to save it to your disk to the point that it will allow you to. I do not believe you can out & out own it due to ownership rights, understandably.
    Hope this is helps.
    Eme

  • FLASH PLAYER NOT STAYING ENGAGED AFTER DOWNLOAD

    For the last 6 months out of 2 years of ownership on a Windows 7 HP PC, I have had increasing difficulties viewing videos on Youtube, Facebook and others. I now frequently get prompts to download Adobe Flash that I had happily used for 18 months without problems.
    The Geek Squad provided an uninstall so I coulds start clean. I picked up my PC on Sunday and tried some Les Paul from YouTube
    I have disabled Weatherbug, ActiveX Filtering, closed all other features that interfered with the actual download. I have cycled off and re-started my PC to lock in the program, before trying videos my High School classmates have sent to our group. I have Chrome on my PC, but that download sometimes whats to install it again. Regardless, I am frustrated with Adobe Flash and losing confidence in Adobe in general. What on earth can I do to get this program to work effectively once more?
    Sincerely,
    Larry

    If you haven't already, review procedures here:
    Flash Player Help | Installation problems | Windows
    Otehr than that use Google Chrome. It has Flash built in.
    Mylenium

  • Problem Importing Graphics

    When I import an image, whether it's an illustrator,
    photoshop, jpg, or gif file, the quality of the image is poor. The
    text can't be read. How do I get a clear graphic image imported
    into Flash without losing the quality of the text in the image? If
    I make the image larger, the text looks good. But if make the image
    smaller (which is what I need to do for this project) the text
    becomes unreadable.
    Any thoughts?

    Yes, I believe I am importing a file into the flash
    aurthoring environment although I am not entirely sure as I am new
    to flash. I am working with a previously created flash file and the
    graphics that where used in it needed corrections. When I import
    the corrected graphic/image (image/graphic was created in
    Illustrator) I lose the quality of the text that was used in that
    graphic/image especially when it is scaled to a smaller size. I
    have tried bringing the image into photoshop and resizing, also, I
    have tried to bring in the image in as a .gif and a .jpeg files and
    still the quality of the text is poor. I am uncertian if I am doing
    something wrong with I resize the image. I have tried resizing it
    in Illustrator, and Photoshop. If I don't resize the image and
    bring it in as it's actual image size, the quality of the text does
    not get lost and is readable.

  • Can anyone help with sending non-Ascii messages?

    I'm currently writing a small application that sends and receives encoded messages through JavaMail. Here's the problem: each character in the string that I'm sending can be up to 11 bits long and I'm apparently losing accuracy while emailing encoded text.
    Apparently, JavaMail treats Strings as a series of bytes, while Java treats Strings as a series of integers. When I try
    String message = "Message to code";
    message = encodeMessage(message);
    message = decodeMessage(message);
    and then print out the contents of message, I get the correct contents of message. However, when I try
    String message = "Message to code";
    message = encodeMessage(message);
    Message msg;
    msg.setContent(message, "text/plain");
    and then receive the message and read the contents, the contents are changed. I tried a for/while loop to see what the string "message" was holding before and after I emailed it. The results:
    Before:
    Encoded text as integers: 74 196 478 1006 1921
    After:
    Decoded text as integers: 74 196 63 63 63 13 10
    Can anyone give me suggestions on how I can send this data without losing accuracy? I had the idea of sending an int[] array, but I can't see an easy way of doing that... I'm fairly new to JavaMail, so any help is greatly appreciated :-)
    Thanks,
    Robert Chatham

    I've figured out a solution only to come up with an even more bizarre problem. JavaMail is now inserting random bytes into my message.
    My code:
    (When sending the email):
    String encodedMessage;
    msg.setContent(encodedMessage);
    (When receiving the email):
    String encodedMessage = (String)msg.getContent();
    I've printed out a list of the bytes in each string immediately before sending the encoded message and immediately after receiving the encoded message. I'm doing absolutely nothing to the message between the times I send and receive it (and I don't think there's a way to, considering that it's off at the mail server.)
    Take a look at a sample of the bytes of the encoded message before sending and after receiving (I added parenthesis for emphasis):
    0 74 1 96 4 78 10 6 19 21 18 87 17 65 14 13 7
    0 74 1 96 4 78 (13) 10 6 19 21 18 87 17 65 14 13 (10) 7
    So... what is causing these extra bytes to be inserted into my message? In ascii format, the two bytes represent (I believe) line feed and form feed - but why inserted, and why so randomly?
    Thanks,
    Robert

  • The BigDecimal class

    Hi there,
    I have Core Java2 put out by Sun and I just finished reading up on the use of the BigDecimal class. I think I want to implement it in my code b/c I'm losing accuracy when I'm multiplying doubles but the text isn't very clear and I don't fully understand what the BigDecimal class will do. Does it just ensure complete accuracy when performing math on two doubles? Any clarification would be appreciated.
    jjmclell

    Complete accuracy is impossible because somenumbers
    can't be represented inside computers.Technically speaking, you can represent all numbers,
    even irrational numbers inside a computer just as
    well as we can represent them on a notebook or
    blackboard.
    But anyway your advice was still good :)Well, yeah; you could define a number system with symbols to represent transcendental numbers, etc., infinity with different cardinalities, etc., whatever you need. Of course, you could only represent a finite number of these representations. I think this is a little bit out of the scope of what the OP was asking, though.

  • DWG/DXF import from Sketchup to Illustrator CS6

    HI!
    I have recently discovered the ability to import dwg/dxf files from Sketchup Pro (using AutoCAD Version: Release 14) into Illustrator CS6...
    However, the only way that I seem to be able to see the DWG is by selecting 'Scale to Fit Artboard'... When I attempt to import using 'Original Size' or the 'Scale by' input factor the item doesn't seem to show anywhere on the artboard?
    Any ideas what I might be doing wrong?
    Thanks!

    Thanks Mike!
    Well, the sketchup file was created in mm, but for some reason their export 2D Graphic dialog box only has inches option (not that it should make any difference since the scaling factor runs the same across the board). Just in case I've changed the units in the sketchup file to inches to bring consistency and match the exporting parameters.
    I've exported the sketchup file to DWG and DXF as both 1:1 and 1:200 to cover all angles and then import into Illustrator as 1:200 and 1:1 respectively to no avail. I've also tried to export and 1:1 and bring in at 1:1 but again no luck, and also attempted to import into Illustrator using the 'Original Scale' tick box.
    The only way the import works is by selecting 'Scale to Fit to Artboard' which obviously gives me an arbitrary scale. I guess a workaround might be to draw a bounding box over the contents in Sketchup and use this to manually scale in Illustrator? My only fear here is losing accuracy though...
    What do you think?
    Dave

  • Losing portal context when URL is submitted from flash/flex portlet

    Hi, I am losing portal context when URL is submitted from action scripting in Flash/Flex portlet. I have selected the remote webservice portlet to use inline refresh. The jsp page is opening up in complete browser window instead of showing in portlet section.
    below is the code snippet i am using.
    <mm:mxml>
         <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="200">
         <mx:Script><![CDATA[
         public function submitToBrowser():void {
         var url:String = "formsubmit.jsp";
         var u:URLRequest = new URLRequest();
         var variables:URLVariables = new URLVariables();     
         variables.name = fName.text;     
         u.data = variables;
         u.url = url;
         u.method = "POST";
         navigateToURL(u,"_self");
         ]]></mx:Script>
              <mx:Form id="myForm" defaultButton="{mySubmitButton}">
              <mx:FormItem label="User Name">
              <mx:TextInput id="fName" name="fName"/>
              </mx:FormItem>
              <mx:FormItem label="Password">
              <mx:TextInput id="password" displayAsPassword="true"/>
              </mx:FormItem>
              <mx:FormItem>
              <mx:Button label="Submit" id="mySubmitButton"
              click="submitToBrowser();"/>
              </mx:FormItem>
              </mx:Form>
         </mx:Application>
    </mm:mxml>

    inline refresh modifies javascript, not flex. Maybe try an iframe?

  • Suddenly I am losing my previous sessions. Also quicktime links are suddenly not working. I updated flash. I downloaded some Windows Updates. Now these browser issues.

    All of a sudden this week I am losing my old sessions. As I usually have about 20 tabs open in 4 separate windows, this is VERY annoying. VERY.
    Also, quicktime links are no longer working, like at apple.com/trailers. I get an "Error: 47 Invalid Url: ()" message when trying to use them.
    My only recent computer changes were updating Flash, and also on June 15th I got a bunch of updates from Windows Updates. Mostly security updates, and a .NET Framework update.
    My feeling is this has something to do with the windows updates?
    I use Vista Home Premium.

    Hey Chris,
    I was able to duplicate this issue on my Windows 7 laptop as follows:
         1)  Completely uninstall FlashPlayer (using your tool) as well as Mozilla Firefox and Mozilla Maintenance Service (used Windows 7 - uninstall from Control Panel).  Please note that I checked the box that said "Remove my Firefox personal data and customizations" to ensure that Firefox was completely gone from my laptop.
         2)  I then went out to the Firefox website and downloaded the "Firefox Setup 13.0.1.exe" app to my laptop.  I ran this app to install Firefox.
         3)  I then went to the following website http://www.ishmael.org.uk/karaoke02.php as I know that this URL uses Flash Player (obviously you can go to any URL that uses Flash Player - I'm just letting you know which one I used).  I then clicked on the icon on this page to install Flash Player.
    Once the install was completed, the URL stops responding and appears to be locked up (although it will occassionally hiccup and display portions of the page and then lock up again).  You will eventually get a pop-up notice from Firefox that has the header "Warning:  Unresponsive script" and says the following: 
         A script on this page may be busy or it may have stopped responding.  You can stop the script now, or you can continue to to see of the script will complete.  Script:  chrome://browser/content/browser.js:6551 
    Selecting "Stop script" will get Firefox working until you hit another page that uses Flash Player.
    To ensure that the above URL is not the culprit, I used one from your website http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html and had the same results.
    Hope this info helps!
    Jeff
    NOTE:  As a reminder, I do not have RealPlayer installed on my laptop (and never have had it installed)

  • Losing internet connection after Flash Player update.

    Recently, I suffered from a Fake Flash Player infection involving the Adobooaan hijacker malware.  I had great difficulty getting rid of it and in the end resorted to using Spyhunter and then hand-deleting the things it came up with.
    [Yes, I know Spyhunter is semi-malware itself, eats cpu space and and keeps popping up every half hour demanding payment, but I have it on a leash.  I used AVG PC Tuner to set Spyhunter so it runs only when specifically told to, and then switches off when I've finished with it.]
    Using Spyhunter in this way got rid of the Fake Flash Player hijacker when MalwareBytes, Spybot and Adware-Removal-Tool had all failed, but one of the side effects was that I had to re-nstall, or at least partially re-install, the real Flash Player.  Now, I keep losing my internet connection, and it appears to be happening when I get a "The Adobe Flash Player Update Service service entered the stopped state." system event.
    The outage affects all browsers, and only access to web pages online.  I can still get emails, and open web-pages which are on my own PC, but I lose access to all online pages.  The only cure for it seems to be to re-boot my router by switching it off for a minute, yet my PC's connection to the router seems to be sound, and my ISP's tech team say the router looks fine from their end.
    Spyhunter is a bit over-enthusiastic - it identified a legitimate TextBridge file as a malware of the same name, e.g., so I'm wondering whether in removing the Fake Flash Player infection I've accidentally deleted some legitimate Adobe Flash Player file or cookie, causing Flash Player to switch off my internet connection at the end of every update check.  But if so, how do I fix it?  Is there some way of getting into Flash Player to set options?  It doiesn't seem to have an icon or to appear in the programs list as something you can get at and twiddle with.

    Yep, I've got the exact same problem. I'm using a PowerMac G4, running 10.4.5 (I think). I can't say the problem started happening, since I just started using the sleep function (computer generates a lot of heat in my apartment in the summertime!).
    But yea, I sleep it using the HW button, and bring it back, and no internet connection. I'm not sure if it's the computer (SW caused) or the ISP (disconnects if the computer doesn't respond to pinging). I am using Comcast cable Internet, which is DHCP me thinks.

  • How can I save a Flash or .swf file in AVI format without losing quality?

    How can I save a Flash or .swf file in AVI (or another video) format without losing quality?

    As long as you don't have code in your animation then just hit File->Export->Export Movie, then configure the options.
    Here's an article on exporting sound, images and video. Just skip on down to exporting AVI and it explains the process. The codec is in the Video Compression section. When you click Settings for Video Compression, the codec is in the drop-down at the top. There's various kinds but to get lossless quality AVI you'll have to choose Uncompressed / None for full quality. Again, the file will be huge and you'll need to use another program (like Adobe Media Encoder) or Microsoft Windows Media Encoder, etc, depending on what format you intend to compress it ultimately.
    http://helpx.adobe.com/flash/using/exporting.html#exporting_video_and_sound

Maybe you are looking for

  • How to get the total no of delivery quantity in PO

    Hello, This is shehryar. my previous account got locked(dunno why  ) , so i have created a new acc. I want to display the total no of delivery quantity of a line item in PO. can it be done ? Thanks.. Shehryar

  • Apple Mail no longer receiving Gmail messages

    Hi When I upgraded to Mavericks over Christmas I could no longer send or receive messages via my Gmail account.  I recreated it and it worked fine until 21 January when I stopped receiving any messages.  I can send them OK, the Connection Doctor says

  • Printer Issue, Please Help

    I have read through the Peripherals topics and the only similar thread had gone unanswered. I am using my PowerBook G4 12-inch w/ 10.4.7 and out of the blue it stopped being able to print (I had not recently changed and/or downloaded anything). I kno

  • Validation mechanism in SAP XI/PI

    Dear All I am new to SAP XI. I need to validate incoming data. Recieved via File adaptor. Validation takes place with SAP z tables and update Oracle database after validation. How can i do this? After recieving file how to validate it with SAP tables

  • SQL problem when using %AND(filtername,column_name like ?)%

    Hello Experts I am trying to create a query that has optional Filters using the Filter <%AND(filtername,column_name like ?)%>  token. i want for my query to return everything if the user does not specify anything in the filter. when i use this token