ActionScript 2.0 :: Swapping The Jpeg Loaded Into A Movie Clip With The One In A Button?

Jul 10, 2005

I have three buttons, which when clicked load an external file into a movie clip called container. The first jpeg (1.jpg) is loaded into the container when the movie loads and the thumbnail buttons have the files t2.jpg, t3.jpg and t4.jpg loaded. When these are clicked they load 2,3 and 4.jpg respectively into the container. The problem is that I can only have 3 buttons but need to display 4 images. So I want the image that is loaded into the container to swap with the one that is in the button. I can't find any code, either on this forum or on the web, that retrieves the name of a file that is loaded into a movie clip.This is what I need.

Because all the images are named 1,2,3 or 4.jpg and the thumbnails for the buttons are t1,t2,t3 or t4.jpg I should be able to easily write the additional code to change what happens when the button is clicked, because when the picture on the button has changed to what was loaded into the container, the on(Release) code will need to change too.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Swapping Button With Movie Clip On Click?

Sep 5, 2008

I'm currently working on a treasure hunting flash game where the player clicks on a part of the screen and their shovel (cursor) digs a hole on that area. We're using a grid to determine what areas of the screen are clickable, so I created this by making a grid of buttons. However, I'm only vaguely experienced with AS2, and have never touched AS3 until now.

Basically, I need it so when the user clicks one of the buttons (each is named in a separate instance, a1, a2, b7 and so on) it swaps out and is replaced with a graphic of a hole I created as a movie clip.

View 1 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 3.0 :: Using Core Library To Do Export A A Movie Clip Into A Jpeg?

Nov 24, 2009

I'm using as3 core library to do export a a movie clip into a jpeg. I can export the movie clip just fine, but I do come when I add a mask to the movieclip. When the jpeg is exported only the mask is visible. Heres how some of the code looks:

ActionScript Code:
//This is the movie clip created and imported to the Library then called again in AS3
var drawArea:DrawArea = new DrawArea();

[code].....

View 1 Replies

ActionScript 2.0 :: Create A Button That Talks To The Movie Clip Allowing The Pictures Being Loaded?

Apr 25, 2003

I have created a gallery that loads pictures from the server into a movie clip within Flash MX. This works fine. Now I have been asked to take those pictures that load dynamically and allow them to be a static image so that they can be clicked on enabling the user to view them at an enlarged state.Can I create a button that talks to the movie clip allowing the pictures being loaded to pull a pop up window enlarging it?

View 3 Replies

ActionScript 2.0 :: Loading A Movie Clip From A Loaded Movie Clip

Feb 18, 2009

I've been trying to load a movie clip from a movie clip that has been loaded. I am trying to provide a simple means to change the look / feel of the flash application by placing the graphics and controls into a second swf. Each different screen is represented by a different movie clip that is in the second swf. So I've got app.swf loading ui.swf. I want to load screen1_mc from ui.swf.

The app.swf is loaded by a master swf. There may be multiple copies of the app.swf that can be loaded by the master.swf and each app.swf could be configured differently. For each "unique" app.swf it is stored under a unique folder that is not known to me in advance. Since I don't know the unique folder in advance, I can't use import / export for runtime sharing. Is there any way to load the movie clips from the loaded movie clip? (Basically, I want to treat the ui.swf as an extension to the library.)

View 0 Replies

ActionScript 2.0 :: Loading Movie Clip Into Loaded Movie Clip?

Mar 16, 2005

I'm working on a flash site and I'm having some trouble with the programming for it. I'm not so great at action script, so I'm hoping that my troubles are caused by my own stupidity and that some cool smart person will have an answer for me.
So, I have a main menu flash file that functions like the one in this tutorial:
http://www.kirupa.com/developer/mx/p...transition.htm I set it to load various swf files and it's works just fine. What I want to do is have it load a swf that functions exactly the same (buttons that load external clips with transitions) as the main swf- this is a sub page menu. So, in theory, the sub menu page should load the final content, and three swfs would be seen stacked ontop of each other.

I changed the instance names in the sub menu file to be different than that in the main menu file. This fixed the original problem of it loading the content clip into the clip that the sub menu should stay in. Now, It loads the sub menu just fine, but then it gets stuck and never loads the content. The sub menu buttons will not function at all. Independent of the main menu, the sub menu file works perfectly What can I do??? Does it have anything to do with the "_root"? I never understood the concept, so I'm having trouble with it.

View 5 Replies

ActionScript 2.0 :: On Button Release Clear Current Movie Clip And Bring In New Movie Clip

Feb 21, 2010

I have created a flash website, each button is a movie clip with an invisible button over it containing the following script

on (rollOver) {
_root.mouse_over_profile_btn = true;
}
on (rollOut) {

[Code]....

each page is also a movie clip and on release of a button its played. the problem is that when i press another button to play another movie clip 'page' the old content is still there.

Is there a way of reversing the page transition i have used to bring out the movie clip and then bring in the next movie clip.

View 0 Replies

ActionScript 2.0 :: Targetting A Movie Clip - Loaded Into A Container Clip From Main Timeline

Nov 24, 2005

I am targeting a a movie clip. The problem is that all the syntax I have found for targetting clips looks like this: _root.sample_mc.sample2.mc. etc. The problem is, my target clip is in an swf that I've loaded into a container clip from my main timeline. So, essentially, I have a home.swf that loads menu.swf into a container called 'location'. In menu.swf, I have an MC called center, which contains the MC I am targetting called 'target'.

View 2 Replies

ActionScript 2.0 :: Unload Clip With A Button In The Loaded Clip

Jan 1, 2008

So I want to Unload a clip with a button placed in the loaded clip.

First I have this code for my preloader and movieclip loader:

var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mclL.onLoadProgress = function(target,loaded,total) {

[Code].....

View 1 Replies

ActionScript 2.0 :: Making A Button In A Movie Clip Goto Another Movie Clip (pic)

May 30, 2007

What action script would i need to make a button in one movie clip goto and play a frame in another movie clip? Im not very good at flash but i've been trying my usual codes but it dont work..

View 2 Replies

ActionScript 2.0 :: Movie Clip Button Inside Movie Clip Won't Work

May 27, 2008

ive got a slider menu which opens when clicked. however the buttons (also mc instanced) inside the slider mc wont work... here is the code:

[Code]....

the slider mc works however i cant seem to get the 'web_MC' to respond..

View 3 Replies

ActionScript 3.0 :: Swapping Xml Loaded Images To Scene Elements?

Feb 15, 2011

I have a small quick question about xml loaded images. Can you append/attach/swap the images to elements in your scene?
 
I would like to manually animate a movieclip using keyframes and motion tweens. For example, to have a movieclip FLY! accross the screen! lol But I want the image on it to be of one that has been dynamically loaded.
 
I can't seem to work out how to replace an image on a movieclip from a dynamically loaded image. Is it even possible?

View 1 Replies

ActionScript 2.0 :: Depth Swapping Of Externally Loaded Movies

Jan 21, 2004

Is it possible to swap the depths of externally loaded movies? if so, what is the best way to do it?

View 1 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

Controlling A Movie Clip With A Button Inside The Movie Clip?

Mar 9, 2009

I'm just trying to find the right action scrip for instance on my button to control the movie clip it is within.I have currently tried..

on (press) {
mc_lexisnexis_main.gotoAndPlay(2);
}

[code].....

View 4 Replies

ActionScript 3.0 :: Tween Movie Clip Via Button Outside Same Movie Clip?

Apr 8, 2010

I am trying to move a movie clip containing content via AS3 tween with a button outside of the movie clip. I have achieved this effect on another project by using the following code:

Actionscript Code:
var myxTween:Tween=new Tween(content_mc,"x",Regular.easeOut,content_mc.x,theXPosition,.8,true);

I set up a moveContent funtion using that tween, then used:

Actionscript Code:
content_mc.aboutBtn.addEventListener(MouseEvent.CLICK, aboutClick);function aboutClick(e:MouseEvent):void { trace("aboutClick");current_btn=e.currentTarget.name; moveContent(588,-538,"about.swf");}

to move the content. I am just wondering how to achieve the same effect but use a button on a separate layer that will be static.

View 2 Replies

Professional :: Movie Clip Button Not Working Within An Movie Clip

Jun 30, 2010

I'm trying to create a movie clip on my my main timeline that has a movie clip button within it that pops up a box in the middle of the site that contains text and links. On Frame 1 I have the Up state, frame 2 the roll over state, and frame 3 my Down State (where Box appears).

[Code]...

The problem is that on the main time line, the button is clickable but doesnt do anything

View 7 Replies

ActionScript 1/2 :: Targeting Movie Clip Button Within A Movie Clip?

Feb 26, 2011

I am trying to target a movie clip within a movie clip.
  
I have a movie clip on the main stage with an instance name of a
  
I have the following action script on it
 
on (release) {_root.a.gotoAndStop(2);
}

So on frame 2 of a I have a button (instance name b) which also has two frames and a stop action on frame 1. All I want to do is click on the button and make it go to frame 2. It should work but it isn't Here is the actionscript on the button (b) on (press) {_root.a.b.gotoAndPlay(2); }

View 2 Replies

ActionScript 3.0 :: Put A Button On A Movie Clip That Is Inside A Movie Clip?

Sep 28, 2010

I want to put a button on a movie clip that is inside a movie clip. The button needs to access a "label" on the parent movie clip.

View 5 Replies

ActionScript 2.0 :: Movie Clip Button Inside Movie Clip?

Nov 20, 2011

how can i get a MC button that is inside another MC to carry out its functions

the mc button is using TweenMax for its roll-ON roll-Off effect and that works as normal when i test main movie

but the button itself dont function when pressed still mouse roll-On roll-Off effect works but not the movie clip button it this to do with it been nested inside another mc or is it the code am using below

web.onRelease = function(){
gotoAndStop,(49);
}

web is just the name of the nested movie clip button i was saying

View 1 Replies

ActionScript 2.0 :: Assigning A Level For The External Movie(reseller_locations.swf) Loaded To A Movie Clip(clipHolder)?

Jul 25, 2006

assigning a level for the external movie(reseller_locations.swf) loaded to a moivie clip(clipHolder)

code

loadMovie("reseller_locations.swf", this._parent.clipHolder);

View 1 Replies

ActionScript 3.0 :: Swapping Depth Of Movie Inside Of Movie?

Jan 18, 2010

I have a movie "keyB" which contains many other movies "d", "e", "f"..."keyB" has a mouse event listener so when I click on "keyB" it tells me which movie inside of "keyB" I have just clicked on - d, e or f.d, e and f are the same movie from the library but with different names and are all on the same frame in the timeline.d, e and f are overlapping and I want whichever one was clicked on to come to the front.Here's what I've tried without any success:

ActionScript Code:
keyB.addEventListener(MouseEvent.CLICK, tellKey);
function tellKey(event:Event):void

[code].....

View 6 Replies

IDE :: Swapping Movie Clips?

Nov 16, 2009

I am currently working on a project of a commercial flash box thing for their website.I have a thing where I need a bunch of images to wipe in this certain way. They are in mc's, and just sitting there, while I have squares moving on top of them doing the wiping. I need to know how to swap these image mc's out when it hits a certain frame e.g. frame 70.

View 1 Replies

Randomly Swapping Movie Clips

Feb 2, 2010

I'm trying to figure out how to have a movie clip randomly replaced every time the page is refreshed. I have 4 clips that I want to have appear in the overall movie, but swapped in and out randomly. Also, I want these clips to play once, then stop, but continue to show the last frame of the clip for the remainder of the time that the main movie is playing. I must be placing the stop() in the wrong place or something. I tried placing one inside the original movie clip before I published it, it works on it's own, but not when I place it in the timeline of the other movie. No matter where I put that stop command, it doesn't seem to work.

View 1 Replies

ActionScript 3.0 :: Swapping Button With An Animated Graphic?

Apr 27, 2009

What I'm trying to is make a button that when you click it, it swaps the button out for an animated graphic. So that the button looks like it turns into something else. For instance, I have a house on a hill and when you click it, a person should come out of it. And another instance, there is a bottle and when you click it, it sprouts legs.

Is there a way to do this without swapping the whole scene? I have other animations that are constantly playing so if I were to do that, it would mess up the other animations.

Here is the code I have from some tutorial.

import flash.events.MouseEvent;
houseBtn.addEventListener(MouseEvent.CLICK, houseClick);
function houseClick(event:MouseEvent):void{
}

View 1 Replies

Put A Preloader For Loaded Swf In Movie Clip?

Oct 20, 2010

I am trying to use a preloader for a larger .swf file that loads inside of a movie clip. I was wondering what code might work and where to put it. (preloader is a .swf).  I am using CS4, ActionScript 1.0.

View 6 Replies

ActionScript 3.0 :: How To RotationY A Loaded Jpeg

May 17, 2011

I am trying to apply rotationY/X/Z to an externally loaded image. The problem is that when I rotate the image in '3D', it does not appear. When I apply normal rotation, the image does appear. I have verified that the jpg is loaded, just does not display after rotationY/X/Z. The code below are snippets of my attempts.

PHP Code:
//LOAD IMAGE
public function load_img():void

[code].....

View 1 Replies

ActionScript 1/2 :: Referencing _root.Button  From A Movie Loaded Inside Another Movie?

Oct 18, 2009

MainMove.swf is doing a loadmovie of SecondMovie.swfThe Button that loads SecondMovie.swf also disables other buttons in MainMovie.swfon (release) {  _root.intro_btn.enabled = flase;  loadMovieNum("SecondMovie.swf", 2);How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???

View 4 Replies

ActionScript 3.0 :: Accessing A Movie Clip In A Loaded Swf

Oct 22, 2009

I am loading a swf file(As2.0) into my As3.0 application. The loading rocess works fine. I want to know how i can acces a button in the loaded swf through my as3.0 program. For example: i have a movie clip in my loaded swf called submit. In my as3 program i want to be able to wrie functionality foe the submit button.
 
this is my AS3.0 code
  
//------------Load swf into the application-------------//var mLoader:Loader = new Loader();var mRequest:URLRequest = new URLRequest("test.swf");mLoader.load(mRequest);gameLoader.addChild(mLoader);
   
In test .swf i have a movie clip called pressBtn. I want to be able to access this movieclip in my AS3.0 code. gameLoader is a movieclip on the stge of my as3.0 fla.

View 2 Replies







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