ActionScript 2.0 :: Buttons Inside MovieClips - Arrow And Thumbnail Function

May 5, 2011

It's just a simple navigation thing, with a strip of thumbnails that gets moved left and right with arrows that load a larger picture when each thumbnail is clicked. Basically I would like to move the strip of thumbnails across when you click the arrows, and then when you click a thumbnail it loads the full size image above the strip. This is my thought process for each thing that needs to be scripted.

For the arrow function:
- The arrow buttons need to tell the movieclip to move to the relevant frame WITHIN the movieclip where I have included the tween to the next set of thumbnails. I tried scripting this on the button itself as well as on the first frame of the actions layer and I couldn't get either to work.
- I initially had the buttons within the movieclip because then I could control when there is a left and right button, or just a right button or just a left button (i.e., still more pics to view, you can go back to the previous set of pics or onto the next set of pics, or you've reached the end of the row of thumbnails) but I couldn't get my button to do anything when it was inside the same movieclip as the thumbnail rows. I would prefer to have the buttons work inside the movieclip for the reason described.

For the thumbnail function:
- The problem here, I think, is that I have buttons within a movieclip that I am trying to get to load something to the stage. Here, I tried to add the script to the button within the movieclip as well as the first frame of the sctions layer but again that didn't work either.
- Another important function is going to be removing whatever is on the stage when you click another thumbnail. I guess each image could just keep loading on top of the previous image but won't that cause a problem with the depth of your layers?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Adding Properties And Events To MovieClips Inside A Loop Inside A Function

Dec 8, 2009

I have done this same thing in ActionScript 3, but am not familiar with ActionScript 2, which I am forced to use for this project. I am loading products into a SWF via XML and attempting to add a click event to each dynamically-created movieclip. Simply tracing the text from a node in XML will do for now. I'd like to assign a property called "desc" or "description" to each movieclip and have it trace that property's value when clicked. Here is the relevant portion of my code as it stands:

ActionScript Code:
var iXML:XML = new XML();
iXML.ignoreWhite = true;

[Code].....

View 6 Replies

ActionScript 3.0 :: Using MovieClips, Etc. Inside Of Buttons?

Jan 20, 2010

I created a movie clip (let's call it "mysymbol") that contains several buttons, as well as functions for MOUSE_OVER and MOUSE_OUT events ("mover" and "mout"). Everything works when the mouse enters "mysymbol" for the first time (mover is being called), but if I move the mouse inside mysymbol to another button, the MOUSE_OUT function (mout) is being called first and then immediately mover. Obviously, I don't want there to be any function calling at all!   I have found a way to circumvent this, but since I'm new at this I struggle to get it to work properly:

If mysymbol is a button instead of a movie clip, then I can move my mouse freely within mysymbol without triggering any MOUSE_OVER or MOUSE_OUT events. However, there is another problem: I somehow can't get movie clips to work inside a button(I assume this is by design), so how do I get my animations etc. to work inside this button? is there an alternative to using a button as a container?

View 5 Replies

ActionScript 3.0 :: Using Buttons Inside Movieclips?

Nov 3, 2010

I am trying to teach myself Flash with AS3, I am using Flash Pro CS5. I am making a website and I want to be able to press a button thats inside a movieclip to navigate to a given frame. Example, Two frames, frame 1 has a movieclip with a button inside a scrollpane. I want to click the button and go to frame 2. need a complete and detailed script for this if thats ok. Also, I dont know if this helps any but the code that I use for buttons on the main timeline is this:

ActionScript Code:
function button_clicked(e:MouseEvent):void{
gotoAndStop("frame2");
}
button.addEventListener(MouseEvent.CLICK, button_clicked);

View 4 Replies

ActionScript 1/2 :: Buttons Inside A Movieclips Won't Work?

Dec 8, 2009

I have a movieclip that has several buttons inside it. When I use this code:

mc.onRollOver = function()
{
// do stuff

[code].....

View 3 Replies

ActionScript 3.0 :: Buttons Nested Inside MovieClips

Dec 2, 2010

I am having trouble where this error is showing up: TypeError: Error #1009: Cannot access a property or method of a null object reference. at EssayMain() I have some trace statements in place

[Code]....

View 4 Replies

Actionscript 3 :: Timeline Navigation Buttons Inside Movieclips?

Apr 27, 2011

I have an MC inside which consists of some images on different frames and some buttons which are supposed to gotoandStop on each of the frames. A simple gallery.

My plan is to create an MC for each gallery on my site and sit each one in a unique frame, so the main navigation btns go to a frame with an MC in it, then the MC buttons navigate within that gallery.

But the buttons aren't working.

Here's the button code inside the MC:

on1_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
{
gotoAndStop("on1");
}

Note: I've labelled the button instances and frames the same for ease of checking the code, there are multiple buttons here each with the same code except for the change in numbers.

View 1 Replies

ActionScript 2.0 :: Buttons Inside Animated Movieclips Not Working?

Feb 17, 2008

ated menu panel (movieclip) with about 4 buttons inside it (as movieclips)I know the reason the buttons are not responding to my script because the movieclip they are in is animated. (I tested this with a static version and the button script works)How can I make the buttons inside the animated movieclip work is my big question!?Here is part of my code (the revelant bit) on 1st frame of Root:

Code:
// Menu animation script:
this.menu_mc.onRollOver=function(){

[code].....

View 1 Replies

ActionScript 2.0 :: Linking Buttons Inside Movieclips To Frame Labels?

Feb 17, 2009

I've been working on a new issue while giving a break on cracking the other one.I have a movie clip acting as a button with rollover/rollout animation- we'll call it menu_mc for simple reference.I'm basically creating a rollover submenu. I've set it up a few different ways but the most user friendly has been hiding the submenu_mc (which has 4 linked buttons to root frame inside) by doing:

_root.sub5_mc._visible = false;
then inside the menu_mc with the rollover I have the submenu trigger set to show:
_root.sub5_mc._visible = true;

[code]........

View 3 Replies

ActionScript 3.0 :: Buttons Inside Movieclips. Timeline Control Dilema?

Mar 10, 2009

so im making a portfolio website that is composed of 3 general movie clips all located on the main stage.

STAGE ---> mainscreenMC
---> recentworkMC
---> newsMC

[code].....

View 4 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 3.0 :: 20 MovieClips - Each With 30 Buttons To Do Different Function

Jun 7, 2011

I have 30 buttons on the stage each with a different instance name.

ActionScript Code:
private function init(e:Event):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
btnArray = [h1_btn, h2_btn, h3_btn, h4_btn, h5_btn, h6_btn, h7_btn, h8_btn, h9_btn];
for each (var btn:*in btnArray) {
btn.addEventListener(MouseEvent.CLICK, checkClick);
btn.buttonMode = true;
[Code] .....

Not all of them only a snippet. Is there a short way of doing this. The only prob is each function will have a completely different piece of code in it eventually doing different things. I have 20 mc with 30 btns in each.

View 9 Replies

ActionScript 3.0 :: Flash Need Buttons Inside Movieclip Call Function In Main Class

Nov 16, 2010

I'm having some trouble finishing an interface i'm working on,the function indica() adds a menu listing of items (indicadores) inside a mask because its too large, and i added a scrollbar that allows to scroll through the items but now i need to add the buttons inside the movie clip indicative,i can add symbols and buttons, but i'm having trouble having them call functions inside the same class that the function indica() is running.[code]

View 2 Replies

ActionScript 2.0 :: Moving A Mc With Arrow Buttons?

Oct 12, 2005

can anyone take a look at this .fla, and tell me what code needs to be applied to the arrow buttons?

View 7 Replies

ActionScript 3.0 :: Navigating A Movie Clip With The Arrow Key Buttons?

Feb 1, 2010

I have three separate movie clips on the stage, while the mouse is over any movie clip I want the arrow keys (up,down,left,right) to navigate through the frames of that movieclip. The following code only seems to partially work. When I interact with a button on a movieclip the arrow keys only advance to the next or previous frame of the movie clip and then no longer work.

[Code]...

View 2 Replies

ActionScript 3.0 :: Arrow Buttons To Move Through Movie Clip On Mouseover?

May 5, 2010

I've got arrow buttons and a movie clip on my stage. I have an event listener for each arrow button for a MOUSE_OVER event that calls a handler function in my movie clip. The handler functions just call prevFrame(); or nextFrame(); What I want to happen is that the movie clip continues to play forward or backward as long as the mouse is over the appropriate arrow button.

Stage Code:

leftArrow.addEventListener(MouseEvent.MOUSE_OVER, imgBar.goLeft);
rightArrow.addEventListener(MouseEvent.MOUSE_OVER, imgBar.goRight);

Movie Clip Code:

function goRight(event:MouseEvent):void{
this.nextFrame();
}

[code]....

I'm not sure if MOUSE_OVER is the correct way to do this if I want the function to continue as the mouse even only happens once.

View 3 Replies

Flash :: Move MovieClip Using Onstage Buttons, Not Arrow Keys

Mar 23, 2010

To move the MC, using arrow keys I used the following and it worked:

var timer:Timer;
var direct:String;
initStage();

[Code].....

I tried to convert this to use my onstage buttons: up_btn, down_btn, left_btn, right_btn to move MC box but couldn't figure it out.

View 1 Replies

Web Portfolio - Reusing Thumbnail Buttons?

Jun 21, 2009

I am doing a web portfolio with thumbnail buttons that change the pictures. What is the best way to avoid having to make a new button for each new picture thumbnail? So resusing the button but changing the thumbnail picture in it and what picture it links to? Using CS4.

View 1 Replies

ActionScript 3.0 :: Thumbnail Bar With Next Prev Buttons

Feb 27, 2011

I need to create a flash photo gallery for their website. I've looked at different tutorials but all of the ones I have found only show stationary thumbnails. What I need is a gallery that shows the thumbnails with next and previous buttons, while showing the imaged that was clicked.

This is an example of what I would like. [URL]

This website gives you the option to turn on the thumbnails, I however do not want that option I just want to the thumbs on.

View 3 Replies

ActionScript 3.0 :: Printing Movieclips With Movieclips Inside?

Sep 15, 2010

Printing an MC is easy enough. But I am having trouble printing an MC which has multiple MCs inside of it. They just don't get printed.
 
I am trying to avoid printAsBitmap.

View 5 Replies

ActionScript 2.0 :: Why Do Movieclips Inside Movieclips Have Different _x And _y Than The Timeline

Oct 30, 2007

why does a MC inside another MC have different _x and _y values than the main timeline?What I am trying to do right now is animate a MC inside another MC then get the main MC holding everything to move where that new MC ended animating at (it's part of a game I'm making.)

I know it's confusing but Flash shows the cursors current X and Y in the info panel, which is the same as the main timeline. Yet inside the movieclip, an x of 76 and a y of 277 on the timeline is -195 and -30.9 (respectively) inside the MC.How do I fix it so I can get the _x and _y values to match up so I can tell the main MC to reposition itself to the new X and Y (of the inside MC)

View 1 Replies

ActionScript 2.0 :: MovieClips Inside Other MovieClips - Detecting All

Mar 27, 2008

I have a movieclip called mapWindow, inside mapWindow are dynamically created movieclips of various sizes. The movieclips inside the mapWindow don't take up the entire space of the mapWindow and thus I use a startDrag on the mapWindow upon detection of a mouse press. The problem is, I don't want the start drag to start if the mouse is detected over any of the child movieclips inside mapWindow.

I have a few ideas of how to proceed, but I'm not sure how to reference all child movieclips of a particular movieclip - or something along those lines.

It would be easy to use the hittest function if I knew how to reference all the movieclips I need to, but alas...

View 1 Replies

ActionScript 3.0 :: Thumbnail Buttons Not Working On Frame 2?

Mar 10, 2011

I'm working on putting together a portfolio website in Actionscript 3.0, and here's my situation: I have four main sections (Home, Works, Reel and Contact). When you first enter the website, it directs you to the Home content, which is on Frame 1. When you click on Works, it is intended to take you to Frame 2 - which it does just fine. On the works page, however, there is a frame to display large versions of the row of thumbnails along the bottom. Frame 2 automatically displays the large image of the first thumbnail, but the second thumbnail redirects you to Frame 3, which is identical, except it replaces the large image of the first thumbnail with the large image of the second thumbnail - and so on and so forth.

The thing is, when I get to Frame 2, my thumbnail buttons aren't working and I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Portfolio_Site_03_fla::MainTimeline/frame1()

What I'm getting from this error is that it essentially doesn't recognize my thumbnail buttons because they do not exist on frame 1. I even attempted to move the keyframes with the thumbnail buttons on them to frame 1 and everything was working just fine, except for the fact that I had big thumbnail buttons all over my home page which I do not want to be there. For reference, here is my AS code:

ActionScript Code:
stop();
import flash.events.MouseEvent;
import flash.net.URLRequest;
//---Home Button---\
Home_Button.addEventListener(MouseEvent.CLICK,hClick);
function hClick(event:MouseEvent):void{
[Code] .....

How can I resolve my situation and get my buttons to do what I want them to do? My only guess would be that I'd need to make a new scene, but wasn't that one of the major points of AS 3.0?

View 1 Replies

ActionScript 2.0 :: Thumbnail Menu With Next And Preview Buttons?

May 4, 2005

i have created xml based gallery in flash.. everything is working good... its like portfolio... having lots of jpgs wid thumbnails... thats fine..i have like 23 projects... its like verticle menu wid mask showing only 5 thumbnails on page... i have 2 buttons on bottom of the page prev btn and next btn... ok.. when i click on next button i want to show next 5 thumbnails which will slide up.. and so on... and when i click prev btn i want to slide back previous 5 thumbnails...i have blank mc whose instance name is menu_mc... i have another mc called thumb_mc which will be attached thru actionscript containing thumbnails from xml file which are like 23 small thumbs...

i have tried like this

on menu_mc attached this action script
menu_mc.onLoad = function() {
this._y = this._y;
div = 5
}

[code].....

but its not working..

View 8 Replies

ActionScript 2.0 :: Easing Function - Increasing Speed Of Object With Arrow Key

Nov 5, 2006

I'm working on this "game" and I currently have a ball that increases in speed as you hold down the arrow key. What I am now trying to accomplish is I want the ball to ease to a stop when the user let's go of the keyboard key (onKeyUp). Here's the File. <---Link

Here is my code so far:
var speed = 10;
ball_mc.onEnterFrame = function (){
if(Key.isDown(Key.RIGHT)){
this._x += speed += 1;
} if(Key.isDown(Key.UP)){
[Code] .....

So once you let go of the Keyboard Key I want the ball to slow down to a stop.

View 1 Replies

XML Scrolling Thumbnail, Image Loader, & Buttons [halfway Works]?

Jul 2, 2009

Intro:I started a flash-based website a few years ago. Back in 2006 I was able to get a xml scrolling thumbnail, image loader to work without a glitch.For numerous reasons I had to put the project on hold until now. [one was that my 30 day trial of flash expired and only recently was I able to purchase the Adobe Web Suite CS4 as well as a new computer which could run the apps.]

Last Friday saw a bump in the road in the development of my site as two, rather straightforward task, turned into something short of a nightmare as I have been unable to get past these two, seemingly, relatively simple task.I have posted in 4 other flash forums the issues, in detail, that I am facing - and have quite a bit of interest/views in the topic as the numbers suggest - yet no response/answer as of yet. [Which confirms other messages I have seen which seem to state that working with buttons has become increasingly difficult with the newer version of flash - something Im a bit surprised with actually from Adobe. - I would have thought there would be a palette where you could set parameters...] 

Screenshot of Site/Timeline: Before getting into the two questions I have, I would like to post an image of the site as it looks whenever an swf file is saved out, as well as a piece of the timeline in the back for reference.As of now when the swf file is saved out you get exactly what you see above:

a: A scrolling thumbnail

b: ...which loads a large image when clicked on it - PEFECT...
 
BUT...1a: I need for the buttons to load in this action, not for it to just load on its own.[i.e., the silk_paintings gallery is what is open, so I need the "silk_paintings" button to call up this action]
 
note: Initially I had attacked this problem by taking out the actions layer you see above and applying it directly to the individual buttons with some crude MouseEvent Listener/Handerls... that did not work - at all.Im sure it may be "easier" to make an array out of it, but with my coding level it may be "easier" to apply it to the buttons.
 
1b: How I currently see it, I would take the xml-list and duplicate it for the number of galleries I have.[I would then re-name the xml-list to reflect the name of the galleries they are to represent, i.e. "silk_paintings"][also, I would have to rename the folders to "thumbnails1,2,3, etc., & "images 1,2,3, etc"
 
From there I would duplicate the actions and paste it into the buttons, changing the xml-list name to that of "silk_paintings", etc., as well as write in the MouseEvent listener Handler to make it work. [ah, ha, but what is that magic phrase, I have tried to implement various code from other tutorials, and all in vein.]
 
At this point I would be tickled pink just to get this to basic function to work.However, once the buttons are working and calling up the xml, etc., then I need the buttons to stay on the semi-transparent blue color it is whenever in the 'hit' state. [note: NOT pictured above.]With the way the buttons are currently set up, and with wanting to use scripting to get them to interact with the thumbnail gallery, it will have to be some miraculous code to tell that button what color to stay as whenever its clicked, and of course it going back to white when another button is clicked.
 
Conclusion:Since this is an Adobe Forum I would like to make a few additional statements in hopes that the developers, etc. may take heed.Adobes products are not cheap, and when I went to purchase the websuite I went in as a designer needing a program as not to need to program.I understand the flexibility that coding gives, but something as simple as linking buttons should not be in the realms of rocket science.

stop();
fscommand(allowscale, false);//keep SWF display at 100%

var x:XML = new XML ();//Define XML Object[code]....

View 31 Replies

ActionScript 2.0 :: Auto-play And Add Control Buttons To Thumbnail Gallery

Feb 12, 2010

I used a tutorial ("Photo Gallery and Thumbnails: Flash Tutorial!" by tutvid on utube) to create a gallery on my website. I love the thumbnail navigation but, I want it to play like a slideshow when it first opens and I want to add play/pause buttons. I am using Flash MX 2004 and don't know much at all about actionscript or how to make these modifications. I emailed the author of the tutorial to see if it was possible to make these changes his reply was: "Yes, it is possible to modify the file in this way, however I don't remember how I set it up so I wouldn't be able to re-code it for you in this email. I would take a look around the web at Actionscript 2.0 slide shows and see if you can use the code they are using and make it work with your gallery."

View 4 Replies

Flash :: IDE - Wordpress - Lightbox 2 - Importing The Links For Each Of The Thumbnail Buttons From A .txt File

Mar 19, 2010

i've designed a strip of thumbnails in flash to go in a Wordpress site i'm working on, which when clicked need to open up images and videos using Lightbox 2. (Lightbox is already setup and working.) The problem is that i'm importing the links for each of the thumbnail buttons from a .txt file which works like this:

[Code]...

View 5 Replies

IDE :: ThumbNailScroller Function - Adding A Thumbnail To An Image Gallery

Aug 2, 2008

I was reading your tutorial on adding a thumbnail to an image gallery. Im trying to use your thumbnail_final.fla inside another movie and is not working for me. I made a movie, in Scene 1 of this movie i have an empty movie clip(DisplayArea) and a menu button(Gallery) so that when i hit the Gallery button it load the thumbnail)final movie into the empty movie clip DisplayArea. Everything work except for the thumbNailScroller function. It load all the thumbnails and you can click them and they load the matching big picture and all but the scrolling function is not working.

[Code]...

View 3 Replies

ActionScript 3.0 :: Call A Javascript Function When Click On The Thumbnail?

Jul 10, 2009

[URL]

I have a slider that is working perfectly, only thing I am trying to now call a javascript function when I click on the thumbnail. I cant seem to get the array to work with the xml file...

View 2 Replies







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