Keeping Object On Screen
Aug 12, 2011
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]
View 1 Replies
Similar Posts:
Mar 31, 2009
How do you keep your swf centered when it goes to full screen? Mine keeps shifting to the left.
View 2 Replies
Aug 17, 2011
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?
View 1 Replies
Sep 14, 2009
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.
View 3 Replies
Oct 18, 2009
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.
View 3 Replies
Jul 21, 2009
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?
View 1 Replies
Apr 30, 2011
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.
View 7 Replies
Jan 15, 2008
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.
View 2 Replies
Mar 7, 2004
i've been struggling with the following:
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)?
View 9 Replies
Jan 23, 2010
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.
[Code]...
View 2 Replies
Mar 26, 2009
is there a way in action to group to object so when one object is drag across the screen the other object sticks with it, im using flash btw
View 6 Replies
Jun 25, 2011
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();
[Code].....
View 1 Replies
Jan 18, 2012
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; }}
View 1 Replies
Jul 22, 2010
i have this movieclip, which has 4 frames.on the second frame, i placed in this code
ActionScript Code:
_root.attachMovie("pulseshot", "pulseshot", this.getNextHighestDepth());
if (_root.char._xscale ==100){
[code]........
View 1 Replies
Jan 26, 2012
I want to know how can I check if an object entered the screen .
View 1 Replies
Jun 3, 2007
I need to take a 2d object and use a point on the screen to skew the object accordingly to that point to create a point perspective.
View 2 Replies
Mar 10, 2011
Why this code doesn't print anything in the screen?
var ball:Ball = new Ball();
ball.x = 300;
ball.y = 300;
addChild(ball);
I have in the library a Movie Clip with the name "Ball" and the class name "Ball".
View 2 Replies
Mar 14, 2011
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?
View 3 Replies
May 4, 2009
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.
The code for the buttons; if needed, is:
//Fullscreen button
on (press) { fscommand("FullScreen","True"); }on (release) { gotoAndStop(2); }
//Window button
on (press) { fscommand("FullScreen","False"); }on (release) { gotoAndStop(1); }
View 1 Replies
May 16, 2009
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");
[code]....
View 1 Replies
Jan 27, 2010
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.
[Code]...
View 2 Replies
Oct 5, 2010
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.
View 1 Replies
Sep 6, 2011
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).
View 1 Replies
Dec 15, 2011
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.
View 1 Replies
Dec 20, 2011
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;
[code].......
View 3 Replies
Feb 16, 2012
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?
View 3 Replies
Jun 4, 2011
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]...
View 5 Replies
Jan 29, 2009
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 ???
[Code]...
View 5 Replies
Mar 25, 2009
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?
View 4 Replies
May 21, 2009
making a game, and in html, on press arrow key up or down, moves the object and the screen
View 2 Replies