ActionScript 2.0 :: Changing Direction Of Thumbnail Strip?

Jun 27, 2006

I have been following through the "gallery" tutorials here on Kirupa, and finally got to the third version (the one with the auto-scrolling thumbnails along the bottom, which scroll left / right based on the mouse pointer position, and the keyboard Left / Right scrolling).

I need my thumbnails to scroll UP and DOWN instead of LEFT and RIGHT, and have been trying to modify the ActionScript that came with the downloadable .fla file for the tutorial, but without complete success yet. (The functionality of the whole thing is still intact except for the scrolling thumbnails.)

Here is the portion of the AS that addresses the thumbnail scroller, and I have highlighted in red the variables that I believe need to be swapped around for it to scroll vertically instead of horizontally. I have made the obvious changes such as :-

_width changed to _height
hit_left changed to hit_up
hit_right changed to hit_down
_x changed to _y

[Code].....

Again, this is the ORIGINAL ActionScript, not my modified version. Only the items highlighted in red have been changed in my modified version. Basically when I test the movie now, I get the last two thumbnails of the gallery transposed one over the other, at the point of the movie clip instance, and no scrolling at all. When I use the UP and DOWN keys, I do get to "manually" scroll through the big images, but no change in the thumbnail area.

What have I screwed up or overlooked? I have scanned and scanned and scanned the above section of the AS, and I can't see any other variables that ought to be meddled with.

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Changing The Tweening Direction?

Sep 21, 2009

I have small popup box which expands from size zero to some size when clicked on the expand button.

The location of this expand button is dynamic.Hence I want to change the the direction in which this expansion happens depending on the position of the expand button.

For example if the expand button is at the bottom right corner of the stage i want the popup box to expand upwards and leftwards.

If the expand button is at the top left then i want the popup box to expand downwards and rightwards.

I have only one movieclip for the popup box with the registration point at the top left corner.

I tried to achieve this by dynamically changing the registration point of the popup box movieclip using the DynamicMovie class. But no luck.

If I manually change the registration point it is working.

View 2 Replies

ActionScript 3.0 :: Changing Direction Of A Movieclip Using Enter_Frame?

Jan 3, 2011

Would some wonderful person be willing to take a look at this code and tell me what I'm doing wrong?

I'm trying to use ENTER_FRAME method to get a moving movieclip to change direction when it hits certain x and y coordinates. I want the movieclip to move horizontally, then down, then horizontally again. With this code my movieclip starts off moving down at a diagonal and I can't for the life of me figure out why. (probably something simple I'm overlooking?) I'm a beginner at actionscript.

[Code]...

View 4 Replies

ActionScript 2.0 :: Changing Image Direction In Easing?

May 13, 2008

I'm currently having problems finding anything thats helps me change the direction an image is facing depending on mouse moment. I've found stuff on rotation, but I want my image to flip so its facing the other way.

View 4 Replies

Flash :: Changing The Direction Of A Ball On Collision Base On Speed

Jan 4, 2010

I am creating a ping pong game. And I want to create the ability to control the direction of the ball based on the impact on the paddle. If the ball is coming down at vy = 4; vx = 4;

and the paddle is moving to the left at vx = -5; I want the ball to slightly change its course depending on how fast the paddle is moving. It would probably reduce the balls vx speed on collision, therefore making the ball move more straight (close to the Y axis) when it is moving back up.

I figure the solution for probably doing this would be to measure how fast the paddle is going. My problem is the paddle is controlled by the mouse and has no certain speed. I am trying to figure out how I can measure the speed of my mouse traveling on the x axis.

I am probably going to create a timer that fires every few seconds to determine where the mouse was and where it is at. figure the difference and that will be the speed

View 3 Replies

ActionScript 3.0 :: Flash Changing Direction When Ball Reaches Gutter In A Bowling Alley Type Of Game?

Aug 20, 2011

I am trying to make a bowling alley type of game. I want the ball to change angle when it reaches the gutter, but the problem I am facing is, how can I check when the ball has reached the gutter as the bounding box for a line/box in perspective is bigger and I want to check any point on the line when the ball is passing/crossing that point and moving so that I can change its angle and direction. And also does anybody have a collision method algorithm or physics to create the falling of PINS when the ball hits the PINS.

View 1 Replies

Flash :: Changing The Appearance Of A Single Thumbnail In TileList Component?

Sep 22, 2010

I'm trying to create a listing of thumbnails using the TileList component, and so far it's working great. Is there a way to change the appearance of a single ImageCell within the component.I'm bringing in the thumbnail data as XML, and I have an attribute for whether it's a "new" image or not. I would like it to display a small badge over the individual thumbnail in my application.

I should note that I made a subclass of the ImageCell class (implementing ICellRenderer) to set my custom skins, but when I tried adding conditional code here (checking for the "new" parameter I set, It simply doesn't work (no error messages).

View 2 Replies

ActionScript 3.0 :: XML Thumbnail Gallery - Display The Thumbnails Vertically By Changing Some X Values?

Feb 7, 2010

How would I go about editing the code for this tutorial: http:[url]......so that there are 8 thumbnails displayed at a time and instead of scrolling based on mouse position, the user clicks a next or previous button to display the next set of 8 thumbnails in the xml?I attempted to get it to display the thumbnails vertically by changing some x values in y and a width variable into height, but that failed miserably.This site is an example of what I am trying to accomplish: http:[url]....

View 1 Replies

ActionScript 3.0 :: Why Is Penguin Fat After Changing Direction Using "scaleX"

Mar 16, 2010

My Code:

Code:
var facing:int = 1;
if (xspeed<0) {
walker();

[code]....

I have my "hero" as a MovieClip that I placed on the stage, and resized. But when he changes direction his width reverts back to the original thats within the MovieClip.

View 2 Replies

ActionScript 2.0 :: Scrolls Continuously In A Direction Until The Direction Of The Mouse Is Changed?

Feb 24, 2009

i have a scroller developed in as2. it basically scrolls continuously in a direction until the direction of the mouse is changed. the images of course loop in the continuous scroll. now the problem is that for 10-15 photos its ok. but when i feed it with 180 photos, it seems to show only 11. why would this be? any restriction on flash ??

View 1 Replies

ActionScript 3.0 :: Direction Of The Ball In The Direction Of The Mouse

Mar 17, 2011

have a ball with the name of mc which can be moved using the keyboard .. when you press the left mouse button shoots the ball, this ball and the other flies in the face where the cursor was in the shot .. but if you move the cursor to another location and shoot a second time then the second ball is also flying in the direction of the cursor and the first ball change direction toward a second shot ..

ActionScript Code:
import flash.display.MovieClip;
import flash.display.DisplayObject;
import flash.events.MouseEvent;

[Code]....

how to make that first ball did not change its direction and continued to fly in the direction of the shot?

View 5 Replies

ActionScript 2.0 :: Thumbnail Loop - Middle Thumbnail Represents The Photo In Target_mc?

Nov 28, 2007

I have made a image-viewer. I've this AS for the viewer:

Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
function loadXML(loaded) {[code].....

Now i would like to make a loop for the thumbnails so they don't have a beginning or end(Now when i scroll to the right the thumbnails stop at the last thumbnail, i want it to begin at the first thumb again).I'm also trying to make that the middle thumbnail represents the photo in target_mc.

View 1 Replies

ActionScript 2.0 :: OnRelease - Cannot Scroll Thumbnail Until Roll Off The Click Thumbnail

Jul 10, 2007

I am making a gallery, which you can view here:[URL]ok, firstly, when you click a thumbnail, you cannot scroll them until you roll off the click thumbnail, and I'm not sure why. is it just a movieclip thing? or can I put some code in to re-get focus of something? ok, now for the two general questions:

1. When you roll over the thumbs, they go up, sometimes they flick back down though, even though you are rolled over them still. is this just because they are moving?

2. Does anyone know why when I add this:

[Code]...

View 1 Replies

ActionScript 1/2 :: Xml Thumbnail + OnRelease Function On Each Thumbnail?

Oct 11, 2009

Im trying to create via xml and a for() loop a thumbnails wiewer and each thumbnail have a simple onrelease function.....but my probleme is that my 'container' movieClip and 'BT' movieClip dont show when I export the movie...also when i trace()them the output is empty. maybe is because they are inside  x.onLoad(xml){} function ? At the end of the script you can remove // before the trace() function for ckecking in the output panel. here is my code:

xml file: TumbLoader.xml
<?xml version="1.0" encoding="ISO-8859-1"?><slideshow><photos thumbnail="thumbnail/1.jpg" /><photos thumbnail="thumbnail/2.jpg" /><photos thumbnail="thumbnail/3.jpg" /><photos[code]...

View 8 Replies

ActionScript 1/2 :: Can't Strip Whitespace Or Returns

Mar 15, 2010

I have few ActionScript skills. But I have built a multimedia career by stealing chunks of AS2 code and reworking them to suit my purpose. I have searched long and hard here for a solution to my current problem. I have found code here that seems to address it, but I cannot make it work. I simply have some textAreas that I wish to validate. The user may input text that could include extra spaces, returns, and odd capitalization. It would be easiest for me to simply strip out the capitals, spaces and returns. I found some simple code that changed the caps to lowercase:[code]

View 5 Replies

ActionScript 3.0 :: Strip Netstream Into Function?

Jan 15, 2009

i have this script that sets up and connects a stream to play an flv - in the case using xml to define where the flv is...

PHP Code:
private function onInitialize():void
{

[code]......

View 1 Replies

ActionScript 2.0 :: [f8] Xml Feed, Strip Links For Swf?

Mar 30, 2007

the kirupa XML feed example, What i need now is to Strip URL, links out of this mess... (there are two links coming out as one)i would have to possible store it as an array, break it by "." then again by "http://" thus therefore getting individual linksright?

Code:
<summary type='text'> face Originally uploaded by deadphotosociety. http://farm1.static.flickr.com/165/4...SxWQo</summary>

[code]....

View 2 Replies

Actionscript 3 :: How To Strip Trailing Linebreaks From A String

Feb 21, 2011

I need to remove some redundant ' 's from the end of a csv I'm importing before it divides the lines up into an array (otherwise I get extra empty rows).

[Code]...

View 2 Replies

ActionScript 2.0 :: When Button 1 Is Pressed, It Should Go Back To Strip 1?

Jul 1, 2006

I'm trying to help my girlfriend mock up a site for uni. I've been trying to get it so that when a certain button is pressed, it goes and plays from a certain frame number in a movie clip.In scene 1, there are 3 buttons and a movie clip. The movie clip has the tweens to the next strip in a comic. Initially strip 1 from the comic can be seen and when button 2 is pressed, it plays the tween in the movie clip and strip 2 can be seen. When button 1 is pressed, it should go back to strip 1.

Button 1 code:

Code:
on (release) {
if (movie1._currentframe == 10) {
movie1.gotoAndPlay(40);
}
}
I'd upload the .fla but it's too big. In the movieclip there are stop() actions to stop the movie from going to strip 3 if you only want strip 2 displayed.

View 2 Replies

ActionScript 2.0 :: How To Strip And Re-Skin List Component

Mar 18, 2009

I have been successful on striping certain components in flash and giving them a new skin, but now I need to strip and re-skin the list component. It uses the ui scroll bar and thats not a problem to re-skin but i need to change the background color and highlighted text of the list.

View 1 Replies

ActionScript 2.0 :: Strip Out The Word 'Section' From A Text Box That Loads From Xml?

Aug 4, 2010

I'm struggling to strip out the word 'Section' from a text box that loads from xml.

for(i=0; i<xmlNode.childNodes[1].childNodes[0].childNodes.length; i++)
if(xmlNode.childNodes[1].childNodes[0].childNodes[i].nodeName == "sections")
sectNo = xmlNode.childNodes[1].childNodes[0].childNodes[i].firstChild;
section_txt.text += sectNo;

When the node 'sections' returns 'Section 12' how can I strip out the word 'Section' and only have '12' load into the section_txt box?

View 3 Replies

Media Server :: Strip Audio From Video And Stream

Nov 20, 2009

We have the Flash Media Interactive Serve 3.5. Is there an automated way to strip the audio from video files and stream on FMIS? .

View 2 Replies

Flex :: Adobe Strip From Embed Symbols When Compiling?

Aug 9, 2009

I wanted an animation to dispatch custom events as it cycled. It became apparent that not even trace() was running. After some searching, I found the following at Adobe:[URL].."If the SWF file contains any ActionScript code, Flex prints a warning during compilation and then strips out the ActionScript from the embed symbol. This means that you can only embed the symbol itself."

I also found a work-around by Grant Skinner at:[URL].. I can proceed, but I'm still wondering. Why does mxmlc strip ActionScript from Flash compiled resources when embedding their symbols into Flex apps using metatags?

View 2 Replies

Flash :: Flex Applications - Strip Trace Messages?

Nov 9, 2010

how can I strip trace() messages from a flex and flash applications? I write flash and flex applications and i use a lot of trace messages for debugging, but when i product the actual swf i want it to be stripped from any trace messages.

View 6 Replies

Actionscript :: Strip (HTML) Tags From A String In Flex 4.5 / 4.6?

Nov 20, 2011

How do you strip (HTML) tags from a String in Flex 4.5 / 4.6?

View 1 Replies

ActionScript 2.0 :: Horizontal Strip That Moves With The Users Mouse?

Jul 28, 2007

Basically, I have a photo gallery, on a long horizontal strip. I want the user to navigate this strip by simply moving their mouse to the right to make it move right, and moving their mouse to the left to make it move left.

I know that there is a way to do this where you track the mouse whereever it is on the stage...but I'd only like it to be only active when it is over this particular strip.

Also, each thumbnail on this strip has a rollover effect. I would like to have that roll over effect stay active...

View 1 Replies

ActionScript 3.0 :: Add Some Action Script To Horizontally Animate A Strip Of Text?

Jul 27, 2011

how to loop this motion.I have added some action script to horizontally animate a strip of text... now I need that to loop so it's continuous.this is my code

countries_mc.addEventListener(Event.ENTER_FRAME, fl_AnimateHorizontally);
function fl_AnimateHorizontally(event:Event)
{[code]....

View 2 Replies

ActionScript 3.0 :: Carousel - Strip Continue To Scroll Whether You Moused Left Or Right?

Aug 26, 2008

I have a photo scroller built with CS3 and actionscript. It uses XML to load images for the thumb-scroll portion. I'd like to know if there is a quick fix to make the picstrip seem to a carousel - in other words, the strip would just continue to scroll whether you moused left or right.

View 1 Replies

ActionScript 2.0 :: Importing XML - Strip Unintentional Line Breaks From Text?

Jan 29, 2010

I know that I've seen a few threads about this, but I'm not finding what I'm looking for. I've got an AS2 flash site using XML to import the text, then parsing it. I have a function that gets the text, then applies styles (css) to it. I'm wondering if there is an easy way to strip the unintentional line breaks at the same time, within the same function? Here is my get text function:

[Code]...

View 1 Replies

ActionScript 2.0 :: Scope - XML Data To Be Accessible In The Public Function Strip()

Apr 27, 2010

I'm having some big issues with the scoping problems in my XMLConnect Class. I already found some things about the Delegate class online for setting the scope correctly, but my code still doesn't work the way it should Problem I need the XML data to be accesible in the public function Strip() because the user needs to put in some characters to strip from the strings in the xml file. Does someone known how to fix this scoping problems?

[Code]...

View 0 Replies







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