ActionScript 3.0 :: Keeping A Reference Of The Original "x"?

Sep 17, 2009

Some time ago I was trying to build an XML gallery from a tutorial and things went wrong so I had to use another tutorial to fix it lol... anyway, in the original tutorial there was a very nice effect when rolling over the thumbs, basically it zooms in the thumb very smoothly. Now I'm trying to do the same effect to the gallery I have (which is fully functional now actually but the problem is that I just can't keep a reference of the initial value of the thumb's x (before zooming in on it on the roll over effect), eventually after I roll over a thumb a few times it is being displaced to the left... that's why I need to return it back to its position on the roll out... here's my code, I'll highlight the code lines that deal with the positioning and roll over/out effects.

[Code]...

View 7 Replies


Similar Posts:


ActionScript 3.0 :: Keeping A Reference Of The Original "x"

Sep 17, 2009

I'm trying to do the same effect to the gallery I have (which is fully functional now actually but the problem is that I just can't keep a reference of the initial value of the thumb's x (before zooming in on it on the roll over effect), eventually after I roll over a thumb a few times it is being displaced to the left... that's why I need to return it back to its position on the roll out... here's my code, I'll highlight the code lines that deal with the positioning and roll over/out effects...

ActionScript Code:
import fl.controls.ProgressBar;
import fl.transitions.Tween;
import fl.transitions.easing.*;

[Code].....

View 0 Replies

ActionScript 3.0 :: Tweenlite Keeping Reference To The Clip?

Aug 17, 2009

TweenLite seemingly keeping a reference to my clip. In one method I do:

detail.btnBack.addEventListener(MouseEvent.CLICK, removeDetail, false, 0, true);

Then I have the removeDetail, and killDetail methods:

private function removeDetail(e:MouseEvent):void
{
TweenLite.to(detail, .5, { alpha:0, onComplete:killDetail } );
}

[code]...

This _seems_ to work, except the removeChild is not working - the detail clip is faded, and killDetail is called, but the clip remains. If I remove the TweenLite fade and do the removeChild right in removeDetail() the clip is fully removed from the display list. I've tried doing a TweenLite.killTweensOf(detail) within the killDetail(), before removing child on it, but that doesn't help.

View 7 Replies

ActionScript 3.0 :: Multiple SWF Load - Keeping A Reference To The Loader And The Classes Holding The Loaders

Jul 31, 2009

I'm loading a bunch of SWFs at the same time. I'm using a custom class to do the loading. Most of the time they all load OK, however occasionally one or two will be unloaded (I can see that in the console) before we get to the Event.COMPLETE. The ProgressEvents are all fine - I can see them loading, but then boom - they're unloaded.

I've done a bit of digging around and discovered that this may be a bug in the Loader class where if you are using multiple instances of the class then sometimes one or more will be Garbage Collected before they finish loading and are therefore unloaded. I've tried keeping a reference to the loader and the classes holding the loaders and I'm still having the problem. The solution is to queue the loads and load each swf in order which isn't a problem, just a bit irritating.

View 2 Replies

Actionscript 3 :: Remove The Word Button From The Reference To Reference The Actual Item

Apr 11, 2012

I need to remove the word Button from the reference to reference the actual item that will be tinted.

[Code]...

View 1 Replies

ActionScript 3.0 :: Compiler Is Throwing That 1000: Ambiguous Reference Error For Any Reference ?

Sep 3, 2007

I'm having this frustrating error showing up and I have no idea why. Let me show you my classes and see if you can spot anything wrong.
First, here's my ILode interface:

ActionScript Code:
package com.schelterstudios.lodeSystem.flash.lodescode].....

So the problem I'm having is the compiler is throwing that 1000: Ambiguous reference error for any reference to instance.priority or instance.label. Why??? Instance is typed to IFlexLodeInstance, and IFlexLodeInstance lists method signatures of priority and label getters, and it inherits ILode, which lists method signatures for priority and label setters. What can I do to get the compiler to stop complaining?

View 9 Replies

Flash :: Reference The Default `this` Reference In Actionscript3 From An External Package?

Jul 7, 2011

My code is an external .as file. Google provides this code on their demo, which contains the this keyword:

[Code]...

Notice that I have 4 calls to console.log. The first 3 fire, but after the new GATracker statement, the 4th does not fire. I have a feeling that I'm overriding the entire package with the object created from new GATracker when I should be passing a different context. I believe the correct context I should pass is whatever this defaults to when not inside of a package/external file, I assume it references the main stage object.

View 2 Replies

Flex :: Create Weak Reference And Strong Reference?

May 6, 2010

package uk.co.bigroom.utils
{
import flash.utils.Dictionary;
/**
* Class to create a weak reference to an object. A weak reference

[code]....

In this Class, how they denote one as Weak Reference and one as Strong reference.

View 1 Replies

Keeping One Image On Top?

Aug 15, 2009

I have created a website header that rotates through various images. I have another image that I would like to be off to the left side but partially cover the main header images. I really don't want this image to change with the other images. Is there a way to put this image on its own layer in flash and have it visible the whole time, while the other images change?

View 2 Replies

Keeping One Object Above Another?

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

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

Actionscript 3 :: Fit A Swf Into A Box Keeping The Same Ratio?

Jan 17, 2012

I have an as3 app that loads SWF's with various movie clips inside with a size of 1280 width and 720 height. I would like to fit these SWFs into a content box of height 885 width by 500 height. The SWF must keep a ratio of 1.77. This would be easy if as3 recognised the SWF being 1280 height by 720 width. It doesn't however, and takes the size of the movie clips inside the swf which varies (as long as it's within the original size boundaries). how I can make the SWF's fit into the content box even if the movie clip sizes and therefore the original SWF sizes vary?

View 1 Replies

ActionScript 2.0 :: Keeping One Or Two Decimals?

Aug 25, 2009

I know how to remove all decimals with:

ActionScript Code:
Math.round (xTwo*0.39);

But, how do I keep 1 or 2 decimals?

View 6 Replies

ActionScript 2.0 :: Keeping A Clip On Top?

Aug 6, 2006

I need to use a custom cursor.I am doing so by simply hiding the cursor and having a small MC follow the mouse around with a setInterval.I need to make sure the cursor stays at the highest level. The stage is blank and all content is loaded using script. I was just setting up the cursor at the end of the script and using getNextHighestDepth. That was working fine, but now I need to load external stuff into the movie. How can I set up my cursor so that it will stay above all the other clips, regardless of when they are loaded?

View 3 Replies

IDE :: Keeping The Projector Fullscreen?

Jan 7, 2009

I have created a cd-rom in flash which autoruns and opens up as a fullscreen projector. The cd launches various powerpoint files from without the movie, however, once i close the powerpoint file, the projector is no longer fullscreen.

Is there any way I can keep the flash movie running fullscreen behind the powerpoint files, so when i close them, the flash movie is the same.

View 1 Replies

ActionScript 2.0 :: CS3 Keeping Submenu Visible

Mar 3, 2009

What is the best way to keep a sub menu visible? The way I have it coding, is onRollOver the menu button, the sub menu is displayed. I want the submenu to disappear onRollOut of the entire menu... how would you do this?

View 2 Replies

Keeping Button Image After Click?

May 5, 2009

Does anyone know how to hold a button image after it is clicked? Can you only do this with a movie clip??

View 3 Replies

Keeping An Object On The Stage After Tweening It?

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

ActionScript 3.0 :: Keeping Object On Top/bottom?

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

ActionScript 3.0 :: Keeping A Steady Framerate?

Sep 22, 2009

However, there is one issue that plagues a lot of viewers, their players not being able to rend the frames in time.Flash rends each frame on the spot where it is needed, this is obviously needed for actionscripting and similar. But this also means that if a frame takes too long to rend, the player has to do something about it.

The player actually does one of two things, depending on if there is any streaming sounds going on or not.If there is a streaming sound, Flash drops frames to keep in sync. Otherwise, Flash just ignores the issue and draws the next frame as if it didn't have any lag detection.Obviously, neither of these is desirable. What can you do about it? Well, the obvious thing is to not do crazy graphics that takes forever to rend. But what if you can't change the graphics?

There is one thing that you can always do, change the antialiasing level the player is using to do the rending. It's 4x4 (High), 2x2 (Medium) or none at all (Low). This makes the rendering go faster, since it is rendering to less pixels.You can also do other things that are movie dependent to reduce the work load. Things like spawning less particles in a particle effect or outright not having some effects. But those are all movie specific and difficult to work with in a general way.

One idea that I had was to draw everything to a bitmapdata of a smaller size and showing that instead, however, that has it's own issues. For one thing, I do not believe that the player can do it's "changed only" redrawing when you do this. Second, there is the issue if you want the corresponding bitmap instance to be smoothed or not. And of course, if you do this, zooming in will not have the infinite resolution that Flash is known for.Obviously, you need to know when the movie is lagging in order to know when to do this. However, the best I can think of is timing the enterframe events and checking if it has been too long since the last one.
This works to show if you are having issues reaching the target framerate or not, but it does not show the load if you are not having trouble reaching the target framerate.

Now, assuming that we have a metric for how well the playback is working, the big question remains: when do you change the rendering settings? And how do you do it?Yes, it is just a simple property of the Stage class for the antialiasing, but that is not what I mean here. I mean, how do you say if it should be changed or not? When it's even lagging one frame? When it's not lagging for one frame? The same, but for 20 frames? This is something I don't know what to pick.

View 3 Replies

ActionScript 2.0 :: Keeping Score With If Statement

Dec 15, 2010

I'm having an actionscript 2.0 problem with keeping score. I have a dynamic text box with a variable called score. I have the following action code for that variable:

_root.score = 0;

For the correct answer button I have this action:

_root.score = Number (score) +10;

This works fine to increase the score by 10 for each correct answer. The problem is that I can't get an if statement to work for when the score reaches 150 to gotoAndPlay a certain frame. I've tried various syntax, I've tried it on the action for a button and an action for the timeline with:

onRelease = function () {

(My learning game is set up to allow for users to answer up to four extra questions to reach the score of 150). Nothing has worked so far.

View 5 Replies

ActionScript 3.0 :: Keeping External SWF In Memory

Feb 22, 2011

So I am loading external swf's. These swfs contain a 16 frame image sequence on the stage. When I load the swf's and go to each frame via actionscript, they load into memory and they play fast and smoothly. If they sit on a single frame for a certain amount of time, the rest of the frames are dumped from memory and the image sequence plays slow again until each frame is displayed and stored in memory again. I really want to keep all the frames of these timelines in memory until I choose to unload the swf's manually.

View 1 Replies

ActionScript 3.0 :: Keeping Track Of Pages?

Mar 2, 2011

I have the code that adds a page number to each page. However, when I go backwards or back to the beginning, the numbers overwrite each other, and will not reset back to zero (first frame)Here is what I am using

ActionScript Code:
var pageCount:Number = 0;
var pageTotal:int = 14;

[code]....

View 0 Replies

ActionScript 2.0 :: Keeping Objects Vertical (MX)?

Dec 11, 2003

i'm trying to adapt a .FLA from flashkit.com which creates a "tree"at present, there is an MC of a line with a round button at the end.

this MC is played on startup - clicking on the button plays the MC from the centre of the button out in a random direction, creating another branch. the result is a tree-like design. - you can see a test here:

[URL]

I want to adapt this so text can be added to each "node", however, i have realised that as each branch is just the MC rotated, any text (or any kind of design dependant on vertical alignment) could be upside down.Would it be possible to "start" a seperate MC (which would be vertical at all times) at the end-point of each new node-MC?

View 2 Replies

ActionScript 2.0 :: Keeping Urls In Flash

Feb 11, 2004

Im using Swishmax and I can't seem to make a url open in my flash site(so it doesnt open as a pop up but in my actual flash site) So basically that it opens in a designated space that I made for it on my site. I know that a tuturial for this exists on this site but i just can't seem to find it.

View 2 Replies

ActionScript 2.0 :: Keeping Swf Scale 100% In Browser?

Jun 6, 2005

it should be a basic task but i cant figure out how to keep a swf from scaling to the size of the browser window. Im making a web site and i want to keep the swf in the centre while showing the entire swf ( ive got over hanging images i want to show), if i can do that and have it embedded in html would be best but anything helps. Ive tried the fscommand but dosent seem to effect within a browser.

View 1 Replies

ActionScript 2.0 :: Keeping A MovieClip Within A Set Area?

Aug 13, 2006

I am having problems with a MovieClip, basically it can be moved arround with the mouse and it is resizeable but when i move it arround or enlarge the movieclip (when its in a published format) i want to constrain it to an area such as 400 width by 400 height.Because at the moment you can drag or resize the movieclip ouside the whole frame, which i dont want. i want to constrain it to a set area.

View 7 Replies

ActionScript 2.0 :: Keeping The Flash Banner Below 30K?

May 23, 2007

I am working on a Flash banner for my company here and I have a search form built into the animation. I have some specs that I need to follow keeping the flash banner below 30K. I have drawn most of the animation for the banner to keep the size down, but its still 79k. I have been testing the graphics learning more about how to optimize the images,

Anyway.. I have been deleteing parts to see where the problem is. Its the form. I have a drop down box and radio buttons. When I delete them, the K size drops to 13k. Is there a way to optimize the forms? Has anyone else had a problem with forms and k size?

I am using Flash 8, on a (bla) PC.

View 2 Replies

ActionScript 2.0 :: Keeping Loaded SWF Visible?

Sep 20, 2007

I�ve built my site using external SWFS. The problem is; I want to keep the loaded SWF viewable until the next requested file is ready. At present, as soon as a button is clicked the screen goes blank and the new file�s preloader kicks in.

View 12 Replies

ActionScript 2.0 :: Drag A MC Just On Its _x Axis, Keeping The _y The Same?

Nov 23, 2007

How do I drag a MC just on its _x axis, keeping the _y the same?

View 2 Replies







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