ActionScript 2.0 :: MovieClips - Implementing Interactive Photomontage Section
May 21, 2007
I have a minor problem implementing an interactive photomontage section to my site. By that I mean lots of images which can be dragged about by the user to create one larger whole image. Like this (but much simpler, only 12 or so images on the stage): [URL]. So I'm putting the images inside a movieclip as I can use the startDrag and stopDrag actionscript commands so the user can drag the images around.
Here's the code I'm using on each movieclip image:
on (press) {
startDrag(this);
} on (release) {
stopDrag();
}
The problem I have is that I have two photomontages (2 set of images). The user clicks on a thumbnail in the lower right corner to select which one. Each button fades in the appropriate images, and fades out the other set - this is fine. The problem is that obviously the set of images on the highest layer (the Abbey set) are still on the stage but are just faded out (by movieclip tween alpha), so they conflict with the Statue set. Ie. when you try and click and drag an image in the Statue set, you can't get hold of them as you are really dragging the invisible Abbey set around still. I've attached a FLA file which demonstrates this problem. Click on 'BTN1' or 'BTN2' to change the set of images. The Abbey one works fine, but when trying to drag the statue one, the Abbey one if hidden on top will cause problems.
Here's what the section looks like in my project (thumbnails to select which):
Abbey images:
Statue images:
I've tried wrapping the startDrag commands inside an if statement that held a true or false, then put true or false in the appropriate places inside each image movieclip to represent when it is visible or not. I thought this would work, but it doesn't. I also tried putting the set of images at slightly different points in the main timeline, so they were never on top of each other, and then jumping to that point in the timeline when selecting the thumbnails. This kind of worked, but weirdly I had to click twice on the Statue set for them to show (fade in).
View 4 Replies
Similar Posts:
May 1, 2006
I came to realize that in order to get some of the effects to happen I'd need a way to know all of the current MovieClips being used in a given section of the web site. I figure the best way to do this is to create a Class for it and let it handle registering the clips. The functionality is pretty basic with the Class able to register a MovieClip and return all the MovieClips being used up until a given point in time or access a single MovieClip.
Unfortunately I don't really know how to implement this idea. I've pulled it off using index numbers but that wasn't for MovieClips. For this I'd like to be able to access any MovieClip that has been registered already by a name, like a String maybe.
View 7 Replies
Jan 14, 2009
I have four movie clips on stage, I change those to buttons with onRelease script. Each movie clips have 2 frames ON and OFF when I click one of them, active other movie clip normally but my buttons don't work well. I want when I click one of them this button go to frame 2 and stop and other buttons go to frame 1 and stop.
View 3 Replies
Mar 9, 2009
I have a button that I would like to use with the basic actionscript as follows:
on (release) {
this.gotoAndPlay("15");
}
What I would like it to do is play a section on the timeline and then move onto another section or scene.
[Code]....
I know this is incorrect, so would anyone know how to write an actionscript button that plays a section then goes somewhere else?
View 4 Replies
Mar 3, 2010
I am currently working on a map of the US that is interactive. My goal is to be able to mouse over the states and have them turn red and then a window with contact information will open at your mouse when clicked. I am running into a few problems. I dont know the process for creating a color tween for my movieclips. my solution was to make a copy of the states, color them red and place them behind the gray ones and attatch an event listener to all the states that lowers their alpha when moused over. thats not really the problem though. for my code that i have used to call in the window is as follows. I will use texas as an example.
[Code]...
View 5 Replies
Dec 17, 2003
on [URL] what is the word 'section' in _root.section? I assume it is a movie clip instance, but can't seem to find it on the timeline.
View 2 Replies
Mar 13, 2010
i'm Currently creating an interactive video game. There are 66 movies. I'm new to AS3, and have little experience in AS2.
The game in short:
You choose from 5 ingredients, each has this product provides a number of calories:Rice R = <- for all standard!
[code].....
View 6 Replies
Mar 13, 2010
I'm Currently creating an interactive video game. There are 66 movies. I'm new to AS3 and have a little experience with AS2. I will try to explain the game! You choose from 5 ingredients, each has this product provides a number of calories:
Rice R = <- standard value!
Mais =-C
Roots =-W
Tofu =-T
Onions =-U
Champions =-M
Each ingredient can be added only 1 once.
Good combinations:
R-U-T-CR-U-C-TR-T-U-CR-T-U-CR-C-U-TR-C-T-U
Each movie is in a movie clip. And the frame where the movieclip is on, is labeled with the combination. For this I wrote the following script:
ActionScript 3 Code:
stop ();
var caloriesVar: Number = 10, / / default Rice
var inpanVar: String = "R", / / R = Rice
iLabel.info_txt.text = (caloriesVar);
iLabel.info_txt2.text = (inpanVar) / / idem
[Code] .....
But this does not work. When you click a button, the script doesn't do anything. Do not know where it goes wrong because he does not update the text fields.
View 2 Replies
Apr 24, 2010
I'm trying to work out how to use states in my Flex app.I've created two states, State1 and Stage 2. Both are based off the base state. I've created a few visual elements for State1, and given each of them includeIn="State1".But when I'm in design mode and click on State2, these elements are still visible?If I try to delete them while State2 is selected, all that happens is RemoveChild is added to the State2 tag.
View 1 Replies
Jun 3, 2011
I haven't used the implements keyword before, and I've been trying to use it to implement the IEventDispatcher class to see if this would allow me to use addEventListener() in a class that extends Object (this is my understanding of what it's for - correct me if I'm wrong).My class is like this:
package
{
import flash.events.Event;
[code].....
View 2 Replies
Aug 29, 2011
Within C# there're these things called indexers that do something similar to this:
public Something
{
public Object this[String s]
[code].....
View 1 Replies
Jun 11, 2004
implementing and editing XML within Actionscript worked out swell - no problems so far..but the some_xml.send() seems to become a true nightmare!
Soit, here's an example:
I made a little "keep-in-touch" maillinglist, where visitors can leave their adress, click the "send" button - and let the administrator view the list on a secure page. XML suits fine for this job, i think.
Code:
on (press, keyPress "<Enter>") {
mailInput_xml = new XML();
mailInput_xml.ignoreWhite = true;[code]....
View 2 Replies
Sep 28, 2010
I have a custom form that I want to implement and I am having a problem figuring out how to do so. I want to have it work like an inner popup where it blurs and unblurs the background imageHere's my setup:FLA file contains-UILoader for swf sectionUILoader for random background imageLets say I load a section called home.swf into the section loader. Within the home.swf I have a button for someone to call up the form.swf. Is it possible for the form to blur the random background image when loaded then unblur it when it's done? I also have no idea how to unload it.
View 1 Replies
Aug 2, 2009
I am trying to implement a preloader for loading an swf. I have an swf named 001.swf. I need to create a preloader for loading this swf. So should i create one more swf for loding the 001.swf.
View 7 Replies
Mar 3, 2010
I'm pretty new to Flash, and having a few problems with a website I've had to design for my college ICT course.I built the site entirely in Flash, which went perfectly, then went on to build a scrolling image gallery banner for use on a gallery page of the site (assuming that it would be an easy task to chop the banner into the website).When I've tried importing the file to the stage/library it leaves all the images behind (as they are in the library of the first file) as well as the actionscript required to call the images; leaving me with just a new, blank layer.I've also tried copying the actionscript code into the website document and transferring the images from the gallery library to the website library, however, the gallery is written so that the stage is used in its entirety to show only a certain amount of images, meaning that the proportions of the banner are all wrong on the website file.Is there any way to integrate the flash file for the gallery into a confined area of the stage in the website document, or am I going to have to alter my designs so that the gallery goes entirely across the page (put up and shut up style).
Attatched are download links to the two files in question, sorry if they're a little on the large side.
[Code]...
View 4 Replies
Jun 15, 2010
I cannot believe that implementing a simple class should be so hard. I am trying out the simple example outlined on the Adobe website: url...I copied the class code from here to file Greeter.as in subdirectory Learning. Then I created a dynamic Text field on the stage.
View 3 Replies
Feb 15, 2011
I am looking for a walkthrough for implementing a call for a webservice from an swf file, I cant find any..
View 1 Replies
Jan 15, 2010
Has anyone implemented a Set class in ActionScript? Specifically, a Set which is similar to Python's set implementation (unordered, unique, O(1) membership, etc). I'd like to be able to iterate over it using for each, perform operations like union and intersection and get a list of all the contained items... Which would all be possible to implement using Dictionary and Proxy, but I'd rather not reimplement it if someone's already done the heavy lifting.
View 2 Replies
Feb 21, 2010
I'm developing a flash registration form and I need to incorporate dynamic 'captcha' images for confirmation.
View 6 Replies
Sep 22, 2010
Ours is a Flex/Parsley/Blazeds/Spring project & I'm trying to implement java Enums in Actionscript3 and all I have to do is to send the Enum value to Spring service method.
The Java Enum Code (this is generated from XSD)
public enum ReferenceLookupType {
PATIENT_VISIT_TYPE("PATIENT_VISIT_TYPE"), PATIENT_STATUS("PATIENT_STATUS"),
PATIENT_VISIT_INVALID_REASON("PATIENT_VISIT_INVALID_REASON"),
LIPID_PREFILLED_CODE("LIPID_PREFILLED_CODE");
private final String value;
[Code] .....
How to implement Enums in Actionscript the right way.
View 1 Replies
Aug 19, 2011
I am looking to implement an address navigation bar in Flash that will be made into a SWF. Basically the user will be able to interact with the address bar just as it is in the top of the browser (enter URL, change url, enter javascript, ect).
View 2 Replies
Aug 26, 2011
I have a timer I need to implement when a "question" movieclip object is added to the screen, but even though the code is all right and definitely works it's not running when the movieclip is actually opened in the swf.
ActionScript Code:
question.addEventListener(TimerEvent.TIMER, timerFunction);
function timerFunction(event:TimerEvent):void
{
[Code].....
View 2 Replies
Feb 3, 2005
I'm trying to write a prototype function that will use setInterval. The following script defines a simple movieclip prototype that traces the clip's x position when called. The function works fine when called explicitly ( _root.foo.trace_x(); ), but does not when called by a loop.There are three clips on the stage, their instance names are foo, man, and chu. I created an array so I could loop through and have each one run the trace_x function once.Here's the code:
Code:
clips = Array('foo', 'man', 'chu');
num_clips = clips.length;[code]....
but instead, the output is "undefined" over and over and over.An example .fla can be found at http:[url]....
View 1 Replies
Nov 19, 2007
why I didn't put it into games category. I've got a game, it's mostly OOP. I've only one frame with "include" statement and the rest is in classes. Now I'd like to do a menu.Can I somehow separate the code of buttons inside menu? I add new frame with a menu MC inside and the "stop()" code. The "start game" button has got this code inside:
Code:
on(release)
{
_root.gotoAndPlay("2");
}
In frame 2 there's a playable part of my game. It works but... Can I move this code somewhere else so I can manage all buttons in one place? I tried:
Code:
_root.menu.start_button.on(release)
But it's not working (as if it should...).
View 7 Replies
Mar 30, 2009
is there any easy way to implement this using Flash ?[URL]
View 4 Replies
Jun 6, 2009
i, am building an portfolio site and i have come a long way (still a beginner) but now i found an problem. After i load xml file for paths to portfolio assets i load actual jpg's and/or swf's. But i am stuck since i do not understand how to implement padding so thumbs will be spaced evenly.[code]but than how to position first thumb?
View 3 Replies
Oct 29, 2010
I have heard that Web Service class is not available in AS3.implementing a WebService in AS3 with authentication.
View 2 Replies
May 15, 2009
I am working on an augmented reality project and I cannot use FLARToolkit because the marker I tracking is a company logo, The logo is a black T-shape with white writing inside and I cannot use any part of it to create a marker that FLARToolkit will recognise. I decided to implement my own tracking / bitmap recognition which follows the following process...
1) Convert to B&W
2) Color all possible regions in different colors
3) Find the best candidate from the colored regions
Here is the tracking code so far: [URL]. It works but it is suffering form a few problems; It's slow, sometimes a dark area is mistaken for the logo, it isn't aware of orientation, it is affected by different lighting conditions.
View 6 Replies
Jan 19, 2010
i want to implement a simple list containing 6 items in action script 3.0. The screen shall show 4 items at a time and it has to get the key presses just to move UP?DOWN in the list.
View 1 Replies
Jun 1, 2011
I'm trying to implement a dynamic starfield into the game blaster mines (chapter 11) from the book "The Essential Guide To Flash Games" (from Jeff and Steve Fulton) but had no success yet. I built a separate starManager.as class and a BasicBlitArrayStar.as class for it. Also I'm using a pool for inactive and active stars (basically I think it's the same method when building the projectiles or rather particles except that the stars move only when the mouse moves (using the same direction).
If u don't know what I mean check out the parallax starfield from [URL]:
freeactionscript.com/2010/06/endless-starfield-parallax-scrolling
Currently it's not working. The inactive pool is full of stars but when I try to draw them on the background I can see absolutely no star. Even when there is an active star available it doesn't draw it on the background. The goal is a starfield that uses similar techniques from the framework like particles and projectiles do. I have some things in mind like getting the child index for creating different star layers but currently I'm not able to realize it properly.
Here are some code excerpts:
starManager.as:
package {
import flash.display.BitmapData;
import com.framework_mod.src.BlitArrayAsset;
import com.framework_mod.src.BasicBlitArrayStar;
[Code] .....
View 1 Replies