Insanity.
Hey I have a problem. Someone suggested this would work:
Code: if (item == whois) { gotoAndPlay ("whoisload", 1); } else if (item == contact) { gotoAndPlay ("contactload", 1); } I have buttons that set the variables. The idea is to save some frames. What I want it to do is check what the variable is, then go to a certain scene and frame...it half works...it goes to the one that is first on the list (if, not else if) automatically no matter what the variable is...:S your help is greatly appreciated.
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-02-2001, 10:47 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Insanity
Please can some help as I am going insane trying to figure this out!
If I upload my fla file on the internet can someone download it and take it a look at it!
- I am trying to duplicate my scrolling menu but as diffferent bits of action script refer to instance names, none of the duplicated movie works! - All will make more sence when you see the file.
Thanks for your time,
Kaan
Insanity Is Near
i'm working on a multiple-scene scrolling background, the background is one very long photograph, it looks fine in the beginning, but after i make a couple of scenes part of the photo dissapears and turns into this light-greenishblue area.....WHY????? there's only so much a man can take, and it's a matter of time before i do something extremely violent to my computer....pleeeeeeeeze help me on this, i can't take it much longer.i've attached the file if anyone's brave enough to take a look...
Get Url Insanity...
I going mad here!
Done this a thousand times - no problem.
Now suddenly today get url not working for me!
the code:
on (release) {
getURL ("http://www.webaddress.com", "_blank");
}
the file is a standalone projector
works - on my authoring machine(not online - but launches browser), but on my testing machine online it no work- just nothing happens not launch browser - nothing!
authoring machine runs ie 5 flash player 5
test machine runs Ie6 flash player 6.029
but there cant be a problem with get url and newer player/browser surely. I go mad - when in this situation before I find usually something mad I done - but Please anyone see what I not do?????
the exe and swf not launch the browser or site, but if I embed swf in a html then it works fine....
any help????Plssss
ASP Form Insanity
hello,
try as i might, i have not been able to get my flash movie to communicate with my asp script.
i have a flash movie that contains a movieclip with the instance name of "enter". this clip contains 3 "input" text boxes called firstname, lastname, and certcode. in this clip is also contained a "submit" button. the action attached to this button is
on (press) {
loadVariables ("search.asp", "_root.enter", "POST");
}
my asp script is
<%@ Language=VBScript %>
<%
Session.timeout = 15
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "******","******","******"
Set Session("MyDB_conn") = conn
FirstName = Request.Form("firstname")
LastName = Request.Form("lastname")
Certification = Request.Form("certcode")
strSQLQuery = "SELECT * FROM wbt WHERE FirstName = '"& FirstName &"' AND LastName = '"& LastName &"' AND Certification = '"& Certification &"'"
Set rsSQLQuery = conn.Execute(strSQLQuery)
if rsSQLQuery.EOF then
Response.Redirect "installer_main.htm"
else
Response.Redirect "installer_correct.htm"
end if
does anyone have any idea why my send button is not communication the variables entered into the input text boxes to my asp script? i have also tried "get" and "post" as well as trying to load the variables into a level and not a target......still no luck. i would really appreciate any help...thanks in advance.
Targeting Insanity
Hi all,
I'm having a bit of a frustrating problem. I have 6 drop down menus. In each menu, on (rollOver) state on a button causes the menu movie clip to jump to a different frame (frame 20) that shows the menu sub-items. When a menu sub-item button is selected the movie clip jumps back to frame 1 which shows no menu sub-items. This works fine. I used to have an invisible button outside the pull down area that caused the movieclip to jump back to frame 1 (no menu sub-items). This also worked fine. Now I want to change it so that there are no invisible buttons; i.e. the pulldown menu stays visible even when the mouse is not over the sub-items. Then I want each of the other drop down menus to cause the other movieclips menu sub-items to disappear (go back to frame 1) on a rollover event.
I have in menu1 movieclip frame 1:
on (rollOver) [
_root.menu2.gotoAndStop(1)
_root.menu3.gotoAndStop(1)
_root.menu4.gotoAndStop(1)
_root.menu5.gotoAndStop(1)
_root.menu6.gotoAndStop(1)
gotoAndStop (20);
I am using the insert target path button so the syntax, etc. is correct.
In theory, it targets the other movieclips and tells them to go to the first frame where there are no menu sub-items listed. But this isn't what is happening. The other movieclips stay on frame 20 where the sub-items are shown.
I hope I did a good enough job explaining my problem.
Thanks,
Deric
Variable Insanity
hi, please help me. i think i'm pretty close.
i have two different buttons in a movie clip that set two different variables. here is the code for button 1
on (press) {
_root.bottMainClip.botMoving.varResume = "x";
here is the code for button 2...
on (press) {
_root.bottMainClip.botMoving.varAbout = "x";
okay, then i have a different movie clip that looks to see which one of these variables is present and then perform a particular action based on which variable is there. here is that code...
onClipEvent (enterFrame) {
this._height=this._height+10;
this._y=this._y+5;
if (this._y>=100) {
this._y=100;
}
if (this._height>=400) {
this._height=400;
//if (_root.bottMainClip.botMoving.x == varResume) {
tellTarget ("_root.resumeClip") {
gotoAndStop (2);
}
} else if (_root.bottMainClip.botMoving.x == varAbout) {
tellTarget ("_root.resumeClip") {
gotoAndStop (3);
}
}
}
}
i have the code commented out (//) where my variable checking code begins. it never seems to make it to the second variable check. when my first button is pressed i want it to set a particular variable and then if the second button is pressed i want it to overwrite that variable with the new one. does anyone know and care to tell me why this isn't working??? thank you so much in advance for any soultion...
My Own Scrollpane Insanity...please Help
Ok, everything works fine, the MC loads into the scrollpane correctly, but here's the deal: in the MC I am using the checkbox component as well (8 instances of it, actually, plus a submit button). When not in the scrollpane, the MC works fine - actionscript and all. But once I place it in the scrollpane, the stupid checkboxes disappear! The labels still show up, and once in awhile I can click on the space next to the first label, where the 1st checkbox should be, and it will show up, but other than that they aren't showing up. What's the deal? Can't I use a component within a MC that's in a component?
The Insanity Continues...
I need to return a reference to any one of 3 thumbnail mc's contained in a scrollpane. But scrollpane.getScrollContent() only returns a reference to the container, nothing about what it contains or where I clicked.
Do I need to include invisible buttons overlaying the thumbs, add a listener to each, or what?
What's the strategy to target individual MCs once they're in a scrollpane?
GetNextHighestDepth Insanity
Hello,
Some months ago, I started a project involving clicking on a card, and having in flip over. I've finally solved the animation end of this project, but I have been stuck quite some time on putting multiple cards into a deck, pressing on the top card, having it flip to the side, and clicking on the next card, and so on.... I want each card to go to the top of the deck when pressed, and flip over. Here is a link to my file; please look at it as there are some nested animations that are absolutely necessary for the animation to look realistic:
Card Flip
Each card is a movie clip contained within a movie clip. I use the following code to flip the card back and forth:
filingCabinet.flipFilingCabinet.onRelease=function(){
filingCabinet.gotoAndPlay(2);
filingCabinet.flipFilingCabinet.gotoAndPlay(2);
filingCabinet.getNextHighestDepth();
}
The problem I'm having is that the cards seem to go in any order when flipping them back and forth, whereas I need the card that is clicked on to be on top of the deck always. Not sure why my code does not work. Any help, is really, really appreciated. I have had others look at the code who know javascript, but this is a different ballgame, and my skills are not enough to figure out why this isn't a simple matter to solve. As I said, my skills are not so good, so an example with y code would help me out best in understanding why this doesn't work. Chances are, if you just tell me something like "use x method" I will have no idea how to implement it. Extra explanation is greatly appreciated as I have been trying to figure this out for weeks...
Cheers in advance
P
Key Object Insanity :(
Hi,
I have a script where I'm moving something around the screen using the keys. Up, Down, Left, Right. Everything works fine, until I've added the code to check for UP+RIGHT etc so the object that I'm moving would move diagonally.
However, if I press lets say DOWN + RIGHT and it begins to move diagonally down right, when I release down and just continue holding the RIGHT key, it still goes diagonally but now ignores the limits on _y that are used to prevent it from going down too much. Anyway someone could help me out here? Should I upload the code here?
OnMouseUp Insanity Is This A BUG? Or Am I Doing S
I have this code:
MyThumbnail.prototype.onMouseUp = function() {
if (this.hitTest(bigFrame.nowLoading_mc)) {
bigFrame.album.showPhotoAt(this.depth, -120, -65);
} this.scaleOut();
}
// this is what the MouseUp event lauches
MyThumbnail.prototype.scaleOut = function() {
this.onEnterFrame = function() {
this._xscale -= 20;
this._yscale -= 20;
this._alpha -= 10;
if(this._xscale < 10) {
trace("LESS THAN 10");
removeMovieClip(this);
bigFrame.album.loadThumbnail();
}
}
}
The problem is that it fires all the time! No matter if it hits the
bigFrame MC!! Now here is the interesting thing...
If i remove "this.scaleOut();" from the onMouseUp event and add something
like a "trace" command, it will trace like it should, once the movie is
dropped over the bigFrame's nowLoading_mc.
Can anyone tell me why is this happening? And how can i fix it?
Thanks
External JPEG INSANITY
Hi,
I'm trying to use a nice xml/flash slideshow posted on this site (XML_Imag-Ed_Reyes-7890) by ed reyes . It's relatively simple yet nicely done.
I stripped it down to the essentials and created a folder of external jpegs to use in my version, just like the original. The jpegs were created to the exact dimension of the image box within the movie so there is no resizing required. YET, when the swf loads the jpegs, they are larger than I specified! (by about 20%) I've tried everything I can think of and can't solve this. Even more frustrating, the sample jpegs work just fine.
Is it in the publish settings? Any ideas on how to stop this insanity???
Thank you!
Brink Of Insanity Over PONG
I am this close to loosing it. All I want to do is make a pong game. And for some odd reason my action scrpt keeps getting messed up or something. Idon't know what to do, this is for a school project and this stuipid game can't even do the basic functions.
I'm trying to use things you learn in physics in Pong, like finding the angle at which the ball is coming and the angle it will bounce off. But I can't even get it to properly bounce off the bars and walls as it is. I don't even no how to find or apply all that angle stuff...!
If anyone can help me I would be so greatful.
Thanks!
[CS3] LoadVariables Leading To Insanity
Situation: On the satge there is a large image of a map. This map is a movieclip, instance name 'map'. Inside this movieclip there is an invisble button over a certain location. The 'over' frame of this movieclip contains a box with information about that are so it will appear when the area is moused over.
I want to load variables from an external text file into the information box. The dynamic text fields have the var field set to the text file variable names. The text file looks like this:
Code:
&jh_base_name=Mezcal&jh_total_uploads=28647&jh_your_uploads=4&jh_upload_time=15-03-2008
&wp_base_name=WheyPat&wp_total_uploads=39865&wp_your_uploads=7&wp_upload_time=19-03-2008
and it is called data.txt
The frame of the main movie that contains all ths has the line:
loadVariables("data.txt","map");
None of the variable appear though.
What's driving me mad is that, to test this, I created a new file; created a movieclip;created a button within the movieclip;created the same text fields on the 'over' frame AND IT WORKS.
What is my file doing different? I can't work out what's stopping the variables getting through
Button Sound Insanity
Hi -
Just when I thought the sounds in my buttons were working I discovered that with 3 btns on the stage - 3 instances of the same button symbol - their volumes will differ drastically. The single button symbol was made by the just dragging the mp3 into the Down frame of the "sound" layer. Should be simple - how could I have messed THAT up? I did use "Edit" to adjust the volume but that level should still stay the same for all 3 instances, No?
Please - a sanity check. Has anyone else experienced this? Is there a fix?
JL
AS2 / FL8
Edited: 10/02/2007 at 02:02:23 PM by jlucchesi
Drop Down Menu Insanity
Hey,
I’m putting together a project based on data security and decided to use flash but I am having trouble with a drop down menu. I know the forum is full of these kinds of posts but I don’t know what I am doing wrong, maybe my layers are in the wrong order or I’ve missed some script but the syntax is correct.
Basically all I want is the drop down menu to work for now and ill sort the rest later. I used to do it differently and it would work but then I could not get a button working inside a button and feel this is the best way to get the submenu buttons working (I am going off on a tangent I know)
Its not very easy to describe what is wrong since I don’t know what is wrong so if anyone here would be kind enough to look at a tiny .fla file I uploaded to:
http://www.freefileupload.net/file.p...buttonwifi.fla
Id be very grateful and hopeful regain my sanity...its getting extremely
frustrating.
Thanks for any info
StopAllActionscript(); And Stop The Insanity......
G-Day Everyone,
Today, I am posting about an issue that has been plaguing me for some time now. I have posted about it before with no luck, but I feel today is a new day. I think I finally understand how to articulate the concept in a way that is easy to understand.
For quite some time now, I have been developing a presentation model for a massive library of flash resources. One problem that I have run into, (the one im looking to solve today) is the instructor using the presentation model would like to be able to start/pause the animations.
One way this can be achieved by placing all of my code inside a condition that is toggled with a button.
Code:
var animationActive:Boolean = false;
myButton.onPress = function() {
if (animationActive){
animationActive = false;
} else {
animationActive = true;
}
};
onEnterFrame = function() {
if (animationActive){
/* Animation code goes here */
}
};
The problem I run into is I have 1200+ files that need would need to be edited. Because each movie is unique there is no easy way to implement such a system.
This is when I shifted me attention to controlling the loaded movie via the presentation model. This is where I hit a brick wall. Since all of my animations are 100% animated with actionscript, and only use one frame on the timeline; to achieve this I need to be able to toggle the actionscript on/off from the parent movie. Preferably without needing to edit all the resource files.
I am not necessarily looking for a magic piece of code to solve all my problems. I have been banging my head against the wall in this issue for way to long. I think I need a third party perspective on this issue, a fresh way of thinking.
If anyone has an idea, please toss it out there. I need some inspiration.
Thank you in advance.
-Edward
Flash Math Insanity - MCs Falling Out Of Synch
Hey all -
I've got three MCs on a stage, and each one is living on a separate 'plane': the foreground, the middleground, and the background. Moving the mouse left/right causes all three MCs to scroll back and forth. All three MCs have a script that duplicates the mcs to give the illusion of infinite scrolling (or, in this case, of moving in a circle). Here's the dilemma:
The relative speeds of the three MCs dont seem to be in synch, so as you continue to scoll left/right, the contents of the three MCs fall out of alignment, and i cant figure out why this is. All three MC speeds are controlled by a global variable speedControl, and each individual speed is determined in the following manner:
speedMC1 = (Stage.width/MC1._width)*_root.speedControl;
speedMC2 = (Stage.width/MC2._width)*_root.speedControl;
speedMC3 = (Stage.width/MC3._width)*_root.speedControl;
It's crucial that these MC's stay in synch. Is there any idea why they wouldn't be? do the MC's widths need to be in direct proportion to one another? Or perhaps theres a problem with my duplicating script? If anyone has any suggestions, of if you would like to look at the actual file, I'd be happy to email it to you (I'm hesitant to post it here for propriety reasons). Thank you all so much.
Cheers
j
|