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.
FlashKit > Flash Help > Flash Newbies
Posted on: 06-20-2006, 08:22 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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;
}
}
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;
}
}
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.
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
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?
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?
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
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.
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.
Preloader Acting Weird.
Here's a file of the preloader i'm trying to get working correctly... if i add a tween or anything to the loaded image(frame 3) it bugs out.. anyone help? plz. thanks
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
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!
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
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;
}
}
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?
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?
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
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.
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?
Buttons Acting Weird
i put text. and make hit area a rectangle.
but they're acting all weird. the hand doesn't stay. it blinks from arrow to hand.
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??
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.
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!!!!
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!
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.
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
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?
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
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.
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
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....
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!!!
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.
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
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.
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
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.
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
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?
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!
Button Help; I;m Stumped
Using Flash Mx,
I have created several buttons in a scene that on release; go to and play different labeled frames within the same scene. The problem is that the first time any one of the buttons is pushed nothing happens. If the button is pushed again however it executes the actionscript and jumps to that frame. Thereafter, it funcitons as intended and jumps to the various frames on first release. I am completely at a lost as to why flash is doing this. Does anyone know a solution to this problem?
Thanx
My Button Isnt Acting Like A Button On Stage
I made a simple button and put it on the stage and when i go to preview the scene the hand cursor doesnt pop up in the traditional way like a button. It shows up but it doesnt give me my mouseovers or anything like that
its on its own layer and on the top of the stack anyone have any clue? Its so wierd
Stumped On A Stupid Button
Hello fellaz.
Allright, cut to the chase. I'm going NUTS here, trying to find out how to link a site from a button. I've done this thousands of times with flash before, but it just wont work.................
Heres my code
on(release) {
getURL(www.google.com, _blank,);
}
i just dont get it... why why why!!?
And if i wanted to add the http://, it would treat it as a double slash, so thats no good.
please help this stupid_man
[F8] Why Won't This Button Work? Stumped...
Can someone help me figure out why this simple button won't work? It's located in the movie clip rollout, layer text, frame 41, and the button is called Symbol 1. Is it because of the stop function? I'm stumped! Thanks.
Flash Button Stumped
Hey everyone!
I just had a quick question, I am making an actionscript animated movieclip with an embedded button insde of it. But when I put a button inside it and use the correct dot structure, it doesn't seem to work... does anyone know why? I know you can't place a button inside a MC so i used a MC inside an MC with a rollover ,method... any help is much appreciated.
-FlashStick
Code:
//ALL Code is on the first frame of the main movie.
logoBar_mc._y = 500;
var targetY:Number = 0;
var distY:Number = 0;
logoBar_mc.onRollOver = function(){
targetY=436;
this.onEnterFrame = logoInertia;
}
logoBar_mc.onRollOut = function(){
targetY=510;
this.onEnterFrame = logoInertia;
}
//this is the button i cant get working...
logoBar_mc.port.onRelease = function(){
trace("hit");
}
function logoInertia():Void{
distY = targetY - logoBar_mc._y;
logoBar_mc._y = Math.round(logoBar_mc._y + (distY/5));
}
Movie Acting Like A Button
i have a movie clip that i want to play starting at a certain point when the mouse moves over it, then play to another point when the mouse moves out of it, how do i assign something like the onmouseover event to a movie clip
Button Acting Very Strangely
I have 4 scenes and on each scene is a row of 4 buttons with the following actions:
on (release) {
gotoAndPlay("scene 1", 1);
}
on (release) {
gotoAndPlay("scene 2", 1);
}
etc...
When you click on the buttons something very strange happens. If you click the 'scene 1' button once it goes to the first frame of scene 1, but if you click the 'scene 1' button a second time it goes to the first frame of 'scene 2'!
Does any one know what might be causing this?
Help With Button Acting Onto Another SWF File
Hello all!
Is this possible?
I have one file named menu.swf that contains buttons loaded in the browser. Inside the same browser I have under the first one another file named anim.swf that contains an animation.
My question is: When the user clicks a certain button in the first file (menu.swf) can it interract an action within the other file (anim.swf)?
Like when the user clicks the button in menu.swf the looped animation stops in anim.swf. Note that these are not loaded movies but 2 seperate movies inside the same browser thus within the same html page...
Thank you so mutch for your help!
AttachedMovie Is Acting Like 1 Big Button
My first post here...I was google'ing around to find an answer to my question and came across this site....what a find!
I have an .as file with a custom a class. When I call the function below, it does everything I expect it to do...and then some. The mc that is loading (attaching) acts like a button. The cursor turns into a hand and it also clickable. I do not currently have any links inside this mc...but eventually I will.
Code:
function loadContent() {
if (_level0.currentpage != null) {
_level0.currentpage.removeMovieClip();
}
//Load content movie clips
var clipName = this._name + "_content";
_level0.currentpage = _level0.attachMovie(clipName, clipName,
this.getNextHighestDepth(), {_x:401, _y:300});
}
What am I doing wrong...or what am I not doing at all?
Any help or guidance would be greatly appreciated. I am new Flash, but not programming. If any info is required I will be glad to do so.
Thanks in advance
John
|