ActionScript 1/2 :: Scrolling And Movie Clips Loaded From The Library?

Aug 12, 2010

Ok, I'm using actionscript 2.0, and I am trying to make a scrolling image gallery. I have a movie clip with three layers. the first contains a movie clip used as a scroll bar. The second is a mask used to hide the overflow content, and the third contains movie clip thumbnails. when I click one of the thumbnails, it loads a symbol containing a larger version of the picture over top of the thumbnails on the same layer. My problem is, the large image is added at the very top of the movie clip, even when it is scrolled out of sight. I want it to appear in sight, so the user doesn't have to scroll all the way back up to the top to see it. This is annoying and confusing. Is there a way to do this?

Here is the code I used to create the scroll effect (there is actually a whole lot more to the code but it is very long, so I am not adding it now. I will if it is needed though)(Oh, and there is no text involved in this. I just got this code off a tutorial and I haven't changed the variable names yet)
 
var scrollUpper:Number = 58; var scrollLower:Number = 309;
var textLower:Number = 60; var textUpper:Number = -179;
var scrollRange:Number = scrollLower - scrollUpper; var textRange:Number = textLower

[code].....

View 3 Replies


Similar Posts:


Access Movie Clips From A Swf Library In Another?

Jun 3, 2009

I have a main swf called, main.swf; Inside it I load another movie, skin.swf (this has 10 movieclips in the library with linkage name). What I want is to attach the movieclips from skin.swf inside the main.swf.

But problem is I am not able to attach the movie clip in the main.swf from skin.swf.

View 3 Replies

ActionScript 2.0 :: Loading Movie Clips From Library?

Jan 30, 2009

I'm new to AS but have some coding background (php, sql, vba) and some basic (non-AS) Flash skills.I want to create a bar chart a bit like this: http:[url].....Really would like some sample code if poss. This is my thinking:

1) Each section of the bar chart will be a movie clip, mc_2, mc_3 etc.

2) There will be an array with Qty, Type, Desc and Name of movie clip (e.g. mc_3).

3) There is a generic bar chart "block" movie clip in the library ("Block")

4) So I plan to loop through the array, attachMovie for each iteration, resize the Movie proportionate to Qty, and colour it by Type.

Problem is: (1) I don't know the right functions to use; (2) Are mc_2, mc_3 INSTANCES of my generic movieclip, "Block" ? (3) should the code sit on the timeline? (4) do i need an empty movie clip to attach the library item to?

Code:
Pseudo code:
n=length of array
for (var i:Number = 0; i < n; i++) {[code]....

The final thing would be a bit more complex with frames etc, but generating the movies would be a start.

View 2 Replies

ActionScript 2.0 :: Opening Movie Clips From Library?

Mar 6, 2007

If i want to open a movie clip from the library using actionscript - would i use attachMovie or LoadMovie??? I will be opening it with a button.

View 6 Replies

ActionScript 2.0 :: Replace A Movie Clips By Another One Placed In The Library

Jul 22, 2008

how to replace a MC by another one placed in the library.

View 2 Replies

ActionScript 3.0 :: How Many Small Movie Clips Can I Store In The Library ?

Sep 21, 2011

How many small size movie clips can I store in the library. On the stage I randomly use 6 of them but this random clips will come from an array full of 3500 m.clips. Is it reasonable , or should I use another way like using xml files.

View 10 Replies

ActionScript 2.0 :: Random Display Of Movie Clips From Library?

Jan 5, 2010

I'm trying to display random movie clips within the library (See attached fla)
each movie clip needs to display (fade in/fade out) and then proceed to display another movie clip from the library

You'll see how i have tried to do this is by creating a random number

Code:
var myImageSequence = 6;
var RandomLogo = Math.floor(Math.random()*myImageSequence)+1;
gotoAndStop(RandomLogo);

this code works, as it always selects a random frame and plays the movie clip within but then stops.

I need to then select another mc after this animation has finished and so on within a loop

View 3 Replies

ActionScript 3.0 :: Loading Random Movie Clips From The Library?

Mar 19, 2009

(****another title for this could be "how to create a MovieClip variable")
basically, im trying to load random movie clips from the library when i run the function "TRO1".. the logic behind what im trying to do is to to first create an array containing the class names (name given in the "linkage" option) of the movie clips in the library... then randomly select an item from that array... then bring it to the stage.. Here is the code I typed:

var characterArray:Array = ["truck", "car", "boat", "train", "helicopter"]
function TRO1(event:Event):void
{

[Code].....

When i try to run the function, i get the error message "Instantiation attempted on a non-constructor..."

I think the problem is that flash doesn't understand what "randomCharacter" is in the line "var character:MovieClip = new randomCharacter();"... I assume there is a proper way of writing the "randomCharacter" variable so that i can use it in the succeeding line...

View 1 Replies

ActionScript 3.0 :: Load Movie Clips In Library Onto Stage?

Jun 7, 2010

I'm creating a site and when a particular button in the navigation is clicked I want to load the corresponding "page" movie clip onto the stage and remove any other "page" that is currently loaded. I would also like to have a nice alpha fade between them. I've been searching around and can't find anything. I know this is simple like I need a loader container and I need to export for ActionScript the movie clips I want to load into the container.

View 8 Replies

ActionScript 3.0 :: Unable To Compile Clips And Put Them Into Main Movie Library

Jun 17, 2009

I have code like this:
 
ldr = new Loader();              var req:URLRequest = new URLRequest("SWF/Somefile.swf");
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);              ldr.load(req);             Object.addChild(ldr);
 
That I use to load SWF movies into a flash file. I do this because I am unable to compile clips and put them into my main movie library without breaking the actionscript and causing everything to go haywire.The problem with this is that it will only work so long as the swf movie file is within the vicinity of the SWF/Somefile.swf. I need to make a standalone SWF for my purposes.

View 3 Replies

ActionScript 3.0 :: Adding Random Movie Clips From Library To Stage?

Aug 4, 2009

How to add random movie clip onMouse Move to stage from many (lets say 50) different movie clips in library? If I wanted to add one movie clip to stage I would do liko so:

ActionScript Code:
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(e:MouseEvent):void {
var mc:MovieClip = new Ball();

View 0 Replies

ActionScript 2.0 :: Put The Movie Clips In The Library The Preloader Doesn't Work

Jun 21, 2005

I have a menu which attach movie clips from the library, when I first probed the preloader there were not any linked movie clips, neither png files (because each button in the menu attach a picture which is inside the movie clip) now that I have put the movie clips in the library the preloader doesn't work and I don't know why.

View 4 Replies

ActionScript 1/2 :: Addressing Movie Clips Inside A Movie Clip That Has Been Loaded Into A ScrollPane

Jul 6, 2009

I'm trying to use the scroll pane component for the first time, and I've spent most of the day getting nowhere. Based on my experience with other components and with loading content into movie clips, I expected that I would point my scroll pane to its content and be off and running, but that hasn't happened.

[Code]...

View 4 Replies

ActionScript 3.0 :: Pulling Movie Clips From Library At Runtime, Dynamic Names?

Jun 26, 2009

Currently i am experiencing a problem with pulling Movie Clips from a Library and Tweening it (adding) it to the stage at runtime and then quickly removing it (addChild()) and removeChild(); I have 6 Library items, which i am interested in using.

car_mc1
car_mc2
car_mc3[code].....

My Question:

1) The name is not genereted through the addChild metho, is there an temp Add solution or something that would add on the Fly?

2)The object when working as a single object, gets Tweened out to -200, i just want it to Tween out and get Removed form the stage?

3) The Movie Clip remains on the screen while another instance is brought on when using static naming convetion (this is just to say that i have tested it),I only want the object to be available for the Tween, nothing else

View 6 Replies

ActionScript 2.0 :: Scrolling Dynamic Movie Loaded Via AttachMovie?

Sep 9, 2005

What I have is a news blogger that is loaded via xml which uses php to write to the xml file. I have my "blogger" movie clip that loads all of the different blogger info into it. It is loaded into a blank container movie clip via attachMovie and when the user adds a new blog it creates new instance of it and moves the rest down. All works great with that.

Now the problem is after the client creates more then 3 blogs, it begins to run off the site. So what I need to do is put it into a scroller. Now I have gotten it into the scroller but it seems that the scroller is not seeing the actual size of the container clip that is holding all of these instances of the "blog" movie that is loaded from attachMovie. The size will change depending on how many blogs there are and I need to figure out how to add script to calculate that. Here is the code I have to load the "blogitem" movie into the blank container movie.

Code:
var i = 0;
if (gateXML.hasChildNodes())
{
child = gateXML.firstChild;

[code]....

View 4 Replies

ActionScript 3.0 :: Loaded SWF Cannot Add Movie From Library?

Jan 31, 2011

I have a "Main" swf, which loads "Site" swf.

"Site" is a normal movie, with it's Document Class. When I run it alone, it works fine, adding a movieclip from library into it's stage.

But when I run "Main", it show me an error: 1180: Call to a possibly undefined method mcSiteInside. "mcSiteInside" is a Movieclip, from Site's Library.

View 3 Replies

ActionScript 3.0 :: Swapping Movie Clips From A Loaded Swf

Aug 7, 2009

I wrote some actionscript that would load in different values from an xml file in order to play certain movie clips at certain times from a specified swf file. It actually works for the most part. I think the problem happens when I select a movie clip that was already previously selected. It actually won't load it at that point. I will post actionscript in the morning, but I feel like this should be a rather common issue, and I just don't know some general piece of info. I use an actionlistener to load the swf. I create an associative array that works as follows [action] => movieclip Then on an action it will make a movie clip object = loader.content.getChildByName(theActions[action]);

View 4 Replies

ActionScript 2.0 :: Draggable Movie Clip Loaded From Library?

Apr 14, 2008

I have created a multi-scene flash document. One of my buttons on the stage loads a movie clip from my library and has the following script:

on (press) {
this.attachMovie("help", "window", 1);
window._x = -300;
window._y = 200;
}

Works great. Then inside this movie clip, I have an invisible button with the following script:

on (press) {
startDrag(window);
}
on (release) {
stopDrag();
}

This allows the movie clip that popped up to be draggable. This also works perfectly.

My problem is, the button will only attach the movie clip on the first scene. I currently have it loading in level 1. Does anyone know how I can work around this?

View 1 Replies

Professional :: Passing Variables To And From Loaded Movie Clips

May 7, 2010

I have a movie clip where I store a value in a variable called "yourname" and then load a different .swf file in level 1. I display the value of "yourname" in a dynamic text box, that works fine. I then move on to a frame where the user has an input text box and can re-enter a value for the "yourname" variable, and then clicks a button symbol to reassign the value. Bear in mind, "yourname" was not originally stored on this level and this movie clip, it is stored on level 0 on the first (main) movie clip.  Here is my code in the button:
 
on (release) {
_level0.yourname = String (inpt_newName.text);
}
 
inpt_newName is the input text box. My intent here is to have a "main" timeline where variables are stored, and then load and unload various .swf movie clips as needed, storing and variables (i.e. decisions) that the user makes.

View 1 Replies

ActionScript 3.0 :: Duplicate Icons (swf Movie Clips) Loaded From A XML?

Jul 7, 2009

I try to code an as3 where I need to duplicate a mc casted from objects, which are loaded from an XML file. My goal is to make a wrap around effects for animated menu icons that use separate swf files.this is the function I try to create, but my concern is in the else statement:

Code:
private function onItemLoaded(e:Event):void
{
loadedItems++;
var contentitem:MovieClip = MovieClip(loader.content);

[code]....

in the copyFirst/Last declaration I try to dupe refFirst and refLast... but It seems not to be the good way (error).

View 2 Replies

ActionScript 3.0 :: Access Movie Clips Inside Loaded SWF?

Feb 9, 2010

So I am loading an SWF like this:

ActionScript Code:
public function layoutLoad(e:Event):void
{
FlashConnect.trace("Display.loadLayout()");

[Code].....

It will compile but I get a "Cannot access a property or method of a null object reference." So I am not targeting right. I did double check my instance name is correct and in the root of the loaded SWF

View 2 Replies

ActionScript 2.0 :: Showing That External Movie Clips Are Loaded

Dec 12, 2004

On some sites i have seen usually portfolio or gallery type sites there are thumbnails, text or some shape that you click on to view a particular image. What I'm getting at is some of the sties show visually that the clip has been loaded with change of alpha (images that are not loaded greyed out and ones that have already been loaded are in colour etc..). An example of what i'm talking about is on [URL] When you click on the menu (selection uno), it loads a particular clip, and throughout the session on the site, u can tell which ones have been loaded and have not. I know there are probably many down and dirty ways of achieving this, but i know there is usually 1 or 2 'proper' methods for doing a particular thing.

View 1 Replies

ActionScript 2.0 :: Showing That External Movie Clips Are Loaded?

Dec 12, 2004

On some sites i have seen usually portfolio or gallery type sites there are thumbnails, text or some shape that you click on to view a particular image. What I'm getting at is some of the sties show visually that the clip has been loaded with change of alpha (images that are not loaded greyed out and ones that have already been loaded are in colour etc..).
An example of what i'm talking about is onWhen you click on the menu (selection uno), it loads a particular clip, and throughout the session on the site, u can tell which ones have been loaded and have not.I know there are probably many down and dirty ways of achieving this, but i know there is usually 1 or 2 'proper' methods for doing a particular thing

View 1 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 :: Flash 8 - Scrollbar Not Scrolling Dynamically Loaded Movies Inside A Movie?

Jul 18, 2010

I'm having trouble getting my scrollbar to work with dynamically loaded movies inside the movie the scrollbar is attached to.An example of my working scrollbar code with static data and my broken scrollbar with dynamic data can be found here: [URL]

I have a for loop that pulls data from my database, populates a topMovie(contentMain) with 20 subMovies inside it. My scrollbar is attached to topMovie. Once the data is loaded and the topMovie is populated, the scrollFace(not ScrollTrack) dissapears and the dynamic movie is not scrollable.As a test, I populated the topMovie with graphic boxes and no dynamic movies and it scrolls just fine.

Scrollbar code:

Code:
scrolling = function () {
var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height;
var scrollFaceHeight:Number = scrollFace._height;

[code]....

View 2 Replies

ActionScript 2.0 :: Scrolling Loaded Movies - Hold Down The Button And Have The Movie Scroll Continuously?

Mar 24, 2004

Ive made two simple up/down buttons, that "scrolls" a loaded movie by the following code (lets say the movie is loaded to level 5):

_level5._y += 5;

Very simple.

Well, Id like to be able to hold down the button and have the movie scroll continously, like the scroll++ code does for textboxes.Is that possible?

View 2 Replies

ActionScript 2.0 :: Get Loaded Movie Clips To Work With Button Functions?

Jul 16, 2009

im using this function to load my movies

[Code]...

i then place them into a grid (i load them into a created movie clip called thumbnail) and they are supposed to trace their name (or anything) when rolled over, but i cant put a working rollover on them, nothing happens with perfectly fine code. how to get loaded movie clips to work with button functions?

View 6 Replies

Professional :: Seamless Transitions Between Externally Loaded Movie Clips?

Apr 1, 2010

I'm building a flash player that loads various movie clips in succession  depending on user input. The player should continue to play seamlessly  when one clip ends and another starts playing, however there is always a  slight noticeable delay between the COMPLETE event for one clip and the  actual playing of the next clip. I am using the FLVPlayback component to  load the video clips, with successive clips loaded in different players in the component.
 
I've tried playing the next video a short duration before the current video finishes by adding a cue point just before the end of the currently running clip (about 200 - 300 ms before the end). This improves matters somewhat, but it is not a reliable method as the timings are different for different browsers and computer specs. I was wondering if anyone here has any experience with smooth  transitions between external video clips and could suggest possible  optimizations I could use to improve the transitions.

View 2 Replies

ActionScript 2.0 :: Loaded SWF's Buttons Inside Of Movie Clips Don't Work

Feb 9, 2003

I have a movie that loads multiple swf's... Some of these have buttons inside of movie clips, they don't work when the swf is loaded

View 1 Replies

ActionScript 2.0 :: Wanting A Smooth Transition Between Loaded Movie Clips?

Jun 1, 2006

I have approximately five external movies I am loading into one main movie. I load the movies using various buttons in the main movie.

My issue is this...I press a button and the first movie loads and then runs to the end of the timeline. Works great.When a push a second button the second movie loads and runs to the end of the timeline. Works great also.but I hate how there is a blank space between the movies.

All the movies start with a white stage and end with full graphics. When I press a second button, the movie on the stage disappears immediately and I am left with a white stage for a few seconds while the loading movie animates onto the stage.

I want there to be a cross-fade or some effect that allows the loaded movie to remain on the stage while the second movie is loading. Is there a way to make this happen?

I'm including the code I have for loading movies so you can see what I am working with thus far.

Here is the code:

designingbutton.onPress=function(){
loadMovie ("Quest Wall Animation.swf", "_root.content");
}
specifyingbutton.onPress=function(){

[code]....

View 2 Replies







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