Actionscript 3 - Different Functions For Different Sprites In 1 Fla File Code On Flash

Nov 13, 2011

i am creating a game using flash cs5 and a part of it is drag and drop. in the game, we have this so called sprites. if you clicked on sprite 1, the topic for the drag and drop game is like for example, science. and once done and when you clicked on the other sprites, the subject assign would be for example arts.is it possible to create 1 fla file in flash cs5 where in it contains all the possible commands for drag and drop game for all sprites? you see, i have a main fla file which is the main game this calls the other files or activity, and some other fla file which is the activity in the game like question and answer, puzzles and the likes.

i am having an idea about inserting each question game in different frames to make the code shorter and to avoid having to duplicate the code for the other sprites. or in other words, every time the user clicks the sprites assigned to that specific activity, it will call the specified frame that corresponds to the instance name.again, the sprites are located on the main fla file. when clicked, it calls another fla file containing the game and at the same time, getting the value of the sprites ti know which frame should it proceed to. and thus returning the score attained in the minor fla file to the main fla file after the end of each activity.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Custom Shapes / Sprites With Code?

Dec 5, 2009

I want to start building some prebuild shapes, like a star, cross, heart, and some more with code.Does anyone know if there is already something like this ? A library with custom sprites or shapes?And should i create these graphics extending the sprite or shape class? I read that shapes wouldbe better for performance?

View 5 Replies

ActionScript 3.0 :: Converting Code-produced Shapes Into Symbols/clips/sprites?

Nov 24, 2010

I'm working on a project that involves making a globe in flash which will have many particular points (all the worlds major cities by using their longitudes and latitudes). It's all 2D made to look 3D.To make the "Sphere," I put together some code that stacks a bunch of ovals that creates the illusion of space, ala the code below...

//AS3
function magicTrigFunctionX (pointRatio){
return Math.cos(pointRatio*2*Math.PI);
}

[code]....

Now, my problem is that in order to assign the longitude and latitude information I need to be able to address each oval individually (not only which one, but also eventually the angle/radians of each oval for the latitude) and I've run into a snag...I don't know how or perhaps exactly what to do, because I know how to make it a symbol and class if the object was already made visually using the oval tool in the tool bar, but I can't figure out (after taking a bit of time looking up on how to use arrays and classes) how to do it in the AS3 code where I actually made the "sphere."

View 0 Replies

Flex :: Combine Mutiple Movie Clip Functions Into A Single Swc File Or MXP File For Flash?

Feb 17, 2010

I have to build one MXP package for Flash (not Flex). But i have multiple components, somthing like HelpSymbolMovieClips(have its on class), one image holder. etc. I need to combine there swc file into a single MXP file.How can i make a all these multi movieClip functionality in a single SWC file. Am bit confused about the structure of the component which is having multiple functions/MoiveClips. like (Image gallery components.

View 1 Replies

ActionScript 3.0 :: Mimicing The Until Functions - Load Of Global Functions In One File?

Nov 4, 2009

I'm trying to find a way to have global functions in my as project, similar to how flash does with stuff like the util functions (describeType()...), where you can just call the function wherever you need it. For example:

[Code]...

So when I call Test(), it prints out "hello world" fine. My problem comes in that I can't change the name of the Test function, and I can't add any other functions without compiler errors. Is it possible to have a load of global functions in one file, or do I have to split them up into separate files like in the example? Also, I know that I can make a Global class and call static functions like Code: Global.doSomething() but I'd like to know if there's a way to do it as flash does it (describeType(), getDefinitionByName(), etc), or rather, how does flash do it?

View 9 Replies

ActionScript 3.0 :: Open A File To View Sprites?

Sep 10, 2011

I have been playing with my brothers Adobe Flash Builder program but I can't figure out how to view game files for a open source game? The game is FLASH all the sprites are listed as the AS (actionscript?) file format. I am not trying to view the code, but the actual sprite, such as characters etc. I wanted to save them as PNG or any other image files.

View 9 Replies

ActionScript 3.0 :: Make One .as File Code Interact With Another .as File's Code?

Mar 16, 2010

I am trying to find out how to make one .as file code interact with another .as file's code.like, if I had one .as file that specified options of movies and then when the user clicks on a movie (loaded through xml) it uses code from another .as file to load the correct movie.

View 5 Replies

ActionScript 1/2 :: ClickTAG Code In A Flash Banner Be Changed If Only Have The .swf File And Not The .fla File?

Oct 26, 2009

Can the clickTAG code in a flash banner be changed if you only have the .swf file and not the .fla file?

View 1 Replies

Professional :: Code Not Entering Functions

Jan 27, 2010

I have the following code in the first frame of the only layer of the timeline, and nothing else in the layer:[code]

View 7 Replies

Flash :: Loading Swf File Within Another Swf In Order To Use It's Functions?

Dec 8, 2009

i would like to load a flash file in order to use it's functions and classes. i would like that this file will be never cached. how can i do that ?

View 1 Replies

ActionScript 3.0 :: Flash File To Call Functions - How To Use DLL

Feb 9, 2012

I have a Windows DLL that I want my Flash file to call functions from, I've only seen native extension tutorials with Android and iOS, but not many for Windows. I have a tiny bit of programming experience with C++ and C if that helps (haven't got passed the Pointers yet, but I can read about them).

View 2 Replies

ActionScript 3.0 :: Flash Working With Functions In External As File?

Oct 22, 2010

Im trying to understand alittle more about using external files.

In my flash actionscript window i basicly want to access a function that i wish to put in an external .as file ... but i just cant seem to get it..

like:

Code:
myFunction();
in external file

[Code].....

View 4 Replies

ActionScript 3.0 :: Reusing Functions And Shortening The Lines Of Code?

Feb 4, 2010

I am trying to reuse the lines of code and it worked fine the first time but when I tried to use the evtObj.target.name it gave me error 1120:Access undefined property evtObj.Here is the code I tried to use:When I test the movies it just runs automatically instaed of waiting for the click.

View 4 Replies

Actionscript 3.0 :: Drawing API - Effective Rationalising Of Code Using Functions And Loops?

Jan 4, 2010

i need to draw an API Drawing and do the following with it;

-Effective experimentation with the drawing API e.g. gradient fills, curves etc.

-Effective rationalising of code using functions and loops.

-A sophisticated/realistic looking drawing, that shows the ability to use the drawing API with a high degree of skill.

View 14 Replies

ActionScript 2.0 :: Combine Onrelease Functions Without Repeating The Same Lines Of Code

Feb 21, 2006

what's the best way to combine these onrelease functions here so i dont have to repeat the same lines of code?

[Code]...

View 9 Replies

ActionScript 3.0 :: Timeline Code And Separate AS File Code Working Together

Dec 27, 2010

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?

View 7 Replies

ActionScript 3.0 :: Write A Class File Using A .as File Instead Of Writing Code Into The Script Tab Of A .fla File?

Feb 4, 2010

I am trying to write a class file using a .as file instead of writing code into the script tab of a .fla file.When I write stage.addChild(img); I get an error that stage is null. When I take out stage, and just write addChild(img); the code runs fine, but nothing appears on stage. Do I need to do something to set a stage active?
 
Is this because I don't have a Main class? My class is named after the file and I don't have a file named Main.Here is the code. As it is, it runs and I get the two trace outputs, but no graphic on my screen.
 
package  { import flash.display.DisplayObject; import flash.display.Sprite; import flash.display.Loader; import flash.events.*; import flash.net.*;  public class HelloWorldImage extends Sprite {  private var background:DisplayObject, foreground:DisplayObject;  private var url:String = "hw_jpg.jpg";  private var loader:Loader = new Loader( );    public function

[code].....

View 7 Replies

Add HTML Code To Flash File?

Sep 21, 2009

I am building a website, but am fairly new at it on flash... Am I able to add HTML code to the file? I am trying to add a code which creates a map from mapquest...?[code]

View 1 Replies

Flash :: Add HTML Code To File?

Sep 20, 2009

I am building a website, but am fairly new at it on flash... Am I able to add HTML code to the file? I am trying to add a code which creates a map from mapquest?[code]...

View 1 Replies

Flash - Add Functions To Playerglobal.swc Or Allow Compiler To Pass Own Functions

Oct 25, 2011

Im adding lot of simple functions to prototypes of top level objects ( Object , Array , String ...) and have 2 questions :

Is possible to add functions to top level's classes in compile-time ?

If not , is there a way to allow this functions to compile ? I dont like to turn off strict mode

ex:

string.removeWhiteSpace();
string.sliceStr("." , "end");
textField.scrollBottom();

this return compile-time error , cause there is no such function , i have to write it in braces :

string["removeWhiteSpace"]();
string["sliceStr"]("." , "end");
textField["scrollBottom"]();

and i like to aviod it )

View 2 Replies

Professional :: Reference Flash Code In .js File?

Jan 15, 2010

I have a CS3 Flash in my Dreamweaver website. Is there a way to move my script to a .js file or something, then reference it in the code instead of it all showing in the code? If so, how would I do that?

View 2 Replies

Professional :: Code A File Upload For In Flash?

Jul 30, 2011

The title says it all. Anyone know how I would code a file/pic upload form in flash. I have seen examples that you can use php. However I have tried the php/java I designed for my dreamweaver sites. I think It's time I get with the real designers and us flash for my websites.

View 1 Replies

Flash :: Code On Timeline's Frame Vs AS File?

Dec 23, 2007

Here i'm actually not talking about a problem but rather wanted to raise a discussion thread. (Kirupa you may also move this thread to some other more relevant section. Few of my good colleagues till prefer writing code on the Flash timeline, on the frames (code as bigh as 100-150 lines), rather than using external AS files, when rest of the world has reached to AS 3.0 which is close to Java (OOP).I'm just wanted to know the big benefit of writing the code on the frames. I know that it is highly un-manageable and I have personally faced many instances of code not initializing, or behaving strange on a frame.

View 3 Replies

IDE :: Code A Flash File To Be Customized To The Viewer Name?

Jan 28, 2009

how to code a flash file to be customized to the viewer name.For example, the viewer goes to the page, enters some info (name) and clicks continue... then throughout the remaining pages of the site if refers to them by name in various places.

View 2 Replies

Editing Code From A Published Html File With Flash Detection Enabled From Flash

Sep 2, 2009

ive publish a html file with flash detection enabled from flash.[code]now since the default codes places my flash movie on upper left corner, ive made my own tables with the flash on it, how or where do i place this code to the upper codes?[code]

View 1 Replies

ActionScript 3.0 :: Put Code In The Flash File So That When Click A Button?

Sep 20, 2009

I have created a flash file that I will export as an SWF.  It is to go on my web site.  The one problem I have is that I need to put code in the flash file so that when you click a button it allows you to download a file from my website to your desktop.  How do I script this?

View 7 Replies

Professional :: Embed A Detection Code Into The Flash File?

Mar 11, 2011

Flash Player Detection Kit ( http:/url......... ). I would like to embed the detection process in just one file. Hence how can I embed a detection code into the flash file, so once its exported to swf, it'll have the detection code already and no additional files are needed?

View 5 Replies

Flash :: Edit The .fla File Code And Save It In The .swf Format?

Mar 27, 2010

How to edit the .fla file code and save it in the .swf format? I downloaded the trial version of adobe flash.I am able to see the output frame but not source code.

View 3 Replies

Flash :: Convert A Doc File To Valid Html Code?

Feb 24, 2011

Is there a clean and efficient way to import documents in a flash presentation?I have a big number of doc documents to import in a flash presentation and i'm wondering what's the best way to attach them. I've worked passing them to HTML before, but the doc to HTML conversion is messy, ugly and doesn't output valid HTML code, besides, it's a chore to clean the embed CSS style the conversion leaves inside the code. is there a library that allow to use a more portable format? if not, is there a clean way to convert a doc file to valid html code?

View 1 Replies

Set Text In Flash File Containing Stuff In Html Code

Feb 27, 2011

I want to create a flash file containing some text given by HTML code. For example like this:[code]But i don't have such swf file. So how can i make an swf file like that? Is there any program for it? Or is there already an swf file for that?

View 1 Replies







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