Making Interactive Movieclips Where User Controls Positioning And Movement
Hi,
http://www.gameplanner.co.uk/flash/Plan_CreationFL.html
I want to create something which adopts the same capabilities as the software above, for my animation. I.E. The user can drag a movieclip on to the stage, as many times as they want, creating numerious instances of it, and then control where it will move to etc.
Any idea as to what sort of area in Flash I need to be looking at to have a go at this. At present, I'm thinking that it can be done through movieclips because they have the appropriate class properties/methods?
Your replies will be highly appreciated
Thanks
Sukhraj
FlashKit > Flash Help > Flash Newbies
Posted on: 03-11-2007, 06:45 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Interactive Image Pan Positioning
Hi. I'm quite new in ActionScript (but I know the basics). Well anyway, I have a small problem. I'm doing this fake panorama to my site and I've used this Interactive Image Panning code I found here at kirupa.com. Now I have added some buttons into it and by pressing those I would like the image to move to a specific position (with ease if it's possible) and stop. And by pressing another button the panning starts again. Is it possible to add to this code?
(I have made some little modifications to the code. There is a mask area where the panning works and if your mouse is outside the area the panning doesn't work)
I would really appreciate for your help!!
Thanks.
Mikko
User Controls
Thank you Kirupa for the code to embed a flash movie in html at
http://www.kirupa.com/developer/flash5/html.asp
It works well. I would, however, like my users to have control to start the movie when they want. At the moment it starts when it loads up. I'd like to have a button for users to click to start the movie.
How can I do this?
Also the sound plays in IE but not in Netscape 6.2. I cannot figure out why.
Thank you
DG
Giving Controls To A User
We're just about to quote for a job...and was wondering if Flash has the capabilites to allow a user to change the dimensions of an object.
Lets assume its a toy box...can we give three input boxes where the user can enter their choosen length, depth and height of the toy box and flash redraws this?
I could code this in JavaScript and DHTML, but I think Flash would be better.
Finally if it can be done...could it cope with a taper, so the base rectangle of the toy box is slightly smaller than the lid rectangle of the box, creating a taper?
Framerate User Controls
Hello there! Here is the issue : I have to make a flash movie that would allow the user to control the framerate of the movie.
Unfortunately I'm not that good with flash and I don't know how that could be done ..I thought about something like"on(press){
movieclip.increaseframerate(*2);
}" .Could anybody give me a hint as to what actionscript command I should use or if you guys know any tutorials on the web that explain this, I would be extremely gratefull
Thank you!
Movement Controls
I Want To Make A Character Move Up, Down, Left & Right By Using The Arrow Keys. When Moving, I Want The Character Do A Animation (walking) When You Stop, It Stops Moving. Also I Want To Make When A The Character Touches A Wall It Stop And Doesn't Go Through... I Tried All This But It Didn't Work And Someone Help Me?!
Movement Controls?
im making a game and i want to know how do you make a symbol that moves by using the ARROW keys and also how to make a wall so they don't go through.
Movement Controls
I Want To Make A Character Move Up, Down, Left & Right By Using The Arrow Keys. When Moving, I Want The Character Do A Animation (walking) When You Stop, It Stops Moving. Also I Want To Make When A The Character Touches A Wall It Stop And Doesn't Go Through... I Tried All This But It Didn't Work And Someone Help Me?!
[F8] Game - User Defined Controls
I wanted to add user defined keyboard commands for my flash game, I was wondering if there was any tutorial out there on this subject. So far I have not figured out how to do it on my own. So im up for some learning.
Thanks homies!
Creating Keyboard Controls For User
Any helpers,
I have wriiten an interactive crossword application. Each box for the user to enter letters has been created using a textbox objects. Each textbox has been given a vairable name. The application runs fine at current, however the user has to click each text box using the mouse before typing the text.
It would be nice if the user could use the arrow keys to navigate around the crossword for better usability.
Im aware there is a key command just like the mouse commands, however how can i apply this to the application.
Help would be most appreciated
Regards
L. Tambiah
Fl.controls.List: Bug Or User Error?
Create a new AS 3.0 fla
Add a List component to the stage - name it "theList"
In the parameters panel, add 4 (or more) items.
Paste the code below in the actions panel:
Code:
import fl.controls.List;
import flash.events.Event;
import fl.accessibility.ListAccImpl;
ListAccImpl.enableAccessibility();
// I expected this line
theList.selectedItem = theList.getItemAt(2);
// or this line, to set the internal index to 2
theList.selectedIndex = 2;
theList.setFocus();
theList.addEventListener(Event.CHANGE, onListChange);
function onListChange(e:Event)
{
trace("You have clicked: " + theList.selectedItem.label + " in row " + theList.selectedIndex);
}
stop();
Run it.
The 3rd item (index 2) appears selected in the UI - all seems well.
Press the down arrow to go to the 4th item in the list. Oops, what happened?
Expect:
4th item (index 3) is selected.
Actual:
1st item (index 0) is selected.
Internally, it seems, the object thinks it's index is still -1 when the Keyboard event arrives.
So, how do you make sure that not only the UI looks correct, but internally, the component remembers it's selected index?
thanks,
Mark
Knob That Controls Movement?
anyone know of any tutorials where you would have a knob, that when turned, would move a clip around the stage? kind of like on older stereos... you turn the knob and the line moves across the dial? anyone know of anything like that? am i making any sense?
Combining Multiple SWF Into One Movie With User Controls
I'm trying to get some direction on creating a single movie with Play, stop, fastforward and rewind.
What we currently have are mutiple swf files that we use with a third party for tutorials. We want to move these from the 3rd party into our own library. The issue is that the 3rd party required 30fps and our tutorials have exceeded the 16k frame limit, thus making us split the movie into multiple files.
So, what we want is the ability to have multiple swf files play from beginning to end with simple Play, Stop, FF, RW that controls the combined files. Seems simple, but I'm struggleing.
Any help would be appreciated.
Interactive User-poll
I want to create an interavtive poll for users with about 3 choices, and when they click on one of the three, it displays the results.
Has anyone done one of these that can offer some help with the script or give me an example to mess with?
Interactive Theory: The User's Mic
I overheard some watercooler talk the other day and the subject was using the mic as a means to control the interactivity of a flash site.
Example:
Every sound that the user's mic "hears" results in an event much like clicking on a button to reveal a dropdown menu.
Or: The more you scream, the more popups appear on the site. haha. How cruel.
This is very advanced in nature and I can't even begin to comprehend the scripting necessary to accomplish such a task.
Anyone heard or read of anything of the nature?
Point me in the right or wrong direction. I'll sleep on it until you do.
Easing Movement, Arrow Controls
i have a ball i want to move around so i used the following AS to move it:
ActionScript Code:
onClipEvent(load) { setProperty(this, _x, 375); setProperty(this, _y, 375); moveSpeed = 10; }onClipEvent(enterFrame) { if(Key.isDown(key.RIGHT) and this._x < 375) { this._x += moveSpeed; } if(key.isDown(key.LEFT) and this._x > 25) { this._x -= moveSpeed; } if(key.isDown(key.UP) and this._y > 25) { this._y -= moveSpeed; } if(key.isDown(key.DOWN) and this._y < 375) { this._y += moveSpeed; }}
i wanted to add an easing motion, as if it was in water, or something like that so i read a tutorial on easing on this sight and tried..
ActionScript Code:
onClipEvent(load) { setProperty(this, _x, 375); setProperty(this, _y, 375); moveSpeed = 10; }onClipEvent(enterFrame) { if(Key.isDown(key.RIGHT) and this._x < 375) { this._x += moveSpeed; _x += (endX-_x)/Movespeed; } if(key.isDown(key.LEFT) and this._x > 25) { this._x -= moveSpeed; } if(key.isDown(key.UP) and this._y > 25) { this._y -= moveSpeed; } if(key.isDown(key.DOWN) and this._y < 375) { this._y += moveSpeed; }}
as you can see i only tried it on the right movement, although i wanted it on all movements, but it didn't really work..
any help/ pointers in the right direction would be appriciated,
thanks
Easing Movement, Arrow Controls
i have a ball i want to move around so i used the following AS to move it:
ActionScript Code:
onClipEvent(load) { setProperty(this, _x, 375); setProperty(this, _y, 375); moveSpeed = 10; }onClipEvent(enterFrame) { if(Key.isDown(key.RIGHT) and this._x < 375) { this._x += moveSpeed; } if(key.isDown(key.LEFT) and this._x > 25) { this._x -= moveSpeed; } if(key.isDown(key.UP) and this._y > 25) { this._y -= moveSpeed; } if(key.isDown(key.DOWN) and this._y < 375) { this._y += moveSpeed; }}
i wanted to add an easing motion, as if it was in water, or something like that so i read a tutorial on easing on this sight and tried..
ActionScript Code:
onClipEvent(load) { setProperty(this, _x, 375); setProperty(this, _y, 375); moveSpeed = 10; }onClipEvent(enterFrame) { if(Key.isDown(key.RIGHT) and this._x < 375) { this._x += moveSpeed; _x += (endX-_x)/Movespeed; } if(key.isDown(key.LEFT) and this._x > 25) { this._x -= moveSpeed; } if(key.isDown(key.UP) and this._y > 25) { this._y -= moveSpeed; } if(key.isDown(key.DOWN) and this._y < 375) { this._y += moveSpeed; }}
as you can see i only tried it on the right movement, although i wanted it on all movements, but it didn't really work..
any help/ pointers in the right direction would be appriciated,
thanks
User Controls Button To Return To Previous Scene
I am needing a tutorial that will help me add actionscript to a button on a scene that will allow the user, upon clicking, to be returned to the scene they just left.
Could someone point me to a tutorial or give me some hints on how that can be done?
Thank you.
Popup Movieclips Over Controls...
Movieclips as popups...
Having HUGE problems with a movieclip that pops up over top of the main control area of my interface....the popup of course has all sorts of controls on it as well (a few buttons and such)...but all the controls below are being activated THROUGH the movieclip popup...
Probably a stupid little thing, but am having problems figuring out a way around it short of disabling all the controls behind the popup which is far too much of a hack job...
Is there a clever way? Director has a stopEventPass or something like that...
Any help MUCH appreciated
cheers
smorrow
Positioning Of Movieclips
I am attempting to create a timeline (simply a straight line with circles--which are movieclips--to denote a point on the timeline) at the top of a html page. An entry on the webpage results to a circle on the timeline being created. This is working okay for me.
Ok, here is the problem. I would like the circles to move dynamically based on the time when they are added to the html page. For example, for older entries on the html page, I would like that entries circle to move further down the timeline, while the cirlces that correspond to newer entries are higher up on the timeline.
To make a long story short, I would like the embedded flash file to quickly show a display of the time in which an entry was posted. As that entry gets older, I would like it's positionn on the timeline to move further down the timeline.
Any suggestions?
If I am not being clear, please let me know!
Interactive Movement Of A Box
Hey you all flash professionals out there.
does anyone know how to move a box interactive
with the cursor motion?
"I am trying to pitch for a small animation project and could use a
simple example.
I could imagine a rectangular box (since it would be for a packaging
design with lid) that I can spin according to my cursor motion."
do you know what I mean?
please help me
klabbelito
About Creating User-interactive, 3D Environments
I'm an experienced web developer (programming, design, and motion design) who has recently found the beautiful Swift 3D v2! With a background in programs such as 3DSMax and console game development, my next natural curiousity is how much user-interactivity is available - using Flash 5 - within a 3D environment (created in Swift 3D for example). Is gamelike interactivity possible similar to a Grand Theft Auto III, MS Flight Simulator or any other modern 3D computer or console game?
ps I'm not really concerned if it's realistic to create (in Flash 5 and Swift 3D) a game with the magnitude of a Playstation II game, I'm just curious if ActionScript allows for the interactivity.
Is it possible?
Mc Positioning After Clicking (controlled Movement)
Hi everyone, let's see if you can help me:
I'm developing a site now, the way I want it to work is a bit like what you can see at the nasa30.com site.
I've got a main menu right, and got like 5 small circles on stage, each containing a target where the contents of the button i click are loaded.
Now, whenever i click a button from the main menu, whatever's on the "main stage" turns into another circle, and then, along with the other 5, move around the stage to a certain position (each one has it's own), all at a time, and then one of the other circles, turns into a rectangle and loads the contents of the selected option.
What i want to know, is, how can i make the circles move when the action is triggered by clicking the right option, this is, for example, i've got an option called "home" right? when i click on it, the info that was on stage disappears and the other five circles move around the stage until a certain position is reached and then one of them comes to "stage" and morphs into a rectangle, and then it loads another movie inside containing the info selected from the menu. In order to assign the "final position" of the circles, I've placed several "position mc's" on stage, I don't know if that'd be the right way to do it, please help me!!!!!!!
Thnx a lot, and visit my website, just for fun:
PAV Design
Inconsistent Positioning Of MovieClips
I need a grid of display objects (50x50 pixel squares) that I use an AS3 script to create as a two-dimensional array. I have already confirmed with the AS3 forum that the code works when the objects displayed are not MovieClips. However, the positioning of MovieClips is always haphazard. There are always seemingly random aberrations in placement, with squares slightly overlapping each other here and there. I have confirmed that the sizing of the MovieClips are uniform.
What's the problem with MovieClip positioning?
Positioning Duplicate Movieclips
I'm having a little conondrum here:
I have a class/object/movieclip called apc_missile. When the missile hits something or runs out of fuel, I want it to explode. The problem is, the explosion is a separate movieclip. How could I "spawn" the explosion at the location the missile runs out of fuel. Assuming that this._x and this._y are the rocket's coordinates.
Can anyone help?
Edit: here is a part of the code (you will find the "if statement" at the very bottom)
Attach Code
onClipEvent(load){
xspeed=10;
yspeed=10;
power=2;
counter=0;
turnpower=7;
fuel=100;
}
onClipEvent(enterframe){
if(this._name!="rocket")
{
angle=this._rotation;
xDist = _xmouse;
yDist = _ymouse;
direct=Math.atan2(yDist,xDist);
direct=(direct*180)/Math.PI;
if(xDist<0 and yDist<0)
{
direct+=360;
}
if(yDist<0)
{
direct+=90;
}
if(direct>91)
{
steer=-turnpower;
}
if(direct<89)
{
steer=turnpower;
}
if(xspeed<=10)
xspeed*=power;
if(yspeed<=10)
yspeed*=power;
this._x += xspeed*Math.cos((this._rotation*Math.PI)/180-Math.PI/2);
this._y += yspeed*Math.sin((this._rotation*Math.PI)/180-Math.PI/2);
explosion._x=this._x;
if(counter>20)
{
this._rotation+=(50*steer)/(xspeed+yspeed);
this.blurX+=100;
this.blurY+=100;
}
else
counter++;
steer=0;
fuel--;
if(fuel<=0)
{
this._alpha=0
explosion.duplicateMovieClip(_root.explosion,'exp'+r,NextHighestLayer());
}
}
}
Edited: 03/08/2008 at 05:03:15 PM by Lucas207
Positioning Movieclips With For Loop
Hello!
I bring a number of movieclips to the stage with a for loop. Now I want to give each one of those movieclips a predetermined x and y value. What I want to achieve is something similar to the image below. So I don't want my movieclips to be in a perfect row, which would be quite easy, and I don't want them to be randomly positioned either. So what would be the solution?
Thanks
Interactive Map Help... With Mouse Movement
http://www.nec.com/ - on the right side..
Any tuts on this that anybody can link me to.
the beginning globe I belive is just a mask with 2 layers sliding..
Any action script help on the interactive part would be cool.
thanks.
Interactive And Lineal Movement
hi people!
straight to the point...
i´m developing an animation where, first part is interactive and you move a character with the mouse, after some events, the animation should start to be lineal, question is, how to make the trasition.
what i have to do is to capture the position of the character in the last moment of the interactive part and pass it to the beginning of the lineal part... but... how to do this?
thanks!,
santiago
Interactive And Lineal Movement
hi people!
straight to the point...
i´m developing an animation where, first part is interactive and you move a character with the mouse, after some events, the animation should start to be lineal, question is, how to make the trasition.
what i have to do is to capture the position of the character in the last moment of the interactive part and pass it to the beginning of the lineal part... but... how to do this?
thanks!,
santiago
Positioning Movieclips In A Grid/table With AS
I need some help with positioning attached movieclips in a grid system. I want to place them in rows of 6, so the 7th attached clip should be placed say 100px below the first row. I can't quite figure out the looping system. Any advice or direction would be awesome. Here's my code so far.
code:
var totalBooks:Number;
var rootNode:XMLNode;
var photoXML:XML = new XML();
photoXML.ignoreWhite = true;
photoXML.onLoad = loadPhotoXML;
photoXML.load("../data/photos.xml");
function loadPhotoXML(_success:Boolean) {
if (_success) {
rootNode = this.firstChild;
totalBooks = rootNode.childNodes.length;
trace("totalBooks is " + totalBooks);
loadBooks();
} else {
trace("Error loading XML");
}
}
// create booksNav_mc to contain all the portfolio thumbnails
// loop through all the main nodes and create a thumb for each
function loadBooks() {
_root.createEmptyMovieClip("booksNav_mc", _root.getNextHighestDepth());
booksNav_mc._alpha = 0;
for (var i:Number = 0; i < totalBooks; i++) {
createBookThumbs(i);
}
}
// assign necessary variables for each thumb
// attach an instance of bookThumb_mc to booksNav_mc and space it accordingly
function createBookThumbs(_i:Number) {
var thumbName:String = "bookThumb_" + _i + "_mc";
var thumbXSpacing:Number = 85 * _i;
var thumbToLoad:String = rootNode.childNodes[_i].attributes.thumb;
booksNav_mc.attachMovie("bookThumb_mc", thumbName, booksNav_mc.getNextHighestDepth());
booksNav_mc[thumbName]._x = thumbXSpacing;
}
Problem Positioning Movieclips On Stage, Please Help
hi,
im trying to give a number of movie clips positions on the stage using an array to name and index them and a for statement position them on the stage according to there index number. i feel i am getting close but just missing something out, the final two lines of code
photolist_x+" = "+intervals_x;
photolist_y+" = "+intervals_y;
when traced give
photo1._x = 0
photo1._y = 0
photo2._x = 110
photo2._y = 80
and so on for the rest of the movieclips, but it is not positioning the clips at these coordinates, how do i get flash to do what these lines read as?
this is the whole code...
//creating empty movie clips
this.createEmptyMovieClip("photo1", this.getNextHighestDepth());
this.createEmptyMovieClip("photo2", this.getNextHighestDepth());
this.createEmptyMovieClip("photo3", this.getNextHighestDepth());
this.createEmptyMovieClip("photo4", this.getNextHighestDepth());
this.createEmptyMovieClip("photo5", this.getNextHighestDepth());
//attaching movieclips
photo1.attachMovie("Test", "mcTest", this.getNextHighestDepth());
photo2.attachMovie("Test", "mcTest", this.getNextHighestDepth());
photo3.attachMovie("Test", "mcTest", this.getNextHighestDepth());
photo4.attachMovie("Test", "mcTest", this.getNextHighestDepth());
photo5.attachMovie("Test", "mcTest", this.getNextHighestDepth());
//array acting as list for movie clips
var photolist:Array = new Array();
//for statement adding names to array,
//i starts at one in this case because ("photo" + i) starts at photo1
for (var i:Number = 1; i<=5; i++) {
photolist.push("photo"+i);
//code for positioning movieclips on stage.
var intervals_x:Number = (i*(Stage.width/5));
var intervals_y:Number = (i*(Stage.height/5));
var photolist_x:String = photolist[i-1]+"._x";
var photolist_y:String = photolist[i-1]+"._y";
//these next two lines give , when traced
//photo1._x = 0
//photo1._y = 0
//photo2._x = 110
//photo2._y = 80
// and so on for the rest of the movieclips, but it is not positioning
// the clips at these coordinates, how do i get flash to do what thes
//lines read as?
photolist_x+" = "+intervals_x;
photolist_y+" = "+intervals_y;
}
thanks for any help,
BrownWarrior
Positioning Movieclips Without Creating An Empty Mc
I'm trying to have a button, when clicked, position another swf file where I want on the screen, without using an empty movieclip, which seems to be the only way I have found in my search of doing this. Flash always positions the loaded swf in the upper left corner of the screen and I want to control the positioning of the loaded swf. Anyone have any alternative suggetions?
thanks
Dynamic Positioning And Repositioning Of Movieclips
hi there
i am trying to write a layout algorhythm in actionscript for a "word" cloud - like http://www.wordle.net see attachment...
am thinking of doing initial layout with hit test ..... not sure if this will successfully 'justify' the movieclips
but then i want to add new movieclips (words) as and when and for them to 'squeeze' into spaces (thus pushing others out)........ a bit like apples bobbing in a bucket....
any ideas... has anyone attempted anything similar......
thanks a million
andy
Prob With Zoom And Movement On A Interactive Map
Hi,
right now im working on a project for a real estate agent selling objects all over the world. so my idea was to integrate a kind of interactive map on the country selection site. one for each country to give the user a impression where exactly the different locations in the choosen country are by rolling over the different names.
here is what i have: http://www.styled.de/flashies/resorts.html
Only the buttons: "Alcadeisa" "Marbella/Estepona" and "Nuevo Portil" work!
the different buttons just set different variables for the x an y coordinates of the map and set the Variable "rollOverZoom" to 1 or 0 to tell the map to zoom or not. as you can see the problem is the dependence of the zoom and the movement. the zoom sometimes is to fast, so that you already see details when the map is still moving. so its hard to follow where the location is. what i want is to achieve that the map centers the choosen location and zooms to it in one dependent movement. so that the location is always visible.
here the code of the map:
// Object Eigenschaften
widthObject = 150;
heightObject = 150;
widhtObjectZoom = 1000;
heightObjectZoom = 1000;
Zoom =50;
// Bewegung ------------------------------------------------
xZustand = getProperty(object, _x);
xDifference = xZustand-_root.spanien.xSoll;
xSpeed = (Math.abs(xDifference))/20;
if (xDifference == 0) {
gotoAndPlay(1);
} else {
if (xDifference>0) {
setProperty(object, _x, xZustand-xSpeed);
} else {
setProperty(object, _x, xZustand+xSpeed);
}
}
yZustand = getProperty(object, _y);
yDifference = yZustand-_root.spanien.ySoll;
ySpeed = (Math.abs(yDifference))/20;
if (yDifference == 0) {
gotoAndPlay(1);
} else {
if (yDifference>0) {
setProperty(object, _y, yZustand-ySpeed);
} else {
setProperty(object, _y, yZustand+ySpeed);
}
}
// Zoom ----------------------------------------------------
// Zustandsabfrage
widthZustand = getProperty(object, _width);
heightZustand = getProperty(object, _height);
// Neuwertsetzung
if (_root.spanien.rollOverZoom == 1) {
if (widthZustand < widhtObjectZoom) {
setProperty(object, _width, widthZustand + Zoom);
}
}
if (_root.spanien.rollOverZoom == 0) {
if (widthZustand > widthObject) {
setProperty(object, _width, widthZustand - Zoom)
}
}
if (_root.spanien.rollOverZoom == 1) {
if (heightZustand < heightObjectZoom) {
setProperty(object, _height, heightZustand + Zoom);
}
}
if (_root.spanien.rollOverZoom == 0) {
if (heightZustand > heightObject) {
setProperty(object, _height, heightZustand - Zoom)
}
}
object is the map graphic
any ideas?
Flash 8 Grid Layout Thumbnail Positioning/movement
I am working on my very first flash application and have found these forums very helpful so I have decided to post here since I'm stuck. I have taken the thumbnail gallery ikim posted on this thread and im trying to tweak it to my needs. When the thumbnails are loaded i would like to implement an onrelease function to tween the image to the middle of the screen, then slide to the right and increase the size. I have written the actionscript that will move the image. However, my problem is, i need to have the thumbnail slide from its original position to the middle of the screen. I thought i could do this by passing the parameters of _x, _y in the function and setting the motion accordingly. Being a newbie to AS, I am having trouble with getting ikim's gallery to accomodate this functionality. I tried using getproperty to get the _x, _y coordinates but this only returns the coordinates for the beginning position of the image and i need the ending position coordinates. I assumed I need to call getproperty at a later time, but I am not sure how to reference the thumbnails since it appears to me that they are being dynamically named and created the same. Any direction you can give me to fix this problem would be greatly appreciated.
Making A Slideshow With Controls
I'm a total Flash newbie so please bear with me. I'm trying to create a slideshow that automatically advances in the main frame and has a strip below with thumbnails. I'd like to make it so that when a thumbnail is clicked, the respective image displays in the main frame so viewers have some control option.
I've got the main slideshow built and funtioning properly. What I can't seem to do is get the thumbnails to control the main frame. Is that something that a certain behavior should be able to control or is it more intensive than that? I'm just starting to learn Flash so pardon my ignorance. Any help would be appreciated.
Thanks!
Scaling Movieclips Interactive
As you know it from your desktop or of adobe illustrator, you may select multiple files or objects by a selection tool. This selection tool is a dashed square you can scale by OnMouseDown as large as you want.
I would like to do the same thing in flash. If you click on the stage, a movieclip is attached ( I would like to use a circle and not a square ) and while you press the mouse button, you can scale this MC proportionaly as large as you want. If you release the mousebutton, you got a circle on the stage of the desired size.
It seems a simple thing to do, but I got no idea how to do it. I'm just a newby. If anyone could help me out with some code-example, i would be very thankful.
greets sig.
Help With Empty Movieclips & Loaded Content Positioning
Hi,
Im having trouble centering my loaded jpegs (in the holder mc) on the stage (the jpeg's are all different sizes). I've attached my folder with the files (in the following post). If anyone's able to offer any good pointers/tutorials relating to this i'll be very gratefull. i.e :Loading content into empty clips /
The significance of registration points
Thanks in advance,
cesca
ps) I'm wondering if i have to put each jpeg in a swf first? I hope not, i have about 80 in total)....but If so can anyone show me example code of what i would put in the first frame of each of my swf's to get it to center on the stage when it loads......many many thanks in advance
Problem Duplicating And Positioning Movieclips Loaded From An Xml
Ciao a tutti
I'm working with a script that loads from an XML some jpgs, these ones once loaded move to their positions.
Info = new XML();Info.ignoreWhite = true;Info.onLoad = function() { picture = this.firstChild; count = picture.childNodes.length; for (child=0; child<count; child++) { currentPicture = picture.childNodes[child]; currentThumb = item_1.duplicateMovieClip("thumbnail"+child, child); currentThumb._xscale = 15; currentThumb._yscale = 15; currentThumb._alpha = 1; _root.currentThumb.xDest = child*50; _root.currentThumb.yDest = child*1; image = currentThumb.createEmptyMovieClip("thumbnail_image", 0); image.loadMovie(currentPicture.attributes.THUMB); }};Info.load("Info.xml");
the problem is that i would like put all these movies well aligned in rows and columns, i've seen it's possible to do this with a nested for.. loop, something like this
for(y = 1; y <= 4; y++){ for (x = 1; x <= 9; x++){ depth++; _root.item_1.duplicateMovieClip("item_" add x add "_" add y, depth+2); _root["item_" add x add "_" add y]._x = _root.item_1._x + (50 * (x-1)); _root["item_" add x add "_" add y]._y = _root.item_1._y + (50 * (y-1)); }}but don't know how combine the two scripts
thanks in advance
Problem Duplicating And Positioning Movieclips Loaded From An Xml
Ciao a tutti
I'm working with a script that loads from an XML some jpgs, these ones once loaded move to their positions.
ActionScript Code:
Info = new XML();Info.ignoreWhite =true;Info.onLoad= function() { picture =this.firstChild; count = picture.childNodes.length; for(child=0; child<count; child++) { currentPicture = picture.childNodes[child]; currentThumb = item_1.duplicateMovieClip("thumbnail"+child, child); currentThumb._xscale = 15; currentThumb._yscale= 15; currentThumb._alpha = 1; currentThumb.xDest = child*50; currentThumb.yDest = child*1; image = currentThumb.createEmptyMovieClip("thumbnail_image", 0); imageloadMovie(currentPicture.attributes.THUMB); }};Info.load("Info.xml");
the problem is that i would like put all these movies well aligned in rows and columns, i've seen it's possible to do this with a nested for.. loop, something like this
ActionScript Code:
for(y = 1; y <= 4; y++){ for (x = 1; x <= 9; x++){ depth++; var item = item_1.duplicateMovieClip("item_" +x + "_ " +y, depth+2); item._x = item_1._x+(50 * (x-1)); item._y = item_1._y+(50 * (y-1))}}
but don't know how combine the two scripts
thanks in advance
Interactive State Map Doesn't Retain User Selection After Postback
Hello,
I am using an interactive US map in Flash for a dealer locator on my website. When a state is selected, I have it set to show an alternate color for that state using loadClip inside of the onRelease function. inside the onRelease, i also have getURL, which directs to an aspx page for the selected state.
When the new page loads for that state, the page does a postback, and the selected state does not show anymore. How can I pass the selected state info to the aspx page so the flash map on that page shows what the user selected?
here are a couple of lines from the actionscript on the map:
nv_btn.onRelease = function () {
_level0.myMCL.loadClip("states/nv.swf", 10); getURL("wheretobuy.aspx?state=NV",_self);
}
ut_btn.onRelease = function () {
_level0.myMCL.loadClip("states/ut.swf", 10); getURL("wheretobuy.aspx?state=UT",_self);
}
thanks,
tommy
ps...im very new to this, so i'm sorry if i suck at explaining it.
Making A Game - Help With Keyboard Controls
I wish to make a game where the player moves/jumps/attacks with the arrows keys. Im new to this sort of stuff, so bare with me.
I have a character (a movieclip) and in frame 1, ive given the clip these actions:
---<start AS>----
onClipEvent (load) {
// sets variables
movement = 5;
}
onClipEvent (enterFrame) {
// LEFT
if (Key.isDown(Key.LEFT)) {
this._x = this._x-movement;
}
// RIGHT
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+movement;
}
}
---<end AS>----
this works great. I dont want the character to move up/down with the arrow keys, but i would like the character to be able to jump.
How can i get the character to move up a certain number of pixels with one hit of a key, and then automatically move back down to the original Y position?
also, how can i get the character to look like hes walking when the left/right key is pressed, and stop the animaion when the keys are not pressed?
Sorry for any confusion, and thanks for any help!
Dynamic MovieClips Aren't Interactive?
having a problem with my movie clips. I'm trying to create a slideshow inside a larger program, so I want to load the images of the thumbnails and the larger images dynamically. The problem, is when I create a movie clip with actionscript, the on.Press seems to stop working. Can anyone help me with this?
I've tried some simple programs to see what the root of the problem is, and I have come up with this very straight forward example.
redbutton.jpg is a 50 X 50 px red square.
blueButton_mc is a movie clip in the libraray, with a blue box inside, which is placed on the stage.
//************
// The Code
//************
_root.createEmptyMovieClip("redButton_mc", 0);
redButton_mc.loadMovie("redbutton.jpg");
redButton_mc._x = 300;
redButton_mc._y = 200;
redButton_mc.onPress = function() {
getURL("http://www.google.ca", _blank);
};
blueButton_mc.onPress = function() {
getURL("http://www.hotmail.com", _blank);
};
*****************************************
So can anyone out there tell me why the blue button in the library works fine, but the red button has not interactivty?
Making An Swf Interactive
I converted an avi file into a swf file for use on a client's webpage. But how do I make the movie stop and run by user input? Any suggestions? Thanks for your help.
MAKING AN .exe Interactive
Thank you wild peaks, it worked on the PC.
There is only one issue. Can an .exe file interact with another .exe file. similar to a LOAD MOVIE?
My swf files work that way but I was wondering
if I can do the same with exe.
Making An Interactive CD....
I need to make one for my band... Gonna contain some quicktime movies, photos, lyrics etc. nothing too fancy. Problem is, what do i do next? I thought i could just export the movie as windows projector.. but that doesnt make it full screen does it? It seems to launch in a flash player, just like a swf. I know how to make an autorun thing, thats cool. I dont really wanna hev to learn macromedia director. Could an interactive CD be done by autorunning a html page and having the flash in that, just like a normal website?
Thanks for any help anyone can give me. DOnt really know where to start....
Making A Slider That Controls A Movie Clip's Timeline
Hi all, was wondering if someone could help me or point me in the right direction. I'd like to make a slider that would control the timeline progress of a sequence of images. It seems to be pretty simple - when you drag the slider by a certain increment, the timeline moves to the next frame - but I can't quite figure out the actionscript needed.
I appreciate any help you can give me
Tracking User's Movement
I am looking for a way to track the user's movement throughout a fairly large site without having to open different windows. Is there a way (like in a program like dreamweaver) to have the user hit targets but without jumping between windows?
|