ActionScript 2.0 :: Controlling The Menu's _x Position Dynamically

Apr 13, 2010

I have a 1200 px wide scrolling menu movie clip which is placed on a stage that is 650 px wide (mc menu is approx 2X wider than the movie). It is aligned left to the stage and whenever a user moves the cursor over it - it scrolls itself around _x axis (inverted x axis). Here is the code that works:

ActionScript Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
//take mouse position and invert it

[Code].....

But sometimes during aggressive mouse movement over the menu mc, the mouse position variable goes beyond it's limits (I don't know why, latency error?) by 20-30 px. This makes the menu go way beyond its limits/bounding box and almost completely exits the screen.

I've tried adding mc that registers the movie area, limiting _x axis in the IF statement, but whatever script I make it either: glitches, doesn't move or just goes all over the place.

How can I make the menu mc move only in specified movie area?

View 0 Replies


Similar Posts:


ActionScript 2.0 :: Flash Menu Controlling Another Menu

Dec 1, 2009

I've been working in two menus, to be located in separate frames, the 1st one has a column of six buttons, each one directing the user to its own webpage, then at the bottom of those webpages there's an additional navigation flash movie, this one takes me to the next or previous webpage, I need additional control over the 1st menu through clicks in the 2nd menu, I've been able to control the state of the buttons in the 1st menu through sole clicks on the 2nd menu, but I can't control the 1st menu through mixed use of 2nd and 1st menu.

View 0 Replies

ActionScript 2.0 :: Create An Infinite Menu BUT Navigating Menu From Left To Right Using Drag Rather Than The Position Of The Mouse

Apr 1, 2011

I'm looking to create an infinate menu BUT navigating my menu from left to right using drag rather than the position of the mouse. If there's any links or tutorials around Pleeeeese let me know.

[Code]....

View 4 Replies

ActionScript 2.0 :: Controlling Mc.'s Position On Screen?

Jan 19, 2004

I have a mc w/ an invisible button attached to my main stage called mc.return.Attached to the mc.return is the following script:

[AS]on (release) {
mc.blkqueen._x = 275.3;
mc.blkqueen._y = 461;
}[/AS]

The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.

View 1 Replies

ActionScript 2.0 :: Controlling Mc's Position On Screen

Jan 19, 2004

I have a mc w/ an invisible button attached to my main stage called mc.return. Attached to the mc.return is the following script:

[AS]on (release) {
mc.blkqueen._x = 275.3;
mc.blkqueen._y = 461;
}[/AS]

The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.

Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.

View 1 Replies

ActionScript 2.0 :: Controlling Timeline Via Mouse X Position?

Feb 10, 2010

how to controll the timeline via moving the moiuse in x (left to right ).basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )

View 17 Replies

ActionScript 3.0 :: Controlling Sound Of Movie With Mouse Position?

Nov 26, 2009

is there a way in as3 to mute a video inside a movie clip if the mouse x position equals less than, say 200px?

View 1 Replies

ActionScript 2.0 :: Loading SWFs Into Scenes - Controlling Position On Screen

Dec 4, 2002

I have several buttons, that link to several scenes, containing swf files. Using the loadmovie command I can get these swf's playing on-screen. That's good.

-How can I control where they appear on my document (I'd guess these require some x or y values, but not sure how this is done) as they all appear in the top left-hand corner.
- When I mouse over another button (link to scene/swf) how can I remove the previous swf from the page, then load the new swf -as they all appear in the same spot/all over each other? Is this an unload movie command?

I was hoping to counter this problem by using different scenes (no luck there) and all I really need to do is remove the previously loaded swf, when the new one is loaded.

View 6 Replies

ActionScript 2.0 :: Controlling Movie Clip Like Sclae , Rotate, Position?

May 22, 2007

I have started a project for a t-shirt store with a similar featurescan any one tell me how he is controlling the designs and text rotation and scaling inside the target area

View 2 Replies

ActionScript 2.0 :: Controlling Position Of Data Loaded In A Text Field?

May 20, 2002

I have a scrolling text field, data on a text file (externalVariables.txt) and buttons. Data loads upon pressing the buttons using the following method: on the main timeline:

loadVariables ("externalVariables.txt", "_root");
on each button:
on (release) {

[code]......

View 1 Replies

IDE :: Controlling Flashmovie From HTML Menu?

Jan 11, 2009

I'm trying to figure out if there is a way to control a flash movie from a HTML menu(anchors or buttons) without having the page reload.What I want is a flashmovie and some sort of list with links, and when a link is clicked on the movie changes its contents. There are reasons as to why I want the menu to be written out in HTML and not included in the flash movie. Can I pass information into the movie after it has been loaded?

View 2 Replies

ActionScript 3.0 :: Controlling Position Of Text Fields Based On Varying Height?

Jul 6, 2011

I am populating a textfield with text from XML files. I am wondering what the best way is to handle positioning the TF based on the number of lines of text. So if there is only one line, the textfield's 'y' position might be 100, but if there are 2 lines I want it to move to say 80.

View 1 Replies

Dynamically Controlling Many Instances At Once?

Mar 19, 2011

i am trying to control 30 instances of a movie clip dynamically. the instances are as follows

ship1
ship2
ship3

[code]....

coming from php i would just set up an associative array like list array('speed'=>array(false,false,true,...),'weapon '=>array(true,false,....and so on I can not for the life of me figure out how to store this information and then use it as a variable name later.my end result should look something like this .. i just don't understand how to do this in as3 .. it seems unnecessarily convoluted.

Code:

foreach($upgrades['speed'] as $key => $val)
{
UpgradeScreen.'speed'.$key.visible = $val);
this would dynamically call

[code]....

i know the above is incorrect.I want to create this so that it is completely dynamic and the instance names can be feed in dynamically as the array or whatever is being looped.

View 9 Replies

ActionScript 2.0 :: Controlling A Movie Clip Dynamically From SQL?

Mar 21, 2006

I have a movie clip with 11 frames containing 10 different images named "thermometer". I have a dynamic text box on the root of the movie with the var name of "therm"

action script in MC "thermometer"=
onEnterFrame = function() {
if ((therm <= 15000) && (therm >= 0)){

[code].....

View 4 Replies

ActionScript 2.0 :: Controlling Dynamically Loaded Swfs?

Jun 24, 2003

how can you controll them as they are coming in? For example: i want to load three swfs but i want them to sit invisible until the user clicks a button to change visibility and see the content. The problem seems to be that you can't control it until it's all there... here's the code i have been trying.[AS]function

goMovie(xMovie, xLevel){
loadMovieNum(xMovie, xLevel);
mytry=false;

[code]....

View 3 Replies

ActionScript 2.0 :: Dynamically Importing Audio From Folder And Controlling It In Swf

Mar 24, 2010

How can I get this flash file to import this audio file and be able to pause and reset the audio?The file I have I was able to get it to play but I can not pause it, it just re-sets it.I also can not figure out how to get a progress bar to match the audios progress.Has anyone done this befor or have a fla with code I can look at and revers enginere? URL...

View 2 Replies

ActionScript 2.0 :: Controlling Clips Created Dynamically With Loops

Jun 19, 2006

how to make a grid of squares with loops? also, how do i controle the clips that were dynamically created with the loop. like clip25 only?

Code:

total = 5;
i = 1;
while(i<total){

[Code].....

View 10 Replies

ActionScript 2.0 :: Controlling Clips Created Dynamically With Loops?

Apr 20, 2011

i was wondering how to make a grid of squares with loops? also, how do i controle the clips that were dynamically created with the loop. like clip25 only?

Code:
total = 5;
i = 1;

[code].....

View 2 Replies

ActionScript 2.0 :: Controlling Dynamically Loaded Movie Clips?

Mar 3, 2004

Im creating a booklet with turning pages, like the one previously posted, so all the content is loaded dynamically.On the right hand page i have text, of which some lines are interactive.On the left page, i have a hidden text box. When the user clicks on a certain line on the right page, the text box on the left page becomes visible, and the relevant txt is loaded into the text box.Now, i can make the text box on the left page invisible by placing _visible = 0; directly into the actionscript pane of the text box.What i cant do is make it visible by clicking on the right page text. Where should i put the code to make the text box visible?Is it as simple as movieClip._visible = 1; ?

View 10 Replies

ActionScript 2.0 :: Controlling Playback Of Dynamically Referenced Movieclips

Mar 4, 2005

There is a nav section of just 2 buttons, one for the "previous step," and the other for the "next step."

Just to make it easier (or maybe not...) I've named all instances of my movieclips "mc1" "mc2" etc... And I've created ActionScript that notes what "page" you're on, and using a for loop, makes the movieclip that corresponds to the current page (page #2 >> mc2) visible while at the same time making every other movieclip invisible. I've got all of that working properly.

What I need to fix is... Say you view the first step's movieclip, and you go on to the next step, but then want to go back to the previous step to watch it again... What you'll see is the last stopped frame of that movieclip rather than seeing the entire animation over again.

You'll be able see what it's doing in the code...

Code:
stop();
// Declare variables
pageNumber = 1;
maxPageNumber = 12;

[Code].....

I know that I can use setProperty to reference something like "mc"+i, but can I do the same thing with play()? Obviously "mc"+i.play(); doesn't work...

View 1 Replies

ActionScript 2.0 :: Menu Bar Triggered By Mouse Position?

Oct 30, 2010

My code is below. What am I doing wrong? I am trying to have my menu enter the stage and exit the stage when the mouse goes below/above a certain point (425px)

navBar == 0;
Mouse.addListener(listener);
if(_ymouse >= 425){

[code].....

View 6 Replies

ActionScript 2.0 :: MovieClip To Appear On Stage After Menu Gets Its Position

Mar 12, 2004

I have a menu that appears on the stage with the following function.

[AS]function moveMenu (clip, yPos, speed){
clip.onEnterFrame=function(){
var endPos = yPos-this._y;
this._y += endPos/speed;
}}
moveMenu (menu, 50, 3);[/AS]

Next to the menu I have a movieclip (instance name "square") which I want to appear on the stage from the left, but not before menu (see above) has reached it's final position. How do I integrate this in the above function or should I make a separate function for this

View 8 Replies

ActionScript 1/2 :: Why Does The Content Spill Over And How To Position This Under The Menu And Title

Oct 14, 2011

I was following this tutorial on how to add a scrolling image gallery to a Flash website.
([URL]) From what I understand from this tutorial, it is just a matter of copying the Actionscript code and pasting it onto the timelines then making modifications on the XML. (kindly see a screenshot of timeline layers I made and as to where I put the Actionscript code: [URL]) I pasted the code onto the blank keyframe labeled "Gallery". But all I get is this weird effect when I click on the button for the gallery... (kindly see a screenshot of it here: [URL])

[Code]...

View 5 Replies

ActionScript 3.0 :: Modify This Menu To React To Mouse Position?

Feb 6, 2009

I am trying to modify a fla i got from flash den. [URL]

It works by clicking on menu items, and or using your mouse wheel.

I am trying to make it so that it responds to mouse movement. So if you mouse up, the menu moves up, and if you mouse down, it moves down.

The file populates the menu using xml, and below is the primary code that makes it work.

Every mouseposition functionality that I've worked on required that the content be in an MC, but this is all xml generated content, and I don't know how to target or control it.

package net.flashden.lydian {
import fl.transitions.Tween;
import fl.transitions.easing.Strong;
import flash.display.MovieClip;

[Code].....

View 1 Replies

ActionScript 2.0 :: Way To Pause And Start Again From That Same Position 'infinite Menu'

Mar 8, 2004

i need to find a way to pause and start again from that same position the 'infinite menu' found here on kirupa URL...A friend of mine attempted to help me, and gave me some code to fiddle with. I did fiddle with it, but problem was, the code was for Flash MX 2004. So it didnt work on my MX. Here is the existing code i have, but doesn't function (i.e. works fine when control>Test Movie, but doesnt work when actual .swf from folder is opened)[code]

View 10 Replies

ActionScript 2.0 :: Moving Menu - Change Scale And Position

Mar 21, 2004

The selector mark is suposed to "mark" the selection on the menu after a selection is pressed. But Im having problems with the X and y coordinates and scales of the MC and when I click on the option, the MC gets smaller and then bigger to the size I want. Its suposed change scale and position but its not working like it is suposed to work. Im not sure either if I�m setting the Mc on the initial x and y coordinates.

View 4 Replies

ActionScript 2.0 :: Getting Y Position Of MovieClip Dynamically?

Mar 29, 2005

I have a dynamic text field that loads a variable into it (just a simple text file). This text file will be updated on occasion. I also have a movie clip to be positioned below the text field, however I want the movie clip to change position depending on how much text is in the text field so there isnt a large gap and so they dont overlap. Is this possible? I tried the following actionscript to adjust the size of the text field depending on the amount of text.
textField2.autosize = "center";
However I have no idea how to get the y position of the movie clip to adjust accordingly.

View 10 Replies

ActionScript 3.0 :: Changing Position Of MovieClip Acting As Menu - AddChild?

Oct 10, 2008

I am trying to change the position of a movie clip which is acting as a menu and loading other swfs onto the stage. The problem is, is that the movie clip is also animated and when an swf is loaded the movie clip appears underneath the loaded swf. What method I should use to change the hierarchy of this movieclip.

View 2 Replies

ActionScript 2.0 :: Sliding Menu - Buttons Can Still Be Clicked While The Mc Is Easing Into Position?

Nov 25, 2003

I've created a sliding menu that has a left button and a right button. Each button slides a background movieclip to the left or right. The background mc eases into position when one of the buttons is clicked. Problem is that buttons can still be clicked while the mc is easing into position. This throws off my x coordinate positioning of the mc. I've tried disabling the buttons and enabling them again at a few different points in my code. I've also tried using a time delay to enable the buttons but my logic isn't working.

View 5 Replies

Actionscript :: Update Slider Position Dynamically?

Sep 9, 2011

I have a slider control that I need to update based on the time of the song. How do I move the slider cursor over dynamically?

I tried this and it didn't update:

sldAudioPosition.value = channel.position;

View 1 Replies







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