ActionScript 2.0 :: (check1 == True) Which Isn't Working At All In The Code?
Feb 7, 2002
i am still having problems with the quiz i am doing. You sent me the code:-
if (check1 == true && pa1 == answer){
"well done you has chosen the right answer";
} else {[code]......
I think there is possibly something wrong with my checkboxes, as this is the only part (check1 == true) which isn't working at all in the code.The checkboxes and the buttons are all within the movie clip, have also tried them outside it aswell.
I'm using Flash Cs4 with As3 to make a project. In part of it I have an object which is invisible, but when a button is pressed is made visible. Only problem is, it won't make it visible.
I'm making a flashmovie using AS 3.0 and I have all my button inside a movieclip. (Scene of 1 frame with a movieclip, everything inside the movieclip).
Now, I set a button to false and I want it so that if you click on it, it becomes true. Then, another button(arrow) will do something depending on whether or not it's false or true.
My code looks like this:
stop(); var button_btn = false; button.addEventListener(MouseEvent.CLICK.buttonCli ck); function buttonClick(event:MouseEvent) {
[code]....
Now it appears to me that the button doesn't go to true at all...
I am having a really strange issue where I can't get any hand cursors to come up in Flash Builder. Anybody else have this problem. I ran into a situation where I've had to convert a ton of Flash Builder projects just to get the hand cursors to come up. Weird this is if I open the swf's in Flash the hand cursors will show up. Once they get on the web though, though don't work. It's almost as if the buttonMode property will not work in swf's compiled in Flash Builder. I've tried with Flash Builder 4 and 4.5 and no luck. I told a friend, and he didn't believe me. So I asked him to just do a simple test in Flash Builder to create a Sprite and add it to the stage, add a click listener, and set it's buttonMode to true. He has the same problem, no hand cursor. I've even tried to set useHandCursor true with buttonMode, etc.
Is there a way to make code on the timeline and code in a separate AS file communicate with each other?I have two buttons, a yes button and a no button.I have a confirm box which is a movie clip. In the movie clip I have the two buttons on it and code so that every time one of the buttons is clicked it runs a function.I have the rest of my code for the movie (so the code to make the confirm box appear) on a separate AS file.Is there a way I can define the functions on the movie clip and run the functions with the separate AS file?
I'm developing a flash game using the default SimpleButton object for my buttons and the hand cursor is working just fine on PC Chrome and Firefox and Safari for Mac, but Chrome on Mac is not letting me swap the default cursor for the hand cursor. I've even set useHandCursor to true for every button I add a click event to and am still getting nothing.
We've got no other rollover events, so it's important that the cursor switch.
I have an Actionscript coded flash file which run perfectly without any error. I am not getting why it shows an error after i do insert a scene before or a frame before the current frames;
I have searched all of the engines to find out why my SharedObject code is not working. It works when I publish from flash but not when live? I have this code in the first frame and the movie starts on the second. I only want the user to have to view the swf every other time they land on the page containing the movie. I am using AS2.
var replay = SharedObject.getLocal("save"); if (replay.data.name == undefined){ gotoAndPlay(2);
on (press) { _root.mySlider.mySound.stop(); if (_root.mySlider.mySound.stop()) { _root.dl = "Sound is Stopped...";
[code]....
this is on the stop_btn to stop music on playing and also show the text "Sound is Stopped" and as soon as the user click on play button the text is "playing"but this code seems to be not working?
I am pulling the words "true" and "false" from a query, but in flash I need them to be the values of true and false, not strings, is there a way to convert this datatype?
I created a drag and drop quiz following an online tutorial. It worked fine. Then I made a different one. I cut and pasted the code from the working file into the new one and changed the names of the movie clip instances. When exported (control +enter) I can pick up the MCs I want but I can't drop them; they just stay stuck to the cursor until I click on another MC. I have gone through the code and I can't find anything wrong. It just doesn't work I'm stumped. Here are the working and not working versions:
var counter:Number = 0; var startX:Number; var startY:Number;
I am trying to put together a little accordion animation for a site. I am using code from this site:
[URL]
I only need 3 panels instead of 4 so I took the code and changed it to this:
package { /** * Accordion Menu
[code]...
You would think that SOMETHING would happen now. Even if its just a strange movement of some kind. But nothing does happen. Not even an error message of any sort. I started messing with that X and Y value but nadda thing. All of my movie clips are named correctly. card1, card2 and card3. Maybe it has something to do with the packages? I have never used components before like tweenlite. I took the files and just placed them in the folder with my flash movie.
this is probably a very simple mistake made by many beginners. Basically, I have a preloader loading an external swf. The external swf is an image sequence. I wrote actionscript so you can scrub through the image sequence using the keyboard arrows. This works by itself but does not work when preloaded.
Okay, so I want it so when I press the button the cheese ON TOP of the bird appears/disappears. It works with the cheese outside of the bird movieclip but not on the cheese inside the movieclip.
I have this code creates a function at runtime (yes, this IS needed):
PHP Code:
var createdFunction = function():void { trace("Function Created"); } createdFunction();
Putting in in to the actions panel in Flash CS4 and compiling works fine, tracing the message "Function Created"...However, the Flex compiler gives me this
Quote:
Error: Call to a possibly undefined method createdFunction. createdFunction();
I have had this problem for a long time and have not been able to fix it. I am using ActionScript 1, although if you can help me using AS2 I should be able to change it. I have a static movie clip with no code referring to it called "ship". Its center point is 275, 324.9. I have a series of planets coming down from the top of the screen and I need to check whether you "died" or not. The planets movie clips are contained inside blank movie clips that are there so thre registration point does not change. I was using the code
I am using the following code snippet: but this error occurs Line 6 1061: Call to a possibly undefined method play through a reference with static type flash.media:Video. img1.addEventListener(MouseEvent.CLICK, fl_ClickToPlayVideo);
function fl_ClickToPlayVideo(event:MouseEvent):void { video_1.play(); //the error is referring to this line here }
Now I'm working on a Website which contains a XML Carousel Gallery, with the coding below.Now this all happens on the homepage. I would like to stop the xml on other frames though. Is there any coding I can use on my Buttons, to stop the XML working while going to another frame?
stop(); var folder:String = "thumbnails/";// a folder for thumbnail files + an XML file var total:Number; var radiusX:Number =180; var radiusY:Number = 10;
The code works fine, but every time I click Auto Format it changes the code so it doesn't work anymore, giving me all kinds of errors. I perceive this as something imperfect in the code and potentially preventing it from working as efficiently.
Selectedcolor, true to the text true or false is false text into print.colorPicker component in, I select Export to a selected color, the color value myMC texte into summer, but accuracy can not control.
var myColorPicker:ColorPicker = new ColorPicker();myColorPicker.editable = false;myColorPicker.visible = false;myMC.visible= false;myColorPicker.addEventListener(MouseEvent.CLICK, clickHandler);myColorPicker.addEventListener(ColorPickerEvent.CHANGE, changeHandler);[code].........
[code]It works fine when I press the button but not when I press the enter key.Just to set the context I want users to be able to use enter to enter an answer into a grid before moving on to the next cell. My cells are all labelled A1, A2 etc so that I didn't get confused. As I am and will always be a newbie I couldn't figure out a function to do what I wanted so came up with what is probably a long winded way around: store the textfield instance name in an array and then call the item in the array in conjunction with setFocus - like I say it works when I click the button (which I intend to hide off screen).
I really hate when you read a tutorial from some "expert" and what it tells you to do is wrong. I was doing a tutorial for a XML slide show, and the last line of code doesn't work quite right:
[Code]....
For some reason that only sends the my_playback_counter to 1. And it just sits there twitching. So when I tried to change the tutorial code to: