Actionscript 3 :: Resetting A Media File In Flash CS5?

Mar 9, 2012

I've got two Actionscript files linked with one .fla file. The file Document.as is suppose to support the keyboard controls and the mouse controls, whilst the Reset.as is suppose to control the reset of the card (this is an interactive birthday card). I've added this on the 'Reset.as' file, however, when the "reset" button is pressed, nothing happens! None of the images move away, or anything! Am I doing something wrong here? All the files have been given instance names! Here is the 'Reset.as' code;

package src
{
import flash.events.*;

[code].....

View 1 Replies


Similar Posts:


Actionscript 3 :: Resetting Objects In Flash CS5?

Mar 16, 2011

I'm making a simple platform game in Flash CS5 and Actionscript 3.0. When the player loses all their lives, I want it to redirect the player to a "Game over" screen where they can select a "Try again" button to restart the game.

Set everything (player, background, etc) to visible = false
Set "Game over" movie clip to visible = true (it is invisible during gameplay)

Have the button in the "Game over" movie clip hide the movie clip then re-show all the gameplay elements.Reset position of player to start, set score to 0, lives to 3, etc..It's probably not a very good way of doing this but if it works, then I'm happy. I just want the "Game over" screen to show briefly and if the player clicks the "try again" button, they can play from the start.

Now, the problem with my implementation of the above is that when I set all the gameplay elements to visible = true after having them set to false, the game has stopped.. keyboard input doesn't reactivate and the game elements are shown but aren't active. Is there something about the visible attribute I don't know? Does it mess with the "state" of an object? Here's some snippets of code from the Actionscript file...

if(lives >= 0) {
//print number of lives
}[code]..........

View 2 Replies

ActionScript 3.0 :: Completely Resetting A Flash Game?

Feb 7, 2011

I've programmed an entire game from scratch, without using class files, and there's no menu yet, and I'm not sure how to reset the game without using class files or resetting every single thing manually.
 
I'm making a Flash tower defense game with a friend; I'm doing all the code. I'd never used Flash or Actionscript before, so I started off directly programming the gameplay, to figure out if I'd be able to do it. I've done everything from scratch so I didn't know where to start or the "right way" of doing anything, so I figured out as I went along, which went much better than I expected.
 
So now I've got the gameplay almost completely programmed, the art assets are essentially finished and game looks great and runs (reasonably) well (and the occasional performance problems are due to graphics rather than code), etc. I didn't know how to use class files in AS3 when I started making the game, and when I read up on them and realized you can't import the class files into the project and must open and edit them separately, I was livid and decided not to use them; I was happy with how the coding was going anyway.
 
So now we've got a game where as soon as you run it, it goes straight to the field and the game starts; we haven't implemented a menu yet. We've reached the point of playtesting and it's becoming a huge nuisance having to quit the SWF and reopen or recompile it every time we want to restart the game, so it's time to program a "Reset" button. I thought this would be as simple as making the stage go to a different frame and back to the first frame, but that doesn't work, so now I'm utterly stuck. It looks like the easiest way to reset a game is to load the entire "game" as an object (or something to that effect, I forget exactly what I've read), then you can unload and reload the game object to reset it? It also looked like it would require class files which I'm hoping to avoid.
 
I don't think it's feasible to manually remove everything from the stage, reset all the variables, and delete all event listeners and references so everything is reset/garbage collected properly.
 
Thinking about it more, I'm also not sure how I'm going to get a menu to load before the game in its current state. Maybe I can move all of the gameplay to the second frame and make the menu on the first frame?So, is it possible to reset the game without involving class files?

View 10 Replies

Javascript :: Jquery Hide A Div That Contains Flash Without Resetting It

Dec 1, 2009

I have written a modal using jquery UI and it appears at the front of a flash movie thus the html inside the modal becomes corrupt, I tried to hide the movie right before modal gets triggered and reappears after closing the modal, works well but each .hide() and .show() the flash movie gets resetted while all I want is to hide (without removing the movie) and displaying it once it is triggered to .show that modal div.

View 3 Replies

Flash - Resetting Player After Video Has Played

Mar 30, 2011

I wasn't able to add all the code before. Essentially after a movie plays I want the swf to reset to it's first original loading frame.

function stopVideo() {
showPlayBtn(true);
Tweener.addTween(videocontrols.stopBtn, {
_alpha: 100, time: 4.000000E-001, transition: "easeOutCubic"});
myStream.stop();
[Code] .....

View 1 Replies

Actionscript 2.0 :: MySQL - PHP - Flash And Resetting The Database Monthly

Jun 18, 2008

First time poster and new to the board. I have been asked to solve a difficult problem and am seeking guidance in completing the task. Basically, to give you an overview, I need to build a custom tracker that counts how many clicks per month a particular link(s) is/are hit within a website I built. I used Flash (ActionScript 2.0)and XML to build the website along with pulling in external swf files as needed. I have an idea of how to create the MySQL table using myPHPAdmin. I know I want to build an actionScript class to pull into the core swf that holds a majority of the functionality, and to create a PHP file that will pass the info to the simple MySQL database AND send an email out on the last day of each month with the totals from the database. Then I need to reset the database to 0 for each link that we are tracking on the 1st of every month.

My goal is to make it as reusable as possible in case I am asked to follow any more links within the site for documentation. Does anyone have some good documentation, examples, or reference links to point me towards? I have an idea of what I want to do, but I'd also like some other people's input on how they would possible move forward in completing this task.

View 4 Replies

Media Server :: How To Record MP4 File In Flash

Jun 13, 2011

How to record video file in MP4 format with H.264  codec and also i would like to know that how i will set codec type in flash as3.

View 6 Replies

Flash :: Load F4V File To Media Display Component?

Jan 3, 2011

I am trying to load .F4V file to Media Display Component on button press using Following Scriptvideo.setMedia("support/name.f4v","F4V")But its not working,

View 1 Replies

Flash :: .asc File Runs In The Flash Media Server?

Jan 26, 2011

I would like to know if it is possible to run Action Script Communication Files(.asc) on an red 5 server, just like how a .asc file runs in the Flash Media Server.

View 1 Replies

Media Server :: Convert A Flash Object On A Webpage To A Fla File?

Nov 14, 2011

I made a flash effect for my friend's site and he won't let me get the flash back after a fight. I can see the effect on the homepage of his website. Is there any way I can get the flash to an fla file on my computer? Is there any way I can find the swf file on his websites system and convert it to an fla?

View 2 Replies

Flash :: Media Server - Isn't Able To Pass Metadata Of F4V File Into The Stream (RTMP)

Apr 18, 2011

Are there any way that Flash Media Server isn't able to pass metadata of F4V file into the stream (RTMP) if F4V file was encrypted with Flash Access?

View 1 Replies

Professional :: Convert A Flash File To Quicktime Or Windows Media Player?

Dec 2, 2011

Can I convert a Flash file to Quicktime or Windows Media Player? If so....how? (Also, is swf the only file format on Flash?) I've been reading I need to download some converter to do this.

View 5 Replies

ActionScript :: Create Custom Class In Flash Media Server 4 In Asc Code File?

Feb 22, 2011

How would one create custom class in Flash Media Server 4 in asc code file?[code]...

View 1 Replies

ActionScript 3.0 :: SWC File In Which I Also Include All Media Files (mp3s) That Are Part Of Flash Application?

May 1, 2011

I wish to save my flash outpout (SWF) as an SWC file in which I also include all media files (mp3s) that are part of my Flash application. Currently these files reside in folders under my main library where all flash entities (AS3 code, buttons graphics etc reside)What software do I need to use to accomplish that?I now work in CS4 under winXP

View 0 Replies

Flash :: Media Server - Main.asc File To Return The Current Directory Listing To A Application

Aug 12, 2009

I need the main.asc file to return the current directory listing to a flash application.

[Code]...

View 1 Replies

Xml :: Flash - Umbraco - Automatically Make Changes To A File With A Media Item Upload Or Delete Event?

May 17, 2011

I'm looking for a solution to the following problem and I'm not sure if this is possible to do with Umbraco.We have a Flash movie which will read in images/paths to images and an accompanying title via XML and we need to be able to manage these through Umbraco.Is it possible to program an event for when an image is uploaded or removed from this specific folder so that it makes changes to the XML file and so it adds or removes the corresponding data?

View 1 Replies

Media Server :: Connection Failed When Loading .asc File On Main.asc File

Jan 6, 2011

Got a really big problem here. I keep on getting "NetConnection.Connect.Failed" when I load a .asc file on my main.asc file, i use the method load() in my code. I really don't understand why this happens, but when i comment out the code that loads the asc file, I can successfully connect to fms. I can't figure out what's happening here. Btw, i'm using fms4 in windows 7 32bit.

View 6 Replies

Media Server :: Setting File Name Of Captured File In DVRcast application

Jun 29, 2011

I've looked through the scripts in the scripts/ directory, but haven't seen anything obvious.

I would like to be able to specify the file name to capture the stream to. At present, the capture file is always named the same as the stream, which means if I stream for a bit, stop, then restart, the originally captured file gets overwritten. I'd like to be able to incorporate something, i.e. the stream start time, into the capture file name.

View 3 Replies

Media Server :: Advantage Of Writing A SSAS File Over An External AS3 File?

Jul 23, 2011

I do understand the differance between ssas and as3. Not all, but all most everything I see written in SSAS can be writen into a external AS3 file. This leads me to quite a few questions I'm hoping you kind people can shed some light on for me.
 
1)  What is the advantage of writing a SSAS file over an external AS3 file?
 
2) Can I write an .asc file in AS3 or do I have to use AS1? Please understand I'm using tuts from fmsguru.com and the books "Learning Flash Media Server" (pdf) and "Programming Flash Communication Server". I'm not a javascript programmer so nothing I do in AS1 seems to make any sence while everything I do in AS3 does. It may not seem like it to you people that are programmers, but to those of us that aren't, AS1 and AS3 are miles apart.
 
3) kind of off topic, but a security question. I'm not a "hacker" and don't like the jerks that are. My question is on external AS / SSAS files and swf files. When my fla is compiled into a swf does my external AS files remain external? I assume they do, but then what is the threat of the swf being decompiled? In most projects I would do I could care less if somebody had access to my fla as long as they don't have my actionscript files.
 
I don't know. Maybe on questions one and two I'm getting confused becasue I'm using out dated material. Again I assume that even though fms was built off of the javascript engine it should be able to read and execute my AS3 file. Other wise what was the point of the evolution of actionscript into a fully functional programming language?

View 1 Replies

Professional :: Adobe Media Encoder - Unable To Create A FLV File From A MP4 File With High Bitrate

Dec 28, 2011

For some reason I am unable to create a FLV file from a MP4 file with high bitrate. I even created a custom setting and specified bitrate as 2500 but the output file is always around 775.

View 9 Replies

Variable Changing But Then Resetting

May 25, 2011

I'm very new to Flash, but I have been learning loads and getting some good results so far. Browsing these forums has been a massive help. However today I have hit a problem in what should be almost the simplest line of code I know how to write (variable = x), and could do with some advice. I have a simple program containing a button which will change a variable when pressed. There is also a text-box that will output that variable. However when I press the button, the variable will change, but then immediately revert to it's previous value.

[Code]...

View 3 Replies

ActionScript 3.0 :: Variable Resetting Itself?

Jan 1, 2011

I made a simple class that's keeping a history of strings, updating it with a push() method (like an array) and with a possibility to navigate with next() and previous().Therefore my class has an array and a integer indication the current position in the array. (See full code below)Now something very strange is going on. When coming into the push() method the position variable has some value, which I can change, but everytime I try to read that variable, it gives me a 0. I've never had this kind of problem before and I simply cant find out what's wrong.The push() method

ActionScript Code:
public function push(entry:String):void [code]......

View 3 Replies

Actionscript 3.0 :: My Score Keeps Resetting

Jan 14, 2010

I have a character on the stage in my fla that when hitting a particle created in an a particle.as removes the particle. I have the code for removing the particle and also a score counter that adds one everytime a particle is removed (located in my particle.as). My problem is the score keeps resetting or I get sporadic results (not sure which) for example here I traced the results[code]...

View 1 Replies

ActionScript 2.0 :: Resetting The Scrollbar?

Mar 11, 2004

How do you reset the scrollbar in Flash? (I'm using the component, not a cusom scrollbar.)If you go here, scroll ALL the way to the bottom and then click on "Donations" - you'll see the scrollbar stays in place.How do I get it to refresh each time new text is loaded? I've tried refreshPane() and a few other things, but nothing works.

View 7 Replies

ActionScript 2.0 :: Resetting Comboboxes?

Jul 16, 2003

How do you reset combo-boxes?I have this form with combo-boxes and input textfields, and I want a button that can reset the form.The input textboxes are easy:TextBox1.text = "";

View 5 Replies

Media Server :: Convert A .mpg File To .flv File?

May 1, 2009

I can convert .mov to a Flash file, but I can't even get an .mpg file to open.
 
Is there anyways I can convert this using Flah CS3 or any freeware that exist out there?

View 5 Replies

ActionScript 3.0 :: Combo Boxes Resetting?

Jan 26, 2009

I have created a menu for an online café. The displayarea is limited, so the menu items need to scroll within a frame ofsome sort.

View 4 Replies

ActionScript 1/2 :: Resetting Operations In Particular Frame

Nov 6, 2009

I've created a application where the viewer could change colours, add text, add logos, rotare them, etc... How do I create a reset button which resets everything to back normal in a specific FRAME? What functions do I have to use?
E.g.
Frame 5 is used to Add colours and text, etc...
Frame 10 is used to Add logos,scale them, rotate them, etc...
I need a reset button in Frame 5 to make only the things which were changed back to normal.

View 1 Replies

ActionScript 1/2 :: Tween Class Not Resetting Y Value

Jan 11, 2011

I am trying to move a movieclip down using Actionscript. Then when a user fires a back event [which is successfully firing] the movieclip is then required to go up again. The code is:

trace("fholder _y org: " + folioholdermc._y);
// THIS COMES OUT TO BE -601
var yDown1:Tween = new Tween(folioholdermc, "_y", Bounce.easeOut, -601, -449, 3, true);
trace("step 1 called");
trace("fholder _y down1: " + folioholdermc._y);
[Code] ......

View 3 Replies

ActionScript 2.0 :: Resetting X And Y On Draggable Movieclips

Feb 3, 2009

I've got 6 draggable movie clips that snap to a target - which works fine. If they don't hit the target area they snap back to their starting point- which also works fine.

My problem is that they can all be dragged to the target one after another, but I only want one movieclip to be at the target at any one time.

So,when I start dragging a new clip toward the target I want the movieclip thats already on the target to reset itself to it's starting position, thus being replaced by the incoming clip.

I want this to happen for all the draggable clips.

function dragSetup(clip, targ) {
clip.onPress = function() {
startDrag(this);
this.beingDragged=true;

[Code].....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved