ActionScript 3.0 :: Classes Called Secondss To The Timeline?
Jul 25, 2011
I am trying to recieve a variable from one of my classes called secondss to the timeline.I did this using MovieClip(root).secondss = secondss; in the class.I wanted it for giving the user a different reward when finsihing the game in different amount of times.I also created a var "TotalScore" which equals gameScore + reward.
And now when I run it and finish the game I see that there's a 0 in the textfield of TotalScore and I get this output error repeatedly :TypeError: Error #1009: Cannot access a property or method of a null object reference. at EasyGame/clockTime()[C:UsersAdiDesktopGamesMatch GameMatching GameEasyGame.as:178] at EasyGame/showTime()[C:UsersAdiDesktopGamesMatch GameMatching GameEasyGame.as:173]
View 9 Replies
Similar Posts:
Jun 5, 2010
I'm working on a flash music site ([URL]) and am trying to integrate a 480x320 .flv into a frame loop in the "game" section of the main movie. I first tried loading a .swf version of the same file but I couldn't get the file to unload and it really slowed down the performance of the main movie. That was Thursday. So I tried to use quicktime but flash CS4 no longer accepts it. All day yesterday I've been working with a .flv version (which doesn't look nearly as good) and tried to directly import it but got an error ("no such file exists") even when it's right next to the other files. With the Wizard I tried both picking the local file and assigning the URL of the file previously uploaded to my site.
So i then tried to use actionscript to load it into the actions layer on the frame at the beginning of the "game" scene which after hours of fiddling finally worked. Here's the current problem: I just want it to loop until someone clicks to go to another section but now what happens is the video and sound from the .flv keep playing even after you click on another button to navigate away from this scene. I tried online to find a way to unload the .flv but none of them worked - wen thru pages and pages of google searches but the suggested coding did not prevent the .flv from unloading.
[Code],,,,
View 21 Replies
Sep 18, 2007
I have a movieClip called target_mc on the main timeline... Inside that movieClip, I have four frame animation where there are aim1_mc and aim2_mc on each frame...I also have a for loop that hides aim1_mc on all the frames... It works fine on the first loop, but I see the aim1_mc of the frame 1 from the second loop...
ActionScript Code:
this.target_mc.onEnterFrame = function ()
{
[code]......
View 7 Replies
Jun 5, 2010
So I tried to use quicktime but flash CS4 no longer accepts it. All day yesterday I've been working with a .flv version (which doesn't look nearly as good) and tried to directly import it but got an error ("no such file exists") even when it's right next to the other files.
With the Wizard I tried both picking the local file and assigning the URL of the file previously uploaded to my site.So i then tried to use actionscript to load it into the actions layer on the frame at the beginning of the "game" scene which after hours of fiddling finally worked.
I just want it to loop until someone clicks to go to another section but now what happens is the video and sound from the .flv keep playing even after you click on another button to navigate away from this scene.
I tried online to find a way to unload the .flv but none of them worked - went thru pages of google searches but the suggested coding did not prevent the .flv from unloading.
var vid:Video = new Video(480, 320);
vid.x=231;
vid.y=457;
[code]....
View 0 Replies
Feb 2, 2007
as im just starting out.for example i have a graphic i need to rewined (instead of tween backwards)when the button is clicked it calls this function in timeline
mc_on_stage.onEnterFrame = function() {
if (rewind == true) {
prevFrame();
[code].....
View 3 Replies
Feb 6, 2009
On my main timeline I have an empty MC that my external swf's get loaded into once a user makes his selection from the menu.I would like to tween the load in and load out of these swfs.What is the best way to go about this?Should I add a Listener to the main timeline that listens for my MC to be called? I guess the real hangup here for me is understanding how to initiate the tween on load in and load out.
View 1 Replies
Jun 6, 2010
I'm working on a flash music site [URL] and am trying to integrate a 480x320 .flv into a frame loop in the "game" section of the main movie.
I first tried loading a .swf version of the same file but I couldn't get it to unload (video and audio) and it really slowed down the performance of the main movie.
That was Thursday.
So I tried to use quicktime but flash CS4 no longer accepts it.
All day yesterday I've been working with a .flv version (which doesn't look nearly as good) and tried to directly import it but got an error ("no such file exists") even when it's right next to the other files.
With the Wizard I tried both picking the local file and assigning the URL of the file previously uploaded to my site.
So i then tried to use actionscript to load it into the actions layer on the frame at the beginning of the "game" scene which after hours of fiddling finally worked.
Here's the current problem:
I just want it to loop until someone clicks to go to another section but now what happens is the video and sound from the .flv keep playing even after you click on another button to navigate away from this scene.
I tried online to find a way to unload the .flv but none of them worked - went thru pages of google searches but the suggested coding did not prevent the .flv from unloading.
here's my code which is in the actions layer at the beginning of the "game" scene:
var vid:Video = new Video(480, 320);
vid.x=231;
vid.y=457;
addChild(vid);
[Code].....
It is very frustrating that Adobe makes it incredibly difficult for an intermediate user to do such a basic thing - load a swf or flv into an fla and have it play, then stop playing when someone navigates away.
View 4 Replies
Jan 17, 2009
In AS1/2 I would use functions to create class-like structures;
it would be nice to be able to, for the sake of convenience, use classes on the timeline
View 3 Replies
Jul 25, 2011
I need to pass a boolean variable initially set to false to one of my classes called "EasyGame".It is than changed to true when one of the function in this class is runned.
View 1 Replies
Aug 5, 2009
I'm getting the classic preloader problem of having the preloader not display until a certain percentage (in this case %30) of the total file has loaded. I am importing the TweenLite class in the second frame, and I am also dynamically attaching MovieClips from the library in that frame as well. I've tried putting a frame between the preloader and the title screen and using the Publish Settings to export all the classes in frame 2, but it does not help at all.
View 7 Replies
Aug 5, 2011
I've given myself this assignment based on the book I'm reading(Foundation ActionScript 3.0 with Flash and Flex). I will need some help though.The assignment is based on the following example in Chapter 1 of the book: a flash movie with balls bouncing all over the screen. The example uses the external classes below: The Ball class:
Code:
package {
Import necessary classes
import flash.display.MovieClip;[code].....
View 14 Replies
Jul 27, 2010
I have the following code on the main timeline. I have soundLoad_mc assigned to the SoundChgUrl class.soundLoad_mc.mp3URL = "climbing.mp3";soundLoad_mc.swfName = "journey.swf";The code below is from SoundChgUrl. The import to mp3URL works. The one to swfName does not - it throws "1119: Access of possibly undefined property swfName through a reference with static type classes:SoundChgUrl." This doesn't make sense to me.
package classes{ import flash.display.MovieClip; import flash.net.URLRequest; import flash.net.navigateToURL; import flash.events.Event; import flash.media.Sound; import
[code].....
View 2 Replies
Oct 10, 2006
I have a movie clip on the main timeline called "map," w/ tons of nested clips. On an actions layer on the Main Timeline I have the following:
map.nestedClip.onRollOver = function() {
this._alpha = 50;
};
the rollover event fires, but the alpha reduction does not. I replaced the alpha = 50, with a trace statement, and was successful, plus I get the hand when I roll over the movie clip, so I know that the event is registering. However, when I place the same code directly on the instance, it works fine. I thought the only difference between placing code on the timeline and directly on an instance was a matter of convention, and that timeline code is generally a better practice.
View 4 Replies
Apr 12, 2010
I want to load an external swf called 'signs.swf' into an empty mc called 'signholder'.
var loadit2 = new Loader();
loadit2.load(new URLRequest("signs.swf"));
signholder.addChild(loadit2);
Everything works. Cool. But, I now want to target something within the signs.swf. How do I do it though? What is the path? Do I have to give the child of signholder an instance name? Everything I try fails.
If I wanted the root timeline of the external swf to gotoAndPlay(2) for example,...would i say...
signholder.loadit2.gotoAndPlay(2) ???
var wow:MovieClip = loadit2.content as MovieClip;
wow.gotoAndPlay(2) ????
View 3 Replies
Oct 30, 2007
I am having issues with startDrag(). I have a movie clip called circle. Inside circle, I have a movie clip called circleFill and another called circleOutline.onEnterFrame, this movieClip is duplicated 4 times.
When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.
[Code]...
how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)
View 8 Replies
Oct 24, 2011
i have a box called infoBox that contains a text field called caption. infoBox expands on mouse-over. When it does so, I do not want the text in caption to scale up - I want it to stay at 11 pt. So far my code to prevent this from happening is not working:How do I fix this?[URL]..
View 2 Replies
Jul 22, 2009
I have a wordpress based site that stores information about an image in a database field called "background" in a table called "wp_postmeta".The 'loader' gets an url such as "/thisImage/background.swf"The "background.swf" should somehow display "background.jpg" instead but since I've changed the field name in the database (from background to temp_background) it doesn't work.I pass variables to the "loader" swf and they are correct based on the new field name but it still isn't working.I need to know if there is anything in the .fla's (and therefore the .swfs) that is pointing to somewhere in the database hard-coded. Basically I need someone to look at them and tell me how they are working.
View 2 Replies
Oct 5, 2009
i'm trying to control a movie clip called "nosotrosmc" with a frame label inside called "historia" but does not work this is the code:
[Code]...
View 2 Replies
Aug 23, 2011
Is there any way to auto-import as3 classes (internal/intrinsic Flash Player classes at least) using Emacs ?
Looked for as3-mode and actionscript-mode but nothing working was found. as3-mode can import class if it is opened in buffer (but not *.mxml files)
View 1 Replies
Jan 9, 2010
The examples I'll use don't do anything - they're classes without ANY members - no variables, methods, anything.
Let's say I extends Sprite and call it MySprite.
I save it in test.core
[code]...
Now I create another custom class called MyWindow that extends MySprite.
I save it in test.windows
[code]...
Then I create another class that extends MyWindows (the example I'll use is a document class - but that doesn't matter - I've tested using an instance too).
[code]...
Notice that I'm not even trying to instantiate the helper classes - just having them there throws the error.
If there is only a single helper class, everything runs fine.
Also note that - as far as I can tell - this only happens when extending one class from another package, then extending that class with more than one helper object.I'm pretty sure there's no namespace bumps or typographical errors, as this is a very pared-down version of the original application.
EDIT: seems the problem exists even without the crossing packages - even extending MySprite in the document class with multiple internal classes generates this error.
View 4 Replies
Feb 3, 2012
I am creating a library in AS3. Inside the library I make use of a bunch of classes/packages that need not be exposed to the end user of my lib. I want to only expose one of these classes.
I guess my questions are:
1) How are libraries commonly distributed in AS3?
2) Is there a .jar equivalent in AS3 that developers can include, but will only have access/knowledge of the classes I've declared as public?
View 2 Replies
May 6, 2011
I have an actionscript project which uses visual symbols from an SWC. I have a CheckoutButton which has the following class associated with it (compiled into the SWC in Flash CS3).
[Code]...
View 1 Replies
Feb 8, 2011
I'm trying to import a class from a class that is located in another folder. How do you move up a directory? Using./ or ../ doesn't seem to work. Essentially I want to access a TweenLite Class but not from the document class. My class is at com/myName and the class I want to access is at com/TweenLite. import ../TweenLite doesn't work... I realize I could just copy and paste the entire Tweenlite folder again, but there's got to be a less duplicative way of doing this..
View 2 Replies
Feb 4, 2009
inheritance and building classes from other classes.
I have 3 classes:
gfxRoomText - changeable colour
gfxRomInter - changeable colour - interactive
gfxRoomImg - interactive - only image / no colour
The first two incorporate the same text field and functions to change colour. The second and third incorporate another class to interactive with. What is the best way of creating these classes using inheritance and how?
View 8 Replies
Dec 21, 2005
I have to use many custom classes for a project, each class includes lots of elements(methods,properties) and I generally forget their names when coding. Is there any editor which I can enumarate the elements of my classes after pressing "." like Flash's built in classes?
View 8 Replies
Nov 30, 2009
how to pass one class that holds all my math for a betting game though all my other classes that hold the pages.
View 2 Replies
Sep 15, 2011
I am new to classes and I am just starting to follow tutorials on how to assign classes and sub classes and I am wondering when you assign a base class or class to an object(Symbol e.g movieclip) through the properties, are all instances on the stage no matter how many and what they are named influenced and is the Stage/main timeline always the parent? and just one more question, is the parents objects display list all the movieclips that are used on the stage or all the instances on the stage?
View 6 Replies
Oct 18, 2006
I am not sure how to import multiple classes into an AS3 class. Also I am bit confused on how "package" works now.[code]
View 2 Replies
Aug 24, 2011
i have a movieclip on my stage called dude inside the moviclip is a frame with a movie clip called axeframe with yet another movie clip called axe. what i want to do is make a hittest in the axeframe a so that when the axe (only axe not the character) hits an enemy(named enemy) on the stage he will disappear. this is my code:
[Code]...
View 1 Replies
Jun 19, 2011
I am doing an Actionscript 3.0 project which involves introspection. I am wondering if there is a way to get all the classes within a given package structure.
[Code]....
View 3 Replies