I'm making this banner, or FMA if you rather call it that, for a company (school assignment). I have some text fading in and out displaying the message. But I want an interactive FMA.I want to make some buttons, and when you go mouse-over on them, I want a picture to be displayed (different image for each button), WHILE the animation keeps going. Thats not the tough part.However, when the animation repeats (starts from the beginning), and if I'm holding the cursor over the button connected to the picture, the picture disappears and I have to go over the button again. [code]
Ok i have been looking at a racing game and have used the tutorial from this link here:[URL]...What i am having trouble with is trying to create a scrolling background whilst keeping the car static in the centre of the screen. Ane example of what im trying to do is here:[URL]...So i have tried incorporating the code from that scrolling background example, into the car racing game itself but i am having trouble doing so. Is there any way that the code used from the scrolling background can be input into the racing game example to create this scrolling background effect?
i am doing a mario game with flash, as3. i want to mario stay above box when jump above it or i dont want mario to pass through box while walking. mario should crash box like wall.
Let's say I have an object, and I use a motion tween to animate it around. Great. Now, I want that object to stay at the final location while other stuff happens on the stage. I can't figure out an efficient way to do this. You can't copy individual frames of a tween, and copying and pasting the whole tween and breaking it up into individual frames and then removing all but the last frame is a bit... time-consuming.how I might be going about using tweens wrong? I feel like I'm just not doing things the way it was designed.
In my attempt to keep a movieclip on the bottom, I used this code: ActionScript Code:setChildIndex(movieclip,0);However, whenever I play an animation over it that is NOT in a movieclip, it will always cover the animation.For example, I have a shape tween that is not a movieclip. Whenever I lay this movieclip over it with the above code, it always covers the non-movie clip. Is there any way to prevent this?
I've got a frame of code with two boxes on the stage. If you click on of them, it runs this code: ActionScript Code: charSelect=1; And if you click on the other box it runs this code: ActionScript Code: charSelect=2;
Now, on my main frame of code, I've got an init() function which runs all the initialise commands. It includes this: ActionScript Code: function init() //Loads assets to the stage and starts animations { if (charSelect == 1) { character.addChild(character); } if (charSelect == 2) { characterFemale.addChild(character); }}
These functions basically let you select which character is loaded to the stage with the instance name 'character'. All my control code is written in relation to the instance name 'character'. However, after I've clicked the box which selects which character to load to the screen, I get this error message: ActionScript Code: Scene 1, Layer 'Layer 1', Frame 2, Line 155 1061: Call to a possibly undefined method addChild through a reference with static type Class.
I'm trying to write a function that keeps a running count whenever a button is clicked - and then writes the count to a Shared Object cookie. Here's the code:
Code: function counterVar() { var elemSharedObject:SharedObject = SharedObject.getLocal("elementChoices", "/");
[Code]....
Everytime it runs the count gets reset to "1", endlessly.
i am creating a list of buttons with an attachMovie. the AS is :
//as var i = -1; while(++i<userlist.length){ var user = userlist[i];
[Code].....
okay the problem is this: then i assign an on click function to every button right in the while loop that uses the data parameter of the "ob" object and when i play the movie the data parameter is always the parameter of the last object created for all the buttons. I know why this is happening- it overWrites the old "ob" with the new with every itteration of the loop.
But how would i go differently about creating an individual "ob" for each button created and still be able to have a function with a data parameter like this.onRelease.userClicked(data)?
I'm new to Adobe Flash CS4. I'm making an animation of some fish underwater. I have 2 small fish motion tweened to follow a large fish from left to right. When I view the animation in full screen the small fish seem to be wiped off the screen at a certain point. The tween box continues to follow it's path but the symbol disappears. This only seems to happen with larger objects.
I am trying to move a 'Shape' object across the screen. As the object moves, a copy is being left at the initial position. Almost as if only an instance of original object ahs been moved
This is not an issue for moving an image or MXML graphic. Is something wrong in setting to the move object?
The code is as follows
private var arrow:UIComponent; private function resetAssets():void{ arrow = new UIComponent();
I have some code here, works fine and everything, but I was just wondering if this code is an efficient way to add an object onto the screen. I just have mc's come on depending the amount in varFromAnotherFrame. Is there a better way to do this?
var someArray:Array = new Array(); for (var i:Number = 0; i < varFromAnotherFrame; i++){ if (someArray.length < 6) { var newMc:libraryMc = new libraryMc(); someArray[i] = newMc; addChild(newMc); newMc.x = -295 + (someArray.length * 80); newMc.y = -10; } else if (someArray.length > 5 && someArray.length < 12) { var newMc2:secondLibraryItem = new sisecondLibraryItem(); someArray[i] = newMc2; addChild(newMc2); newMc2.x = -775 + (someArray.length * 80); newMc2.y = -0; }}
I'm working on a flash site, but I want the site to resize to the user's screen resolution...I'm new at actionscript and flash, but what is the most efficient way to accomplish this?
I have a button control set up to switch my program from windowed mode to fullscreen, and back again.
This is just 2 buttons that alternate frames in a movieclip.
I was wondering if there was a way to keep the movieclip locked to the upper right corner of the program when the user switches between windowed and fullscreen modes.
If you click the "FS" button inside the player for full screen, it goes to full screen, but does not scale my player. Here's my SWF embed code. I have tried it both this way and taking out the wmode line.
<script type="text/javascript"> // <![CDATA[ var so = new SWFObject("player_bitgravity_fs.swf", "flvplayer", "724", "409", "9", "black"); so.addParam("wmode", "transparent");
How do I get the 2D screen coordinates of a 3D object when using Papervision 2.0 (Great White)? I've read that following properties should return the screen coords but these always return 0.
I'm trying to debug AS3 code on production. I have no access to trace(), can't write to disk or open a socket. What I want is to display something on screen.
With AS2 I could just access _root and create a text field with my trace data.
how I can pull this off with AS3? My class extends Object, it is not a sprite and is never added to a parent display object.
I am new in flash developer. I want to set my frame at the center of the screen interdependent of screen size. but we are working on full screen view (means stage.scaleMode = StageScaleMode.EXACT_FIT).Logically I want one background image at back side, which cover all part of the screen, and on that background image I want to set my frame image at center of screen with fix size of (1000 X 750 px).
so i am having trouble with adding a box randomly on the screen. I have done this before and it seems like it should have a relatively easy solution. But alas, i have not been able to figure this out. This is the info: I have a box mc with exporting as Box. I have a Box Actionscript file with this code in it:
[Code]...
Nothing happens at all but there is no errors. Also i would like to keep everything in the classes.
On my previous post Adding a object randomly on the screen in as3 I explained the specifics of my situation. But I will go over it again. I have a box with a class(not my document class. I do have one called Main but this one is just an AS class referencing my box.) The classes name is Box and my MC box is exported as Box. This is the codethis is in my main file on the main timline
addEventListener(Event.ENTER_FRAME, createbox); var _box:Box = new Box; var boxlimit:int = 2;
I'm programming a game in as3 using flashDevelop the player (among other things) is moving across the screen using EnterFrame event which update his coordinates while he moves its hard to see details of the animation and its look kinda blur how do i fix this problem?
I must have a error in my code it should move an object across the screen but it is only doing the first 3 moves (its not working betwen if 3 and if 4)[code]...
Hi, I am tring to make an object move across the screen randomly..I want it move up-down left or right acording to the values created..for example I want my object move between value (-5 and +5 ) whats wrong with this ? because it always moves downward ???
Just starting my first project using AS3 and using SWFObject to embed in HTML to get a full 100% width/height flash (photography site so needs to fill entire window, especially with widescreen).Is using SWFObject the best way, and what do you think the best width/height stage dimensions are?