[Example]Creating JPEG Image From Draggable Clips
I've seen many threads requesting info on how to dynamically create a JPEG image from movie clips that are dragged around the screen. Rather than continuously answer these threads with cryptic info, I decided to throw together a basic example, I hope it helps: http://jerryscript.hostrocket.com/fl...composite.html
[note -- I cross-posted this to the backend forum, sorry if that upsets anyone]
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 03-20-2005, 07:55 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
[Example]Creating JPEG Image From Draggable Clips
I've seen many threads requesting info on how to dynamically create a JPEG image from movie clips that are dragged around the screen. Rather than continuously answer these threads with cryptic info, I decided to throw together a basic example, I hope it helps: http://jerryscript.hostrocket.com/fl...composite.html
[note -- I cross-posted this to the backend forum, sorry if that upsets anyone]
Creating A Draggable Scroll
Hi, I need some advice in creating a draggable scroll for a textfield.
I already can make a draggable movieclip, now I need to use its position to make the textfield scroll. But the textfield only scrolls when I stops dragging the movieclip. how can I make it scroll each time I move the movieclip??
Creating A Draggable Zipper
Hehe... I have absolutely no idea what im really doing in action script... maybe someone knows what there doing and can help. Im trying to create a draggable zipper that actually opens. I want to have the teeth on a vertical path with top and bottom limits. and the same for the zipper only horizontal. I need to set the actionscript so that the closer the zipper gets to the teeth, the closer they get to the bottom point of their path... ive set up an example on imageshack... ZIPPER
IF anyone can help that would be...Swell?
Thanks in advance!
Draggable Clips
Hello. I have a matching game with some drag and drop clips. When all the mc's are matched up correctly, the movie goes to the next frame where there is a play again button. When this button is clicked the movie returns to the first frame. The actionsript on this button sets up the properties so that the movie clips return to their origingal positions. The problem is that the clips are no longer draggable. And ideas how to fix this? Thanks.
Here is the code from one of the clips.
onClipEvent (load) {
white_x = getProperty(this, _x);
white_y = getProperty(this, _y);
}
onClipEvent (enterFrame) {
this.onRelease = function() {
_root.tries++;
if (hitTest(_root.answer2)) {
_root.answer2;
setProperty(this, _x, white_x);
setProperty(this, _y, white_y);
this._x = _parent.answer2._x;
this._y = _parent.answer2._y;
_root.s_check._visible = true;
_root.score++;
this.enabled = false;
} else {
setProperty(this, _x, white_x);
setProperty(this, _y, white_y);
}
};
}
on (press) {
this.startDrag();
}
on (release) {
this.stopDrag();}
Creating A Draggable Textfield Dynamically
why would this script not work?
_root.createEmptyMovieClip("tfh",100)
tfh.press = function() {
trace("asdf")
startDrag(tf,true)
}
tfh.onRelease = function() {
stopDrag();
}
_root.tfh.createTextField("tf", 100, 0, 200, 300, 100);
tf.multiline = true;
tf.editable = true;
tf.wordWrap = true;
tf.border = true;
tfm = new TextFormat();
tfm.size = 20
tf.text = "this is my first test field object text";
tf.setTextFormat(tfm);
Draggable Movie Clips
hi, i just need the basic actionscript to drag a movie clip around the screen.
i looked in the tutorials but none seem to describe it right.
thanks in advance
Draggable Movie Clips
I have a movie clip called "rec_mc"
on the stage.
I also have this select box that has a changehandler for loading images into "rec_mc" using loadmovie.
Im aware that loadmovie replaces the original movie, but should'nt it keep the instance name.
My problem is I want to be able to drag the movieclip after i load the images.
function select_item() {
oVal = combo_mc.getSelectedItem().data;
loadMovie("drawing_images/"+oVal+".jpg",rec_mc);
}
rec_mc.onPress = function(){
this.startDrag();
}
rec_mc.onRelease = function(){
this.stopDrag();
}
Draggable Clips-numbers
Ok hi again. Now, it is like this.
I have a draggable movieclip that I wish to use in some sort of game-thing.
However, I would need a box on top of the draggable clip where you would be able to write numbers. (This msut follow the clip when it is dragged)
Is this possible and if so, hos to make is?
Draggable Movie Clips
hey there, is it possible to make a draggable text box that can later have input text entered into it. You can't enter type in the box when the movie clip it resides in becomes draggable.
I've pinned the ._x and ._y values of the text box to a draggable move clip so it sort of "follows" it when it's released, but it doesn't look very nice at all.
Surely there is some other way? Any ideas are most welcome..
Draggable Movie Clips...
Hi! I followed the Draggable Menu Tutorial to try and scroll a movie clip -- i SORTA altered it to follow the y position instead of x and im seeming to have run into some trouble here. Below is my .fla so far, does anyone possibly mind checking it out to see what im doing wrong?
Here it is
Thanks very much in advance!
Jen
Draggable Movie Clips?
How do I create a draggable movie clip? I need to drag it from one pt and place it on another.
Creating A Draggable Object That Can Only Be Moved Left Or Right...
I'm trying to develop a quick and simple demonstration involving a draggable object, but I don't want the user to be able to go up or down, just left or right. Here's what I've got:
ActionScript Code:
import flash.events.EventDispatcher;
import flash.display.Sprite;
function dragMovie(event:MouseEvent):void
{
cross.startDrag();
}
cross.addEventListener(MouseEvent.MOUSE_DOWN,
dragMovie);
function dropMovie(event:MouseEvent):void
{
cross.stopDrag();
}
cross.addEventListener(MouseEvent.MOUSE_UP,
dropMovie);
Is there an easy way to modify this code to restrict movement on the y-axis? Or am I taking a totally wrong approach? All input is greatly appreciated, thank you.
Multiple Draggable Movie Clips
Help! I have 5 different movie clips that i have being able to be dragged around. I hvae a huge problem tho, and that is when i try dragging any of the other 4 movie clips, the 1st movie clip always gets dragged ....whyy?????
Constraining Draggable Movie Clips
hi
I want to Constrain a draggable movie clip, along the x axis. It follows the mouse, but then goes straight through a wall, does aanyone know he litttle bit of code, which, wil stop the movieclip even when the mouse still moves past that point.
Thanks
Pedros
Making Movie Clips Draggable
Ok im using flash 5 and know that only movieclips are technically draggable. WHat Im having trouble with is that even if I have the draggable action script for each different movie in, everytime I click on a new clip to drag it the very first clip I made draggable takes the focus it seems and none of the others can be dragged. Can someone help me out with this please. Below is the code Im using:
onClipEvent (mouseDown) {
startDrag ("", true);
}
onClipEvent (mouseUp) {
stopDrag ();
}
If anyone could help me out in some way to make it that what ever clip is clicked and mouse button held down becomes the clip that is draggable it would be greatly appreciated.
Stopping Movie Clips Being Draggable
Hi everyone,
Im having trouble stopping a movie clip being draggable.
I have the following code...
Code:
on (release) {
stopDrag();
if (this._droptarget == "/43") {
_root.answer1 = "Correct";
_root.mySound.start();
_root.score++;
} else {
_root.answer1 = "wrong";
}
Its supposed to check weather the mc has been dropped in the correct place. If it has then I dont want the user to be able to move it again.
It wont work! Any advice would be great.
Thanks
Importing XML Into Draggable Movie Clips?
Hello all,
I am using Flash to read an XML file and display it in a text area. However, I want some of the text to be imported as draggable movie clips. So, when a reader reads the text, they can select certain segments of the text and drag it to another part of the screen. For example, a doctor reads about a patient and makes an initial diagnosis. After they make the diagnosis, they have to choose text and phrases about the narration and drag it to a quiz area to support the diagnosis they came up with.
Is this possible? I know it probably requires a ton of coding, which I am more than willing to research, but so far I have not been able to come up with many answers. If someone could start me out on the right foot I would greatly appreciate it. Thank you all for your valuable time and help.
-Chaz
Draggable Duplicated Movie Clips
Hello, I'm creating an application with Flash and I could really use some help. The application is for floorplan furnishing. There is a floorplan and you drag and drop furniture on the floorplan.
I would like to allow the user to generate as many MCs as they'd like of whatever furniture pieces they want and rotate them.
Thanks!
Draggable Duplicated Movie Clips
Hello, I'm creating an application with Flash and I could really use some help. The application is for floorplan furnishing. There is a floorplan and you drag and drop furniture on the floorplan.
I would like to allow the user to generate as many MCs as they'd like of whatever furniture pieces they want and rotate them.
Thanks!
How To Prevent Overlapping Draggable Clips
I wonder if there is a reliable way to prevent draggable movies clips specially if those were instances that generated and named dynamically on the run....
the idea is to have them draggable but not allowed to overlap overn one another just like the optional (prevent overlap) way with layers in Dreamweaver ...
thank u in advance
Draggable Movie Clips That Trigger Events
Please help!
If I have multiple draggable movie clips and I want to be able to drag them into a designated area and have different events happen depending on which movie clip I drag into that area, how can this be accomlished?
Any insight would be greatly appreciated. Thanks!
Setting Depth Of Multiple Draggable Clips - MX
I have a flash movie with several draggable movieclips. I would like to add a 'bring to front' button to each of them. I am having trouble using swapdepth as they do not share the same parent movieclip. Any ideas?
I an using MX
Draw A Line Between 2 Draggable Movie Clips
Hi, i'm trying to draw a line between 1 stationary and 1 draggable movie clip. i've got it working but when i drag the movie clip awy from the other the line scales to far and comes out the other side. Any ideas how I can stop this from happening so that it only scales out to where the mouse is hovering over the movie clip.
I've posted my code if thats ok
Code:
//positions line on the stage
this.line_mc.onEnterFrame = function () {
line_mc._x = drag2_mc._x ;
line_mc._y = drag2_mc._y ;
line_mc._xscale = drag1_mc._x-line_mc._x ;
line_mc._yscale = drag1_mc._y-line_mc._y ;
updateAfterEvent();
}
//Starts draggble movie clip
this.drag1_mc.onPress = function () {
startDrag(this);
}
//Stops draggable movie clip
this.drag1_mc.onRelease = function () {
stopDrag();
}
As you can see there are 3 movie clips
line_mc is the line
drag2_mc is the stationary clip
drag1_mc is the moveable one
A second problem is that I can only have the line set as hairline because as it scales it gets fatter. I originally tried to draw the line with actionscript using 'LineTo' and 'MoveTo' . I caould draw the line fine if I used x and y co-ords such as 200, 400 etc but could not assign it the co-ords of the 2 movieclips.. is this possible
Andy
Arrays And Duplicating Draggable Movie Clips
Hi,
I'm using this code for a "furniture placement tool" and was having some trouble figuring out the correct syntax for doing an array of multiple draggable objects.
Here is my code so far. The pieces of furniture are their own movie clips, all contained within a movie clip "furn":
ActionScript Code:
i = 0;
_parent.furn.SOFA.onPress = function() {
duplicateMovieClip("SOFA", "SOFA"+i, i);
_parent.furn["SOFA"+i].startDrag();
_parent.furn["SOFA"+i].onPress = function() {
this.startDrag();
if (Key.isDown(Key.SPACE)) {
this._rotation = this._rotation+45;
}
};
_parent.furn["SOFA"+i].onRelease = function() {
this.stopDrag();
};
i++;
};
_parent.furn.SOFA.onReleaseOutside = function() {
this.stopDrag();
};
To add an array, I was planning to add this function around the above code, but am not sure how to integrate the array item reference (replacing "OVAL") with correct syntax:
furnArray = new Array("SOFA", "CHAIR","TABLE");
for (f=0; f<furnArray.length; f++) {
}
My second question is how to clear all the duplicated movie clips? I tried using removeMovieClip, but had spotty results.
Any help with coding would be appreciated!
Thanks
Draggable Clips In Swf Not Workin In Loaded Level
I've got a project that takes place on different levels.
In _level0 is the main navigation.
In _level1 is the secondary navigation with draggable items.
The movie in _level1 has several drag and drop clips.
When I publish/play the .swf on it's own it works fine. When I play it loaded into _level1, it drags but does't recognise the targetMC it's dropped on and so the 'triggerMC' doesn't work at all.
I've tried a couple different things. Referencing the draggable objects and target using _level1. The draggable objects only become draggable when loaded in _level1 however the targetedMC code will still not work?
Major stress please advise.
Creating A Jpeg From A Live Swf
I have a flash movie that creates a swf movie I am looking for a way to create a jpeg from the swf movie on the fly.
Any help or suggestions would be really help ful. Is there a way within flash?
Problem Creating A Draggable Navigation Menu With Dynamic Buttons
Dear All,
I am trying to create a draggable navigation menu in which the menu items are dynamic. For the time being the text of the menu items is stored in a script variable as comma seperate values.
The buttons are created within a movieclip which is created on the _root object. So far it works fine. But the moment I add the code to make the button container movie clip draggable, the buttons lose their mouse interactivity. The buttons no more respond to mouse events like onRollOver, onRollOut etc.
Attached is the code that I used:
Code:
//setProperty("btndyn.swf", _x, "600");
stop();
//
// Color for button text.
//nbrBtnTextColor = 0xFFCC99;
nbrBtnTextColor = 0x000000;
nbrBtnTextColorOver = 0xCCCCCC;
// Size for text on button.
nbrBtnTextSize = 12;
// Color for button background in UP state.
nbrBtnClrUp = 0x006699;
// Color for button in OVER state.
nbrBtnClrOv = 0x000066;
// Color for button in deactivated state ("you are here" indication).
nbrBtnClrOff = 0x999999;
// Space between buttons.
nbrBtnGutter = 3;
// Button interior margins.
nbrBtnMrgLeft = 2;
nbrBtnMrgRight = 2;
nbrBtnMrgTop = 1;
nbrBtnMrgBottom = 1;
btnMinWidth = 88;
btnMinHeight = 15;
// ====================================================================
// Create TextFormat for button textfields
tfmBtnText = new TextFormat();
tfmBtnText.align = "left";
tfmBtnText.color = nbrBtnTextColor;
// See library for font object and it's linkage properties.
tfmBtnText.font = "Arial";
tfmBtnText.size = nbrBtnTextSize;
// Create TextFormat for button mouseover textfields
tfmBtnTextOver = new TextFormat();
tfmBtnTextOver.align = "left";
tfmBtnTextOver.color = nbrBtnTextColorOver;
// See library for font object and it's linkage properties.
tfmBtnTextOver.font = "Arial";
tfmBtnTextOver.size = nbrBtnTextSize;
// ====================================================================
// Delimited string of all button text.
stgBtnText = "About Us|Design|Our Work";
// Split above string to an array.
rraBtnText = stgBtnText.split("|");
// ====================================================================
// Create navigation container clip (makes moving the whole thing around a lot easier).
_root.createEmptyMovieClip("mvcNav", 0);
//mvcNav._x = 10;
//mvcNav._y = 10;
//mvcNav.createEmptyMovieClip("navContainer", 1);
//_root.createEmptyMovieClip("navContainer", 0);
/*
navContainer.onPress = function(){
startDrag(this)
};
navContainer.onRelease = function(){
stopDrag();
}
*/
//navContainer.setMask("menu.png");
// ====================================================================
// Loop to create buttons and all interior objects.
for (icrBtn=0; icrBtn<rraBtnText.length; icrBtn++) {
// Create clip to hold button and reference to it (saves on typing and redundant concatenation).
rfcBtn = mvcNav.createEmptyMovieClip("mvcBtn"+icrBtn, 0);
// Store button's number inside button's own timeline (used later).
rfcBtn.nbrID = icrBtn;
// Create textfield at depth of 2, so background and outlines can go under it.
rfcBtn.createTextField("tfdBtn", 2, nbrBtnMrgLeft, nbrBtnMrgTop, 1, 1);
// Create reference to textfield (can't be done on single line, like movieclips).
rfcTfd = rfcBtn.tfdBtn;
// Apply textformat to textfield.
rfcTfd.setNewTextFormat(tfmBtnText);
// Set textfield properties, including text to display.
rfcTfd.autoSize = "left";
rfcTfd.embedFonts = true;
rfcTfd.selectable = false;
// Assign text from array to textfield in button.
rfcTfd.text = rraBtnText[icrBtn];
//
// Calculate button width & height based on current dimensions
// (dimensions of textfield) plus interior margins.
nbrBtnW = nbrBtnMrgLeft+rfcBtn._width+nbrBtnMrgRight;
nbrBtnH = nbrBtnMrgTop+rfcBtn._height+nbrBtnMrgBottom;
if(nbrBtnW < btnMinWidth)
nbrBtnW = btnMinWidth;
if(nbrBtnH < btnMinHeight)
nbrBtnH = btnMinHeight;
//
// Create internal clip to contain visual background, to serve as both hit area
// and to be available for color change in response to button events.
/*
rfcBkgd = rfcBtn.createEmptyMovieClip("mvcBtnBkgd", 0);
rfcBkgd.moveTo(0, 0);
rfcBkgd.beginFill(nbrBtnClrUp);
rfcBkgd.lineTo(nbrBtnW, 0);
rfcBkgd.lineTo(nbrBtnW, nbrBtnH);
rfcBkgd.lineTo(0, nbrBtnH);
rfcBkgd.lineTo(0, 0);
rfcBkgd.endFill();
// Create color object for background clip so color can be changed with button actions.
rfcBkgd.clrMe = new Color(rfcBkgd);
*/
//
// This section optional -------------------------------------------------
// just creates clip to contain lines that simulate highlites and shadows around button rectangle
// (these don't change color -- just the background).
/*
rfcBvl = rfcBtn.createEmptyMovieClip("mvcBvl", 1);
rfcBvl.moveTo(0, 0);
rfcBvl.lineStyle(1, 0xFFFFFF);
rfcBvl.lineTo(nbrBtnW, 0);
rfcBvl.lineStyle(1, 0x000000);
rfcBvl.lineTo(nbrBtnW, nbrBtnH);
rfcBvl.lineTo(0, nbrBtnH);
rfcBvl.lineStyle(1, 0xFFFFFF);
rfcBvl.lineTo(0, 0);
rfcBvl.endFill();
*/
// -----------------------------------------------------------------------
//
//Move button clip to appropriate position if 2nd or later button.
rfcBtn._x = 10;
//if (icrBtn)
{
rfcBtn._y = _root.mvcNav["mvcBtn"+(icrBtn-1)]._y+_root.mvcNav["mvcBtn"+(icrBtn-1)]._height+nbrBtnGutter;
}
//
// Establish button actions.
rfcBtn.onRollOver = function() {
//this.mvcBtnBkgd.clrMe.setRGB(_root.nbrBtnClrOv);
this.tfdBtn.setTextFormat(tfmBtnTextOver);
//trace(this.tfdBtn.text);
};
rfcBtn.onRollOut = function() {
//this.mvcBtnBkgd.clrMe.setRGB(_root.nbrBtnClrUp);
//trace(this.tfdBtn.text);
this.tfdBtn.setTextFormat(tfmBtnText);
};
rfcBtn.onPress = function() {
// On press, launch the fncBtnPress function and pass it the identity of the button
_root.fncBtnPress(this.nbrID);
//trace(this.nbrID);
};
}
fncBtnPress = function (nbrButtonID) {
//_root.rfcBtnLast.mvcBtnBkgd.clrMe.setRGB(nbrBtnClrUp);
_root.rfcBtnLast.enabled = true;
var rfcBtn = _root.mvcNav["mvcBtn"+nbrButtonID];
_root.rfcBtnLast = rfcBtn;
//rfcBtn.mvcBtnBkgd.clrMe.setRGB(nbrBtnClrOff);
rfcBtn.enabled = false;
// Switch statement to act based upon numeric identity of button that called this function.
// Actions go on lines just after the comment lines "do whatever".
switch (nbrButtonID) {
case 1 :
// Portfolio
// do whatever
break;
case 2 :
// Gallery
// do whatever
break;
case 3 :
// History
// do whatever
break;
case 4 :
// Profile
// do whatever
break;
case 5 :
// Links
// do whatever
break;
case 6 :
// Contact
getURL("mailto:yourname@yourdomain.com");
break;
default :
// Home
// do whatever
}
};
Please if someone could help me solve this problem as its a high priority for me.
regards,
Husain
Problem Combining Draggable Movie Clips In Different Levels.
Why is not possible to combine draggable movie clips in different levels within a main movie clip?
In my case, I've got a draggable movie clip, and inside this movie clip I've got a few movie clips which are draggable as well. The hit area of the main movie clip menu does not cover neither the movie clips of the next level nor their corresponding hit areas.
When I execute the file, I just can drag the main movie clip, but the hit areas of the next level are not selectable (the hand cursor does not appear), so I cannot drag the other movie clips.
Is there any way around this? Please, help!
Creating A Jpeg Snapshot Sequence From A Flv
Hello everyone,
I see there are many apps out there to create snapshot sequences from avi files, I was wondering if anyone had any suggestions on how this might be accomplished on-the-fly using flv video.
I'd like to create a snapshot sequence every 12 seconds from my flv and order them above my scrubber so people can see what scene they are srubbing to without having to move the handle.
Any tips or tutorials would be much appreciated.
Have a good one.
T
Creating A Preloader For Loading A JPEG
Hey, I need to create a preloader (basic one) for loading a JPEG file so that once the file is loaded I can manipulate it's properties..
At the moment I have the Images loading into MC which is contained in another movie clip MCholder say.
How do I go about creating a preloader since the gettotalbytes is only available after it's loaded it always returns 0
?
Thanks
Movie Clips And Jpeg
Hi,
I'm problem is this:
I create a movie clip, with two layer, one of them is a jepg that I already turn it a imagem object and animated it from a point to b point (simple move) and the another layer is a text. When I put this movie clip into the principal movie. I only can see the text. I cant see the moving object. I'm using Flash mx. Does any one know What is wrong?
Tks,
William
Creating A Video Player With Dynamic Draggable Playlist. Is It Doable In Flash? Help Please
Hello Everyone,
I am scripting a video player and one of its functionalities is to be able to have a playlist that can be arranged by the user in any order user like. For Example, if there are lets say 5 videos within the playlist:
SONG 1
SONG 2
SONG 3
SONG 4
SONG 5
User can then change the order of the videos by clicking on any video and dragging it up or down just like windows mediaplayer and the player should play the videos in such order.
So far, I have been able to use the list component but am not sure if it will allow the dragging.
I would highly appreciate it if you guys can suggest what should I do to handle this functionality.
Thanks.
Making Dynamically Created Movie Clips Instances Re-draggable
This is a Flash 8 / Actionscript 2 problem
The application allows the user to create multiple instances of a dot
by clicking on the original dot - and then drag the instances to position
them on the stage (it's part of a game)
I need to allow dots to be re-dragged - but to do that need to detect the
instance name of the dot under the mouse pointer (otherwise I can't turn
the dragging on)
this is what I've got so far...
numberOfDotDuplicates = 0;
dot.onPress = function()
{
numberOfDotDuplicates++ duplicateMovieClip(_root.dot,"dot"+numberOfDotDupl icates,getNextHighestDepth())
_root["dot" + numberOfDotDuplicates].startDrag(true);
}
/*
This bit below is not realy part of the problem
- but it feels like an inelegant workround
I've had to use a listener to stop the dragging
because the onRelease event is only detectable
if it happens over the original 'dot' (where the
corresponding onPress event was detected)
*/
var myListener:Object=new Object()
Mouse.addListener(myListener);
myListener.onMouseUp = function()
{
stopDrag();
}
Thanks for taking the time to read this
Simon
Creating Dynamic Text Or Generating Jpeg
Hi
I am an old face from these boards who has been out of the Flash loop for a few years. Please excuse me if I am asking a very obvious question or if I’m lurking in the wrong section, however I would be very grateful if someone could direct me to an answer to my question.
I am looking for a feature in Flash called ‘Generator’, as I remember one of its uses was to either serve the user a swf file or a dynamically generate gif/jpeg file if their browser didn’t support flash. I wanted to bastardise this feature to dynamically serve jpegs with nicely anti-aliased text headlines by interfacing with a server based database that supplies the text of each headline.
I can’t find any info about Generator. Has it been phased out? Is this feature supported in any other Macromedia product, or can anyone tell me any other software that could do this?
Any help much appreciated.
Thanks.
Tom
Help With Draggable Image
I have aquired this code to create a draggable movieclip containing an external image (jpg) when the relating thumbnail is pressed...
The panel itself is actually an image placed into a movie clip. Also in the movieclip is a button with the alpha lowered to 0% so that it is still active, but not visible
The mc is placed into the main movie timeline and given an instance name : draggable
the button within is then applied the foll code:
on (press) {
startDrag ('_root.draggable');
}
on (release) {
stopDrag ();
}
Where as the button is pressed, the movieclip ('draggable') in the main timeline ('_root.') is told to follow the mouse (startDrag) as soon as the mouse button is released the drag is dropped.
The other actionscript on the thumbnails tells the movieclip which image to display.
BUTTON CODE
on (release) {
if (isOn == false) {
// the panel is not currently visible
tellTarget ('_root.draggable') {
gotoAndPlay ('on');
}
tellTarget ('_root.draggable.slide') {
gotoAndStop (1);
}
setProperty ('_root.draggable', _x, '175');
setProperty ('_root.draggable', _y, '150');
isOn = true;
} else {
// the panel is currently visible
tellTarget ('_root.draggable.slide') {
gotoAndStop ('1');
}
}
}
However, I am a true flash virgin and although I am desperate to learn flash after defecting from html, I need a little help to translate and understand.
Are there any flash Pro's out there that can break it down for me step by step on how to use this code to display the images I have outside my flash movie file, and where to input the file names, location etc.
Much appreciated
KAIN
How To Load Multipul Jpeg And Movie Clips?
Hi all, i'm new to ActionScript.org, have been learning actionscript for the last week and just trying to build my first site.
i'm wondering is there a way when loading multiple jpeg's or movieclips into my site to load them all at once without having to call them all individually?
i was thinking of using a for statement and an array of all the names so it would just go through them all by its self, but is there a better way?
also if i am loading jpeg's in is there a way of converting them to movieClips once they are loaded?
Thanks,
BrownWarrior
Help With Draggable Image Window
I am creating a site that will include 8 scenes containing a lot of images in each along with text.
I would be very grateful to hear from any flash experts that can instruct me how to create a draggable image window.
Firstly, do you need to make a separate draggable window for every pic?
Ideally I would like to load each picture from the _root folder when selected, into the draggable window.
I am a real novice at flash, and you must forgive my inexperience but I am very keen to learn this program, with your help of course!
In a step by step format please
KAINCJ
Draggable Mc With An Image Swap
Hi there.
I've got a draggable mc that needs to swap to another image (but still remain draggable).
Problem is when you release the draggable item, with the changed image, it sticks to the mouse (until clicked down).
Check out my example here
is there any way around this?
Thanks in advance
Draggable Button Which Scrolls An Image
Can anyone help me on finding the actionscript or movie source file i can alter to get effect of dragging a button to scroll a huge image which is larger than the scroll area.
I would like to almost mimic the effect on the home page of:
http://www.gonetixdesign.com/
thanks so much!
Jesse
Navigation In A Large, Draggable, Zoomable Image
I am trying to make a huge zoomable, dragable image simpler to navigate in. The file is too large to upload, so to get an idea of what I'm dealing with, go to the following link:
http://ryu.bsd.uchicago.edu/sh2/clustalalignment.html
The problem with the setup now is that the image is so large that one gets lost when one drags around in it. The user should always know what protein a row belongs to (indicated by the far left column). I see of two possible solutions to this problem, the first being simpler and the second more complicated:
1) Create a box that displays the name of the protein (indicated by the name of the far left column) so that when your mouse is over a row the box will display the name of the protein. The image would still need to be draggable.
2)Attach a seperate column to the left which is not able to be drug left or right, but only display the protein names. This column would have to zoom in and out to remain in alignment with the main image.
My flash knowledge is very small, so please be detailed if you want to help!
Thanks a lot,
Conrad
JPEG Image Distortion
When I import a JPEG it looks fine untill I play it as a SWF.
In the center of the image the image seems to shift by about two pixels.
Is there a way to stop this frm happening?
Thanks!
Jpeg Image Quality
I made a flash introduction with a jpeg image in it. It looks perfectly fine on the preview, but after I export the movie I can see the rigid lines around the edge.
When exporting the movie I set jpeg image quality to 100 but it made no difference.
What can I do to improve the quality of the image?
Preloader On A JPEG Image
Hello,
I was checking this forum for info on preloaders, but couldn't answer my question. Can a preloader be applied to a dynamically loaded jpeg? The image loads a couple frames after it should (late) so it pops into the sceen late. I want to hold the playhead until I know the jpeg is there. Then go next.
Most of the preloader stuff seems to look at swfs or total frames in the movie. This is just an image and the images vary in file size from 40k to 65k.
This is the code I am using now
loadMovie("pics/SLSS-09.10.04.jpg", "JPGplaceholder");
This works fine, just the images pop in to the scveen a bit late.
Any help will be appreciated.
Stream A Jpeg Or Png - Still Image
Please dont ask why I want to take this backward sounding step but I would like to serve a static image- as kind of a test card. I guess I could serve a stream containing just one stattic image that is really still a video.
From their docs
Code:
Supported file formats
All editions of Flash Media Server 3 support playback of the following file formats:
FLV
All versions of Flash Media Server (1, 2, and 3) support the FLV file format. The FLV file format supports the following codecs: On2 VP6, Sorenson Spark, and MP3.
To create FLV files from existing digital video or audio files, use third-party video encoding utilities, like On2 or Sorenson Squeeze, or export them from Flash. Recorded streams can contain data messages, as well as video and audio and are stored in the FLV file format.
F4V, MP4, M4A, MOV, MP4V, 3GP, and 3G2
Flash Media Server 3 supports playback of H.264-encoded video and AAC-encoded audio within MPEG-4 Part 14 container formats.
You can use any number of industry-standard tools to create files in these formats with these types of encoding, including Adobe Premiere and Adobe AfterEffects.
Important: If a file contains portions of audio and video not encoded using H.264 and AAC, those parts of the stream will not play. For more information on H.264/AAC support, see Exploring Flash Player support for high-definition H.264 video and AAC audio.
So I cant stream directly a jpeg for example.
Getting The Size Of A Jpeg Image
Hello,
I'm looking for a way to get the size (height and width in pixel) of a jpeg file before actually loading the file.
Is it possible ?
Thanx.
Vincent
Breaking Apart A Jpeg Image
hi everyone
here is a challenge for all of you since i can't figure out a way to do this...
The thing is:
1-I have a jpeg image that i've imported to flash
2- I break it apart using CTRL-B twice
3-I want to cut that image in several pieces and convert those pieces into to movieclips so that i can animate each one alone
4-I make this manually using the selection tool and going thru the process of pressing F8 each time in each piece
5- What i 'd like to know is if is there anyway to do this using actionscript?
so can i,turn a jpeg image to a shape,divide it into several pieces and convert each piece to a movieclip using actionscript?
if anyone can help i'd appreciate that
Width Of A Loaded Jpeg Image
Hello,
I dynamically create movieclip and load a jpeg image on each with these two methods: createEmptyMovieClip and loadMovie. Then I need to known the size in pixels of each created movieclip to place them correctly in my main clip. Unfortunately the properties _width and _height of each clip returns always 0. Why? Do you know a trick to recover the size of the image? ( I have to find a simple solution because my program must load about 1200 different pictures )
Many thanks Bye Alain
|