Sound's Acting Weird.
Okay I put a sound effect at a precise time on my timeline, I set the sync method to Stream (I tried all of them( and the number of reapeat to 1 (I tried 0 too)
No matter what I try, instead of playing once, at the right time, it plays twice at the wrong time, both those times are before the moment when it should play.
This is really really annoying, please help.
EDIT: Nevermind, Legendaryfrog gave me a tip and now my problems are solved.
FlashKit > Flash Help > Flash MX
Posted on: 01-18-2004, 07:22 PM
View Complete Forum Thread with Replies
Sponsored Links:
Gif Acting Weird
hey guys.
i have some .gif's in my movie -
they look great when im editing the flash file,
but when i preview / export it the gif's look slightly disjointed, almost as if they were cut and not quite stuck back in place properly.
i maxed out the jpg settings, turned on the gif export settings but the gif's are still choppy.
and it's not happening to all the gif's, just some.
any ideas?
thanks in advance.
View Replies !
View Related
My MX Is Acting Weird
Has anybody got the same problem? The user-interface in my MX has all of a sudden been enlarged. Meaning of the elements such as the Color Mixers, Properties, and everything contains large text which gives me a small area on the stage to work with.
I have tried the panel sets (my screen is at 1024 x 768) but it still stays enlarged.
Very annoying, if anyone has a solution to make it small again, it would be so helpful
View Replies !
View Related
GotoAndPlay() Acting Weird?
Hi... I'm trying to make a movieclip with the instance name "symbol1" play when it reaches a certain frame. (This movieclip happens to be inside another movieclip, if that matters any). So, in the frame that I want symbol1 to start playing, I wrote:
tellTarget ("_root.QuotesMovie1.symbol1") {
gotoAndPlay(13);
}
When I test it out, symbol1 will go to the correct frame, but just freeze there... it acts exactly like a gotoAndStop. Any idea what's going on?
View Replies !
View Related
Fonts Acting Weird
Hi,
I have noticed that my fonts are not readable or too small on different computers. When I created the site, I mostly used the _sans font in my static and my textfile-dynamic textfields.
Since I'm a newbie, I had no idea that flash fonts are computer dependant! how can I fix this?
View Replies !
View Related
Buttons Acting Weird
Hi guys,
it's me again
I have this weird problem .. i don't think no one ever had it before.
I have some GIF images that i wanted to use as buttons. The flash didn't recognize the transperency of the GIF images, so I had to use "Trace Bitmap" command to convert it into vectors. And after that, i started deleting the background of the image and it worked fine.
Now, after setting the buttons using the GIFs. I had this weird problem. When I move the mouse on the button and hold still with it , the button acts as if the mouse is moving over and out VERY fast!!! why? does it has anything to do with the Trace Bitmap command? please, I need your help guys !
I really appreciate that.
Byeee
View Replies !
View Related
HitTest(s) Acting Weird
Hey all. I'm having trouble with a bit of code that's supposed to be detecting whether or not the mouse is over a certain "cell" movie clip when you click. I should be able to figure this out, but it's acting really strange. I'm in MX '04 and the problem is on lines 32-41. There's a bunch of loadVars stuff in there, but it's unrelated so as far as I know, you can ignore it. Here's the FLA.
Any help is appreciated.
View Replies !
View Related
Weird Acting Buttons
Hello all,
Hopefully somebody can help me with this problem. I have menubar where I've just made the text in a static text block and over the words I've place an animated button. Something nice happens when you roll over it. I've made the button width the same size as the word the button covers.
Now after I've exported the file and I play the movie the button width changes with respect to the word width when I change the size of the flash player screen. This maens that there is only one seize that has the words covered with the buttons. What is wrong here, why are these buttons acting weird.
thanks
View Replies !
View Related
Flash MX Acting Weird...Help
I don’t know if anyone here can help me or not but I'll give it a shot.
I am having trouble with my Flash Animations. When I create them and view them by moving the timeline they work fine but when I go to Preview things don’t work.
For instance text effects (masking, sizing and movements) work when I advance the timeline but they don’t work when I preview it.
It’s very frustrating; I even started a new file and striped the effects down to the minimum and still nothing.
If anyone else has a solution please let me know.
Thanks!
View Replies !
View Related
Link Acting Weird
Hi,
In several flash pages, I used the load variables to fill the contents of a dynamic text box. In the text file, I call often the window.open javascript statement - it allways works. Now, in one movie it gives me a strange error.
In the text file I have:
Code:
<a href="javascript:window.open('example.shtml','_Example','scrollbars=yes,resizable=no,menubar=no,status=no,width=450,height=550');void(0);">
When I press the link, it says that "voi" is not defined. If I go to the debugger, the javascript line goes only to "voi" - the rest is ignored.
Does someone have any idea? I must be blind...
Rigel_Kent
View Replies !
View Related
LoadMovieNum~swf Acting Weird
I am using loadMovieNum to load swfs into a flash file. With one of the swf's it is not playing correctly when imported into the main flash file. It plays fine as an independent swf, but when loaded into the "parent" swf it doesn't play properly. Has anyone heard of this problem?
DETAILS-----------------
In the problem file (the one being loaded) I have a movie clip with dropTarget on several movie clips. All this code is on a separate Actionscript Layer within the movie clip. Once the user gets all the draggable mc's matched up to the correct targets, the movie proceeds. It works fine in the individual swf file. But when I load it into this parent flash file, it doesn't proceed to the next frames like it should:
_root.onEnterFrame=function(){
if(f==true && t==true && o==true && r==true && e==true && s==true){
_root.gotoAndPlay(2);
}
}
//TTTTTTTTT
tee_mc.onPress=function(){
this.startDrag();
}
tee_mc.onRelease=function(){
stopDrag();
if (tee_mc._droptarget == "/movingForest_mc/tHome_mc") {
tee_mc.gotoAndStop(2);
tee_mc._x=234.2;
tee_mc._y=-77.5;
t=true;
}
}
View Replies !
View Related
Buttons Acting Weird
hi, i've been using flash for about 5 years, so i'm not really a newbie, but really rusty at the moment. anyways, i'm updating a site that a real pro built and a have a really weird problem. the pro is on vacation, so i can't call him.
anyways, i'm trying to add a few email links to simple buttons created from text, (photography by Donald Duck) – making Donald Duck a button that links to his URL, real basic stuff. anyways the hit area somehow does not work just where the text is, so when i move the mouse over the button, nothing happens. if i make the hit stage reallyreally big, it works (and the script aswell) but not where the text is.
i've gone thru everything now for an hour and getting pretty frustrated. the pro did his links with functions sitting in the root etc, but couldn't figure that out. maybe that's where the problem is?
View Replies !
View Related
Help My Scroller Is Acting Weird
So I am trying to put a scoller on a site I am building so the user can scroll left to right and view pictures. I tried doing it myself and missed it all up
here is a link to see it
http://dj-edge.com/completescroller.swf
to download my flash file:
http://dj-edge.com/completescroller.fla
Can anyone help me fix it?
View Replies !
View Related
ColorTransform Acting Weird
Will someone explain why white-colored objects will not be affected by this (i.e. turn red):
ActionScript Code:
var c = new ColorTransform();
c.alphaMultiplier = .5;
c.redOffset = 255;
myMc.transform.colorTransform = c;
And why doing this solves that problem:
ActionScript Code:
var c = new ColorTransform();
c.alphaMultiplier = .5;
c.redOffset = 255;
// This line seems to solve it
c.color = c.color;
myMc.transform.colorTransform = c;
This makes no sense at all imo.
Also, after applying the alpha, objects seem to get an extra border? What is that?
Check this out:
http://boomie.se/upload/test.fla
View Replies !
View Related
Mozilla Acting Weird...
When you open my site, www.stlbx.com, in MSIE, it acts right... it fills the browser window no matter the size and is centered in every respect. However, in MOzilla (Firefox, specifically), the site is TINY!! Any ideas?
Also, please see http://www.actionscript.org/forums/s...ewpost&t=53740 for a somewhat realted topic on why my PHP mailer works in the SWF file, but the SWF through HTML does not work.
View Replies !
View Related
Debugger Acting Weird
Hi-
Does anyone know if there are problems with the debugger in MX? When I run the movie (not in debug) everything seems to work, but if i run in debug, some of the variables dont seem to work correctly, (movie clips are positioned wrong), and the script and breakpoints in a symbol that I wrote dont fire. Any suggestions?
View Replies !
View Related
Text Box Is Acting As Hit Area In Mc, Very Weird?
Hi
I have a menu made up of movie clips with 2 frames, over both frames is a dynamic text box with the title of the menu item, it all reads in fine.
There are standard onRollOver, onRelease etc functions.
I am using a pixel font which is 6 pixels high, the text box that the pixel font sits in is 15 pixels high.
The problem is that the invisible area of the text field is acting as the hit area for the onRollOver etc even though the text in it is only 6 pixels of the 15 pixels, there is nothing else in there apart for a 6 pixel high invisible box that is meant to act as the hit area. The text is not selectable.
Anyone any ideas??
View Replies !
View Related
Multiple IF Statements (acting Weird)
Hi there, see if you can help me!
Bascially i have multiple if statements, which goto a certain frame, depending on the variable set.
Code:
stop();
if(pinstate == brisbane){
gotoAndStop("brisbane");
}
if(pinstate == sunshinecoast){
gotoAndStop("sunshine");
}
if(pinstate == goldcoast){
gotoAndStop("goldcoast");
}
Now, no matter what variable is set in this situation it always defaults to the last 'if' statement (goldcoast).
However if i do
Code:
stop();
if(pinstate == brisbane){
gotoAndStop("brisbane");
}
else if(pinstate == sunshinecoast){
gotoAndStop("sunshine");
}
else if(pinstate == goldcoast){
gotoAndStop("goldcoast");
}
It always defaults to the first 'if' statement (brisbane).
This is weird behaviour, as in theory it should work?
BTW, the variables are being set with a query string in the HTML.
View Replies !
View Related
Flash Site Acting Weird
while I am no veteran to building flash sites, I have done a few and never encountered this.
www.fatguyphotography.com/test.html to see what I mean. First I would love for the site to take up the whole page. no scrolling
Second if that isn't possible, currently the screen is larger than the screen size (1024x768) and I cannot scroll down if the cursor is above the movie... but if you move off you can scroll. (this can be troubling when filling out the contact form etc)
Lastly, (and I know this is getting long sorry) but if you notice the image is off centre... I did open the html file in dreamweaver and aligned it to centre however it seems off to the left slightly. any ideas?
THANK YOU SOOO MUCH FOR YOUR TIME!!!!
View Replies !
View Related
Loading Variables From ASP.NET Acting Weird
Here is my AS code:
var urlRequest:URLRequest = new URLRequest("ASP/sample_codebehind.aspx");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
urlLoader.addEventListener(Event.COMPLETE, urlLoader_complete);
urlLoader.load(urlRequest);
function urlLoader_complete(evt:Event):void
{
trace(urlLoader.data.lastName);
trace(urlLoader.data.firstName);
testInput.text = urlLoader.data.firstName + " " + urlLoader.data.lastName;
}
Here is my .aspx page:
<%@ Page Language="c#" src = "sample_codebehind.aspx.cs"%>
<html>
<head>
<title>Code Behind Example</title>
</head>
<body>
<% Response.Write("&firstName=Jonn&lastName=Jonnnes") ; %>
</body>
</html>
Why is it that I am getting the values 'Jonn' for first name(this is correct), and 'Jonnnes");
</body>
</html>
' for the last name. It is just taking everything after &lastName and assigning that to the variable. Why is this? Thanks!
View Replies !
View Related
LoadVars In Loop Acting Weird
Well typically I am on here solving others problems but I have run into
a weird one of my own so maybe you guys could help me out. I have a
simple PHP script that returns to me the number of files in a paticular
folder. In this case Jpegs. I can trace the number of files perfectly
but as soon as I stick it in my loop it breaks. Any ideas are
appreciated.
var thelv:LoadVars = new LoadVars();
thelv.load("jpeg.php");
thelv.onLoad = function() {
var theJpegCount:Number;
theJpegCount = thelv.thecount;
trace(theJpegCount); // Traces perfectly
for (var n=maxNumOfPrefPics; n<theJpegCount; n++) {
maxPicsArray[n-maxNumOfPrefPics] = n;
} }
As an addendum all my variables have been properly defined in another
external AS file that is included in the first line on the first frame
of my movie so that is not the issue. I just figured I would get some
responses that said my variables are not properly defined. I can "hard
code" a number in the loop...
ex: for (var n=maxNumOfPrefPics; n<150; n++)
and it works perfectly but no luck with my JpegCount that will trace
out the number one line before...
ex: trace(theJpegCount); // returns 150
for (var n=maxNumOfPrefPics; n<theJpegCount; n++) // does not work
properly
ok. thanks guys.
View Replies !
View Related
Preloader Acting Weird Easy If You Know How
Basically I have a preloader that is a bit fancy. It has a small animated sequence that plays when the percentage bar reaches 100 hence the code below..
if (_root.percentage1>99) {
_root.loaderbar.gotoAndPlay(2);
(btw the loaderbar has an action that says goto frame 2 on root once it has completed its fancy animation)
Now all is well and dandy BUT **IF** the movie is already in cache the user SHOULDNT see the fancy animated sequence, instead it should just pop along to frame 2 in root.
FIRSTLY - Does anybody know how to do that?
SECONDLY - this is where I am currently..
onClipEvent (load) {
_root.totalbytes = _root.getBytesTotal();
_root.bytesloaded = _root.getBytesLoaded();
if (_root.bytesloaded == _root.totalbytes) {
_root.isit = "all loaded";
}
}
onClipEvent (enterFrame) {
if (_root.percentage1<100) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
_root.percentage1 = math.floor((bytes_loaded/bytes)*100);
_root.percentage = +_root.percentage1+"%";
if (_root.percentage1>99) {
_root.loaderbar.gotoAndPlay(2);
}
}
}
many thanks
xx - joe
View Replies !
View Related
Switch Statement Acting Weird...
i'm writing a switch statement for my date conversion from my RSS feed (yeah i figured it out myself, finally, lol). anyway, it works fine except it gives me a syntax error with Aug and Sep saying:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 28: Syntax error.
return 08;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 31: Syntax error.
return 09;
Total ActionScript Errors: 2 Reported Errors: 2
and here is the code:
ActionScript Code:
var node:XML = new XML("<pubDate>Sun, 26 Jun 2005 12:16:00 GMT</pubDate>");var rfcDate:String = node.toString();var dateArray:Array = rfcDate.split(" ");function month():Number { switch (dateArray[2]) { case "Jan" : return 01; break; case "Feb" : return 02; break; case "Mar" : return 03; break; case "Apr" : return 04; break; case "May" : return 05; break; case "Jun" : return 06; break; case "Jul" : return 07; break; case "Aug" : return 08; break; case "Sep" : return 09; break; case "Oct" : return 10; break; case "Nov" : return 11; break; case "Dec" : return 12; break; default : trace("no date specified"); }}trace(month());
if i take out the case for august and september, it works. whats wrong with the numbers 08 and 09? 8 and 9 itself dont work either???
CORRECTION: 8 and 9 does work, but why not 08 and 09 when all others work with the zero in front?
View Replies !
View Related
Preloader Acting Weird Easy If You Know How
Basically I have a preloader that is a bit fancy. It has a small animated sequence that plays when the percentage bar reaches 100 hence the code below..
if (_root.percentage1>99) {
_root.loaderbar.gotoAndPlay(2);
(btw the loaderbar has an action that says goto frame 2 on root once it has completed its fancy animation)
Now all is well and dandy BUT **IF** the movie is already in cache the user SHOULDNT see the fancy animated sequence, instead it should just pop along to frame 2 in root.
FIRSTLY - Does anybody know how to do that?
SECONDLY - this is where I am currently..
onClipEvent (load) {
_root.totalbytes = _root.getBytesTotal();
_root.bytesloaded = _root.getBytesLoaded();
if (_root.bytesloaded == _root.totalbytes) {
_root.isit = "all loaded";
}
}
onClipEvent (enterFrame) {
if (_root.percentage1<100) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
_root.percentage1 = math.floor((bytes_loaded/bytes)*100);
_root.percentage = +_root.percentage1+"%";
if (_root.percentage1>99) {
_root.loaderbar.gotoAndPlay(2);
}
}
}
many thanks
xx - joe
View Replies !
View Related
Flash Video Acting Weird On IE
Hello everyone,
I've got a Flash video player on a website but friends on IE have reportedly experience problem trying to even load it. It's like they're waiting for ages but nothing appears. I'm using the Flash flv player by jeroenwijering.
Please use your Internet Explorer and visit:
http://www.vmcc.com.my/ambassador.php
Then let me know if it works for you. It'll also be great if you list down your:
Flash player version
Operating system (and service pack)
Thanks for the help.
p/s: No problems in modern browsers; Firefox and Opera so don't have to test on them.
Cheers.
View Replies !
View Related
AS3 - Video Is Acting Weird On Server
When I test my movie locally it works totally fine but when I put it on the server the video behaves strangely: the first time you go to the video section, it plays fine, but if you navigate away to another frame of the movie and then come back to the video, it won't play. All that happens is that the play controller of the video component appears, with different dimensions this time, and the preloader just loads and loads but the video never kicks in. What am I doing wrong? The video is the most important part of the site!!!
I'm using the FLVPlayback component for the video and the only code I have for it is to unload the video when you navigate to another frame [myPlayer.stop();]. This code isn't the problem though because it does the same thing when I take it out. What is the script I need to make this run properly?
Here's my site so you can refer to what I'm talking about. Video is on the "TWI TV" tab. Help!
www.thewaterinitiative.com
View Replies !
View Related
StartDrag Getting Stuck Acting Weird?
http://studioauditions.com/volume_slider_problems.html
Please just play with the drag slider and see if you can recreate my troubles...My problem is that the slider_mc gets unpredictabley stuck on the mouse movements...
Basically, click and drag sort of violently around trying to get the slider to stay connected to the mouse even after you have "released" or "rolledOUT"...
Here is the link to the fla file...it is a flash 8 file...so here is all my AS 2.0 below...
Code:
volume_mc.slider_mc.onPress = function() {
this.startDrag(true, 0, this._y, 50, this._y);
_root.volume_mc.slider_mc.onEnterFrame = function() {
/*----The volume slider track is 100px long; we want the value for "volume" to be an integer between 0 and 100, so limite the movement of the slider _x position to 0-50 and then multiply by 2*/
s_sound.setVolume((Math.floor(this._x)*2));//No sound exists in this fla file...
_root.volume_mc.volume_txt.text = ((Math.floor(this._x)*2))+' %';
};
};
volume_mc.slider_mc.onRollOut = function() {
this.stopDrag();
delete _root.volume_mc.slider_mc.onEnterFrame;
};
volume_mc.slider_mc.onRelease = function() {
this.stopDrag();
delete _root.volume_mc.slider_mc.onEnterFrame;
};
To my knowledge there are no PathName or Target issues...
Here is the fla file
http://studioauditions.com/volume_slider_problems.fla
I also tried to use this.onEnterFrame in the delete sections, but I have other onEnterFrames in my main fla that this is a part of, so I targeted it directly to see if that fixed the problem but it didn't....
View Replies !
View Related
Flash Is Acting Weird Upon Initial Loading...
hi,
maybe someone here can help me out? when i go to my website's homepage which contains my main flash movie, the flash movie does not load completely. but when i reload the page a second or third time, the flash movie loads completely. of course, this is not good because not everyone, if anyone, will know to load the page over again in order to see the whole movie.
you can see what i'm talking about at:
http://paulabailey.net/home.html
my operating system is Windows XP...and I used Flash MX.
and yes, i do intend to put in a preloader;im still figuring that out...until then, i don't know why flash is having a hard time loading the full movie on its first download. it's not a huge file. (note: this only started happening when i added sounds to the buttons so i don't know if that may have anything to do with it.)
any advice will be much appreciated. thanks!!!
View Replies !
View Related
Setting Width And Height Acting Weird
I am loading flash 4 movies with a Flash 7 fla. I have a predetermined size for the movies that is smaller than the original size. When I set the _width and _height properties on the flash 4 movies, the _xscale and _yscale change to a very large number. In turn, the _width and _height change as well and I end up with a flash 4 movie that is scaled to some huge number. I have some other flash movies that I can set width and height on and have no issues. Is this:
1. a bug with flash 4 ?
2. a problem with the original flash 4 files.. the way they were written?
3. something I am just missing?
please let me know.
View Replies !
View Related
Button Script Acting Weird... I'm Stumped. HELP
Hello and thanks for your help in advance. I'm having a weird problem with what seems like a very simple issue to me. I have an action attached to a button:
Code:
on (rollOut) {
gotoAndStop (65);
}
on (release) {
gotoAndPlay ("C Viewer");
}
It's the "on (release)" part that isn't working... the rollout works fine. It just sends me back about 12 frames and not to the scene (or frame i tried that) indicated. I have also tried going to a different frame, creating a new button to try to go to the scene etc etc. It never behaves by sending me to the scene or frame I specify. I am really stumped. Please help. I can email or post the .fla if necessary.
View Replies !
View Related
Racing Game Boundaries - Acting Weird?
Okay check out what I'm working on.
http://media.putfile.com/Untitled-Ub...ng-Game-TEST-1
The graphics are open source, so don't nag if you've seen em before.
Try the game I posted, you will notice that when racing at high speeds, you can get stuck inside the boundaries!
Here's the boundary code I'm using. I don't care that the car overlaps the boundary, I'm just worried about players getting stuck.
PHP Code:
y = (Math.cos(Math.PI/180*_rotation))*_root.speedHolder;
x = (Math.sin(Math.PI/180*_rotation))*_root.speedHolder;
if (_root.land.hitTest(_x+x, _y+y, true)) {
_root.speedHolder *= -.1;
}
_root.speedHolder is the current speed of the car. This script is inside of the car movieclip. _root.land is the track boundaries. What can I do to fix this problem?
Thanks,
/craze3
View Replies !
View Related
Text/image Scroller Is Acting Weird
Check this out:
http://www.gradlaunchusa.com/flash.html
Click "services" or "calendar" on the top navigation, then go to the page that loads up. If you click the scroll box (not the up/down arrow) it will follow your mouse around. I want it to release when the mouse button is released...any idea how to do this?
Here's a source file from one of the pages, maybe something is wrong in the script....I'm not sure what to change.
Any help is appreciated.
View Replies !
View Related
HitTest Working, But Acting Weird (MC As Button)
I was playing around last night trying to learn simple AS to make a movie clip act like a button. I wanted the button movie clip to reduce the alpha value of the other movie clip when you rollover the button and when you roll off the button the alpha of the movie clip goes back up. It works, but if you keep rolling over and out of the button movieclip sometimes the alpha gets stuck at a certain value for a bit, then does what its supposed to. Any ideas why? I'm using onEnterFrame () to do the hitTest constantly.
Thanks
Here's the SWF and FLA files for you to look through:
hitTest SWF
hitTest FLA
Here's the AS code I used in the frame to do this:
Code:
onEnterFrame = function() {
if ( background._alpha > 100 ) {
background._alpha = 100;
}
if ( background._alpha < 0 ) {
background._alpha = 0;
}
if (hitTest( _root._xmouse, _root._ymouse, true)) {
background._alpha -=25;
}
else if (hitTest( _root._xmouse, _root._ymouse, false)) {
background._alpha +=25;
}
}
View Replies !
View Related
System Font Question- FFF Acting Weird
Hi all, I just purchased a Font For Flash (FFF Business), and for some reason, Flash has designated the font a "system default font". Basically, it turns whatever I select into Helvetica or something. Any ideas as to what could be doing this? BTW, it has also done this with a free pixel font I downloaded. Other pixel fonts have not been converted to system default. got me.
thanks
View Replies !
View Related
Custom Slideshow Component Acting Weird
Hi.
This is propably a newbie question regarding components, but here goes:
I've made a custom slideshow component, which works nicely. The problem, however, is that when I place the component on my scene twice, it starts to show the same first picture in both instances and doesn't begin the slideshow like it should.
The component loads in an xml file, parses it to get the image urls out, creates empty movieclips for each image, once the first image is loaded it fades it in and once all images are loaded, it starts the slideshow (fade current image out and the net image in).
Like I said, everything is fine when the component is on the scene only once. If there are two instances, it breaks.
The curious thing is that it does load the different xml files correctly, it just shows the same mc in both component (with the first image) and stops there.
See corresponding zip and you'll see what I mean.
View Replies !
View Related
HitTest Working, But Acting Weird (MC As Button)
I was playing around last night trying to learn simple AS to make a movie clip act like a button. I wanted the button movie clip to reduce the alpha value of the other movie clip when you rollover the button and when you roll off the button the alpha of the movie clip goes back up. It works, but if you keep rolling over and out of the button movieclip sometimes the alpha gets stuck at a certain value for a bit, then does what its supposed to. Any ideas why? I'm using onEnterFrame () to do the hitTest constantly.
Thanks
Here's the SWF and FLA files for you to look through:
hitTest SWF
hitTest FLA
Here's the AS code I used in the frame to do this:
Code:
onEnterFrame = function() {
if ( background._alpha > 100 ) {
background._alpha = 100;
}
if ( background._alpha < 0 ) {
background._alpha = 0;
}
if (hitTest( _root._xmouse, _root._ymouse, true)) {
background._alpha -=25;
}
else if (hitTest( _root._xmouse, _root._ymouse, false)) {
background._alpha +=25;
}
}
View Replies !
View Related
System Font Question- FFF Acting Weird
Hi all, I just purchased a Font For Flash (FFF Business), and for some reason, Flash has designated the font a "system default font". Basically, it turns whatever I select into Helvetica or something. Any ideas as to what could be doing this? BTW, it has also done this with a free pixel font I downloaded. Other pixel fonts have not been converted to system default. got me.
thanks
View Replies !
View Related
Mask Acting Very Weird, Works If Drawn In One Direciton, But Not The Other.
First, please try running this code:
ActionScript Code:
var spr1:Sprite = new Sprite();
var gr:Graphics = spr1.graphics;
gr.beginFill(0x000000);
gr.drawRect(0,0, 300,300);
gr.moveTo(300,100);
gr.lineTo(100,300);
gr.lineTo(300,300);
gr.lineTo(300,100);
gr.endFill();
/* gr.drawRect(0,0, 300,300);
gr.moveTo(0,100);
gr.lineTo(100,300);
gr.lineTo(0,300);
gr.lineTo(0,100);
gr.endFill(); */
var spr2:Sprite = new Sprite();
gr = spr2.graphics;
gr.beginFill(0xFF0000);
gr.drawRect(0,0,300,300);
gr.endFill();
addChild(spr2);
addChild(spr1);
spr2.mask = spr1;
if you run it as is, you should get a red square with a sliver chopped off on the right. But if you comment the first draw, and uncomment the second draw it doesn't work although the resulting mask still would have a sliver cut off.
here are the two masks, left is the first one, right is the second:
Now of course I could just draw the mask with out drawing the rect first and splicing and instead just do lineTo for the whole thing, and it works fine. BUT the situation I need to use this for doesn't know the cross points. I'm basically drawing a rect and then splicing off some of the square to fit properly (to avoid a lot of math that is costly).
Does anyone know what is going on?
View Replies !
View Related
New Portfolio Site Launched: Preloader Acting Weird
Hello all! I recently put my portfolio, http://www.arnabghoshal.com
As you might notice, my preloader ONLY shows when there is about 1 second left in the load time.. it doesn't show for the rest of the load time. Is there any reason this is happening? Anything I should know about?
Please help. Thanks a bunch. This forum is a great reference point for anything flash!
View Replies !
View Related
Weird Sound Bug?
The weirdest thing keeps happening to me. I have a sound clip on a layer of movieclip (the movieclip is set to stop by default). The problem is, everytime i test the movie, the sound plays anyway. What could possibly be wrong?
View Replies !
View Related
Weird Sound Bug?
The weirdest thing keeps happening to me. I have a sound clip on a layer of movieclip (the movieclip is set to stop by default). The problem is, everytime i test the movie, the sound plays anyway. What could possibly be wrong?
View Replies !
View Related
Weird Sound Bug
Hi there,
I spent 4 hours on that point and didn't find a clue. I'm in front of a really weird thing (bug ?).
I wrote a method to fade a sound :
ActionScript Code:
Sound.prototype.fadeOut = function(speed){
if(speed == undefined) speed = 5;
var my_sound = this;
if(my_sound.getVolume() > 0){
my_sound.setVolume(my_sound.getVolume() - speed);
}
else{
clearInterval(my_sound.interval);
my_sound.stop();
}
my_sound.interval = setInterval(my_sound, "fadeOut", 20);
}
I'm trying to play a sound a little bit further in the timeline :
ActionScript Code:
var current_sound = new Sound(this);
current_sound.attachSound("s_id");
current_sound.setVolume(100);
current_sound.start();
...and I can't hear anything
If I remove my fadeOut method (or if I comment code inside this method) I can hear my sound.
I wrote a little script to test my sound position and volume over time, and I can see that it IS playing at the right volume (and I still can't hear it).
Any idea someone ? I have to deliver my project tomorrow morning...
thx
View Replies !
View Related
REALLY WEIRD SOUND PROBLEMS
Anyone have any idea why my website has a "humming" noise playing in the background? Go to my website... turn your speakers up a bit (not too much... but a bit more than normal) and you should hear a faint humming noise. I have no audio playing and just to be sure I included a stop all sounds action on my last frame. This noise occurs while on any page that involves flash (on my site). I have no idea why.... Please check it out and tell me if you have any idea (or if you hear nothing at all....maybe it's just me)
http://www.thesparticusarena.com
thanx
-Ryan
View Replies !
View Related
Weird Sound Issue...?
Has this happened to anyone. This is actually the second time for with on a different project.
I am using multiple wav files in my fla as sound effect. In the timeline, everything plays fine and I hear all of them. But when I publish the movie, one does not play? Any ideas??
View Replies !
View Related
Weird Sound Problem...
hi guys, i'm having this weird problem in flash at the moment...
what i'm trying to do is get a sound to start playing when the system clock ticks over to start a new minute (i am making some sor tof clock but using audio). So I have a drum loop in place that I want to start at the start of the minute.
The drum loop starts playing when it should but it plays really strangely (as if it is in slow motion or something?? the sound is quite painful to listen to). I can't work out why it's doing this or how to fix it, the only thing that has made the sound better so far is turning up the frames per second to something ridiculous like 150 or 200...
If anyone could help that would be much appreciated, this is the code I have so far below...
cheers,
Dan
__________________________________________________ _______
var seconds:Number = undefined;
var minutes:Number = undefined;
var hours:Number = undefined;
var timeString:String = undefined;
function returnLiveData() {
var systemTimeate = new Date();
seconds = systemTime.getSeconds();
minutes = systemTime.getMinutes();
hours = systemTime.getHours();
mySound = new Sound ();
mySound.attachSound("drumloop")
if(seconds == 0) {
mySound.start();
} ;
}
function controlTimeLive() {
this.onEnterFrame = function() {
returnLiveData();
}
}
controlTimeLive();
View Replies !
View Related
Weird Sound Problem?
I wrote me a small alarm clock file that plays mp3's as the alarm tone. I made the file back in the days of Flash 5, and have updated it as the versions progress up to Flash 8 and Actionscript 2.0.
The program works fine and plays when it's supposed to, but some of the songs are played at what seems to be 2x the speed. The songs play fine in Windows Media Player and other audio programs, but when it plays some particular songs via this alarm clock file it plays them at twice the speed; but only on a couple songs does it do that.
Below is the source code, if you wish to see the .fla then let me know.
The drop menu that's referenced to is dynamically generated via dynamic text
D=Song1.mp3#song+2.mp3#that+song+too.mp3
etc etc.
Code:
MusicA = D.split ("#");
MusicA.sort(-1, Array.CASEINSENSITIVE );
SelectSong.addItem("Play Random Songs", Random);
for (MAP = 0; MAP != MusicA.length; ++MAP){
SelectSong.addItem(MusicA[MAP], MusicA[MAP]);
}
SelectSong.editable = false;
SelectSong.setValue("Play Random Songs");
AlarmB._alpha = 100;
SRI = "notset";
UA = "on";
AlarmStatus = "( " add UA add " )";
Main();
setInterval(Main, 500);
function Main() {
CDate = new Date();
Hour = CDate.getHours();
Minute = LeadingZeros(CDate.getMinutes());
Second = LeadingZeros(CDate.getSeconds());
AH = ALH.getValue();
AM = ALM.getValue();
AS = ALS.getValue();
if (ALM.getValue() == 61082) {
AM = 00;
} else {
AM = ALM.getValue();
}
if (ALS.getValue() == 61082) {
AS = 00;
} else {
AS = ALS.getValue();
}
if (AH == 12){
AH = int (ALSS.getValue());
}
else {
AH = AH + int (ALSS.getValue());
}
//AllVars = "time - " add Hour add ":" add Minute add ":" add Second add "; alarm - " add AH add ":" add AM add ":" add AS;
if (UA eq "on") {
if (Hour == AH && Minute == AM && Second == AS) {
PlaySound();
if (SRI eq "set") {
// do nothing;
}
else {
setInterval (PlaySound, 45000);
}
SRI = "set";
} else {}
} else {}
}
function LeadingZeros(num) {
if (num < 10) {
b = 0 add num;
} else {
b = num;
}
return b;
}
function PlaySound() {
stopAllSounds();
a = new Sound();
a.stop;
if (SelectSong.getValue() == "Play Random Songs"){
rand = random(MusicA.length);
MAR = MusicA[rand];
}
else {
MAR = SelectSong.getValue();
}
where = "D:\My Music\";
Music = "D:\My Music\" add MAR;
NowPlaying = "Now Playing: " add Music;
a.loadSound(Music, false);
a.start();
a.setVolume(100);
}
View Replies !
View Related
Weird Sound Behaviour
Hey there,
I'm making a basic audio player now everything is working fine except this one minor hiccup. The problem is with sound position failing to be reset when i change track..i've debugged it till my heart is content and i know for a fact when i click the button the text value is being reset but it seems the object isn't. Is there any reason why this is occuring or is it default beahviour for streaming files? if it is can you please suggest a better method.
i've tried sound.loadSound(""); which i thought might clear the buffer...no dice.
Thanks.
View Replies !
View Related
Sound Weird Problem
Hi everybody,
I am having this weird problem with audio. And I don't have any idea of the reason why this is happening.
I have a movie which includes a sound library that I use to sync the animation in the root of the movie. I first had a compresion for the audio set up for each audio piece. Later, I set up a different compresion method, in the publish settings, to override the audio compresion in the audio.
Then the problem happened, now the audio is not on sync with the animation anymore, and the only solution I have found is to add frames before of after every sound in the sound library.
Has anyone any advice on how to solve this?
Thanks a lot
View Replies !
View Related
Weird Sound Problem...
Hi everybody,
I have weird sound issues over here that I can't seem to figure out...
I use an Interval to fade in a specific sound with this code:
Code:
_root.sound_theatre = new Sound(sound_theatre_mc);
_root.sound_theatre.attachSound("sound_theatre");
_root.sound_theatre.start(0, 1000000);
level = 0;
_root.sound_theatre.setVolume(level);
var level_in_interval:Number = setInterval(fadeInSound, 10, _root.sound_theatre);
// this is the sound fade in function
function fadeInSound():Void {
level += 1;
_root.sound_theatre.setVolume(level);
if (level == 100) {
clearInterval(level_in_interval);
}
}
Now when the user presses a specific button, the sound is supposed to fade out with this code (that is assigned to a keyframe on timeline where the movie jumps to when the user presses that specific button):
Code:
var level_out_interval:Number = setInterval(fadeOutSound, 10, _root.sound_theatre);
function fadeOutSound():Void {
level -= 1;
_root.sound_theatre.setVolume(level);
if (level == 100) {
clearInterval(level_out_interval);
}
}
Problem is: when the user presses that button very quickly - before the first interval is finished - the second interval runs through and fades out the music, but then still the first interval fades in the music again...
How can I kill that first Interval / function while it's still in process ?
Are there any other options to fade in a soundfile via actionscript besides the interval option ?
Thanx for your help in advance !!
Mike
View Replies !
View Related
|