I need these things fixed because I can't figure it out:
1-how to do a send score
2-my reset doesn't work
3-it won't give you a game over
4-how to make it randomally decide on having a reg apple(10 pts.) or rainbow apple(20 pts.)
I have a hitTest that is supposed to update the variable so the text of the score will go up one every time. But unfortunately, it works but it doesn't. It passes the number to the variable but the change doesn't appear until you enter the frame again. For example the money sign hits the piggy bank twice. the score will stay 0 but if you go back to the frame it will have a score of 2. How can I make it update live?Here is the code I have on the frame
Code: if (_root.money.hitTest(_root.pig)) { _global.score += 1; }
I'm using Flash CS3 and ActionScript 2. I've created a simple contact page, inside a movie clip (because I got it fading in and out), I've put the script on the main timeline, so not inside the movie, but the send and reset buttons won't respond all. I've checked the instance names and spellings are correct, here's the script I'm using:
[Code]...
ps. contact_tween is the name of movie I created to fade the whole contact page in and out.
I set up the point scorer like I have in other games and it doesn't move for some reason. I trace the score and it is perfect so it's my code trying to get the this.score.score_txt.text = String(this.pointsI); to record that fails
There�s a great tutorial for sending and loading XML (in AS2) here:[URL] However, I�d like to have an equivalent in AS3. I�ve attached my attempt, but it doesn�t work � even though it doesn�t throw any errors. (PS: there are similar examples 'out there' for Flex but after buying the book 'Learning AS3', by Shupe/Rosser the example in Chpt 14 doesnt seem to work whilst I cant find anything of use in O'Reilly's AS3 essential book).
I'm trying to fix a piece of flash code that sends variables to a vb script that updates the database. but whatever I do, the database is not updated and there is no variable sent back to the flash. Here is my code:
Clearly I'm sending two vars (pos and user) to the script and should get re_pos and re_date values back. But I get nothing. The code used to work when sendandload uses GET instead of POST. But now neither works. POST option returns no error in the Flash testing panel and GET give me a "script URL not found error".
I have this when the scores should be increasing [AS]_root.score +=4;[/AS] It works the first time and goes from 0 to 4, but any time after that it just adds fours. So in the end it ends up saying "4444444444" or something. I tried it this way also:
[AS]_root.score = _root.score+4;[/AS]
But that didn't work either. It just did the same thing.
I've been making this animation for a Uni project but i've come across some really annoying bugs which are stopping me from getting the top marks and I was hoping someone here could help!
-Cant reset score with button
-Can't move to next Scene
I wasn't sure where the best place was to upload the .fla so I picked mediafire.so far in my attempts to fix the reset score i've tried adding.[code]
I've decide racing car game! and I want to be able to send the score to send to a mail box or send it to a table in php or database! at the moment I can send the Score Variable to be display in PHP but its not the way that I want!
Script that send the Score to php submit.onPress = function () { getURL ("getVars.php", "_blank", "POST");
Having a little issue here with TIMER, basically I am looking for the timeline to advance 1 frame after 3 seconds, OR on MouseEvent.CLICK advance to next frame (before the 3 seconds it up). Which would then reset the TIMER. So, on CLICK go to next frame, OR wait 3 seconds and go to next frame (while having the TIMER reset both times). So...
Wait 3, (timer resets) wait 3, (timer resets) CLICK, (timer resets) CLICK, (timer resets) CLICK, (timer resets) wait 3, (timer resets)wait 3, (timer resets)CLICK, (timer resets)CLICK... You get the idea.My issue is the timeline, over time the TIMER time doubles, it doesn't reset... I am sure this is pretty basic and I am over thinking.
I am trying to create a high score table offline that doesn't need php just relies on dynamic textboxes.I am basing it on a kind of random football results generator. I have been able to get the random scores and add points to a team depending on the score but now I would like to be able to display them in a 'league' table based on their points score.
When you click on the reset button, this error below comes up. If you can't find the button it is the navy colored rectangular thing in the lower left corner of page.[code]
I'm trying to get this reset button to work. I used to use this code in Flash MX but it doesn't work in AS2.... Code: on (press) { _root.playb.onRelease = function() { _root.gotoAndStop(1); }}
I also tried: Code: loadMovieNum("YourFile.SWF", 0); But the code doesn't work after I export the .swf to my web server and view it on the internet.. (it just disappears when the button is pressed). Code: gotoandplay("start") Doesn't work because I need to reload the code....
I decided to try to use setInterval for myanimation, which is just a mouse trail.However, I'm trying to get teh mouse trail to be a dynamic mask.In my previous swf this was achieved by using a holder mc with the animation inside and then using this as the mask. But this time I just canpt seem to hit on the right way to get it to work. The code I am using for the mouse trail is:
Code: var i:Number = 0; var myInt:Number; var t:MovieClip;[code].....
in the function, but now the trail doesn't resize and the mask still doesn't work.
Im designing my own game in flash, iv set up a score text box and it works fine. Except i just cant seem to get it to gotoandplay another frame,scene, when it hits a certain score??
I have a button object that I need to scale to align with the variable width of an array of images.However, when I set the width in code, the button does not actually become that width. Tracing out the width gives me the correct value, but on screen.. it's off.
I've proved it to myself by scaling the same button object manually in the properties pane and visually comparing. Both of the buttons below have a width of 410.
i am building a shooting game and i was wondering if it is possible to have the movie go to frame 3 if the score = 500.I.E Score is displayed in a dynamic text box and everytime the enemy is hit the:
_root.score +=50 ============= on the first frame of the film i have the code
I've got troubles with the sendAndLoad function for a couple of days now. It just doesn't want to send any request. My actionscript looks like this:
ActionScript Code: test.onPress = function() { _root.test.testText.text = 'I needed that one!'; var resultObj = false;
[Code].....
These files are all created for testing purpose. There isn't any productive idea behind and the php file is not collecting any post or get data. Just to keep it as simple as possible, trying to understand why it's not working.
I'm already happy if sendAndLoad would finally send one request to this php file as a start
Just new in forum and just new in as3 programming. All i want to do is to make some physics simulations (i'm physics teacher...). So i made my first sim with the following code, just to simulate a simple motion with constant velocity. It works ok, except the part i need to reset the display by the means to start the motion all over again (reset button). Then the motion starts but the traces of the previous motion remains on stage. I tried the null command (sp=null) but the sim could not start again because the sp nedded to be non-null...
I have an issue with adding a reset button to my drag and drop movie clips.The problem is, if a student drags a movie clip to a wrong location on the SWF file I want them to be able to hit a reset button that would take them the same SWF that they opened and what would showup would a clear page for them to restart their drag and drop exercise.I know how to make the button for this just want the proper action script to be able for user to start over with no movie clip symbols on the page.
I have a result screen that shows bonus points and such. I want each text field to increment one after another and also have it increment by a certain amount each frame. Result Screen pops up. First is the player score check the player score, is it more than the score we want to display if the player score is greater than the player display score by 100 increase the player display score by 100 if the player score is greater than the player display score by 10 increase the player display score by 10 else increase the player display score by 1 when finished move to the next score...and so on. I have thought of using timers to move from one score to the next, but not being in an Event.ENTER_FRAME it only does one if then moves to the next one.
Also the if statement for incrementing the score looks ridiculous and I'm thinking there has to be a better way to do it. I was thinking of making it a separate function but then I wouldn't know what to return, or how to return it so it looks like its increasing and not just showing the total number instantly. I'll try to expand on it a little more.
I am trying to do a contact form, except i cannot get the SEND PHP to work..Its really getting on my nerves. i have been on it for 4 hours now and i still cant get it to work.. can anyone point me in the right direction.[code]
reset in google yields only its use for timers.However I have code bg.reset() which I suppose puts the background back to the beginning of its timeline.
I have a Flash website with a web form that I cannot get the submit button to work. I was able to create a button for reset to work, which I will post that action after the one for my form. I have an instance of web form (which I placed onto my contacts page) created with onsetfocus code and this is the parent form t1_2 and this is the code I have assigned to this form.
I have downloaded a flash from template monsters and its great but I have one issue that nobody seems to know how to resolve. If you go check contacts there is a message box where you can type your message , subject, and name. Under the message box are 2 buttons < CLEAR > < SEND >. How to fix up these buttons to work? Clear should delete the message. And I'd like some other way to send the message besides mailto actionscript. Attachments: 23251.swf (2.2 MB)
I have application that uses the send functionally in the NetStream on the server-side. When a connect to the app using rtmp I am able to see the send come thru but if the app uses rtmfp it does notI gone thru all the examples in setting up a mutlicast app and I know the app works because when I publish a video out everyone in the group sees the video. The only thing not working is send. I've also set dataReliable to true.