Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Drawing To A Loaded Image



Having created code that would draw to a specific area of my stage, I've now got my image uploading to the server and then loading into a ScollPane and my drawing code no longer works. That is it's still working but as it was originally targeting a sprite it's now drawing underneath the image loaded into the ScollPane. I'd really like it to draw onto the loaded image.I would be most grateful for any assistance you could offer.Attach Code//This is part of the original drawing code so you can see the sprite I made and was targeting. This code is on my .fla filevar canvas:Sprite = new Sprite();addChild(canvas);canvas.stage.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler);canvas.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);function mouseDownHandler(evt:MouseEvent):void {if (mouseX >22 && mouseX<590 && mouseY>160&& mouseY<547) {startX = mouseX;startY = mouseY;var dot:Sprite = new Sprite();dot.name = "dotStart";dot.graphics.beginFill(0x00FF00);dot.graphics.drawCircle(mouseX, mouseY, 5);dot.graphics.endFill();canvas.addChild(dot);dot = new Sprite();dot.name = "dotEnd";dot.graphics.beginFill(0x00FF00);dot.graphics.drawCircle(0, 0, 5);dot.graphics.endFill();canvas.addChild(dot);canvas.addEventListener(Event.ENTER_FRAME, enterFrameHandler);}}//This is the code for the image loaded into the dynamically created scollpane. This code is in a separate class file as I'm using a package from the nice people at Flep to upload the image. I've created the bitmapData object at the end of this bit of code, but I admit to being confused about whether that's necessary or not.private function init():void {var request:URLRequest=new URLRequest(url);holder_sp=new ScrollPane();holder_sp.load(request);trace("Loaded into SP.");loader=new Loader();initListeners(loader.contentLoaderInfo);loader.load(request);trace("Loaded into thumb.");}private function completato(event:Event):void {_fla.lights_mc.visible=false;_fla.lights_mc.stop();_fla.pre_mc.fill_mc.stop();_fla.pre_mc.visible=false;var sprite:Sprite;sprite=new Sprite();_fla.addChild(sprite);sprite.graphics.beginFill(0x666666,0);sprite.graphics.drawRect(180,145,loader.width,loader.height);sprite.addChild(loader);loader.x=625;loader.y=412.3;loader.width = 180;loader.height = 145;var sprite1:Sprite;sprite1=new Sprite();_fla.addChild(sprite1);sprite1.graphics.beginFill(0x666666,1);sprite1.graphics.drawRect(22,160,holder_sp.width,holder_sp.height);sprite1.addChild(holder_sp);holder_sp.x = 22;holder_sp.y =160;holder_sp.width =580;holder_sp.height =400;var image:Bitmap = Bitmap(holder_sp.content);var imageData:BitmapData=new BitmapData(image.width,image.height,false,0xcccccc);imageData.draw(image);}



Adobe > ActionScript 1 and 2
Posted on: 09/03/2007 11:46:57 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

On Completion Of Drawing A Loaded Image
im adding a loader as a child to a movieclip using the addchild function. the loader has preiousley loaded an image via the url. the movie clip has another child movieclip within it which contains a loading graphic. i want to delete or otherwise make invsible this graphic once the image has finished drawing.
how can i do this?

thanks

Loaded External Image Question: Use Default Image If Loaded Image Not Found?
Hello,

I use the following code to load an external logo into a Flash Movie.

Quote:




var myRequest:URLRequest=new URLRequest(logoPath);
var loader:Loader = new Loader();
loader.load(myRequest);
holder_mc.addChild(loader);




What if the logo file is not find? I wish that if the logo is not found, another default logo will be used, i.e.

if (logoPath is here) {
var myRequest:URLRequest=new URLRequest(logoPath);
} else (logoPath is not here) {
var myRequest:URLRequest=new URLRequest("defaultlogo.png");
}

How can I do that?

Thanks and best regards

Alex

Using SetMask() On Loaded .jpg With Drawing Api
I'm using something like this:

this.createEmptyMovieClip("myPicture")
myPicture.loadMovie("mypic.jpg")

Once the .jpg has loaded I do something like:

this.createEmptyMovieClip("mask",3)
with ("mask") {
beginFill(0xFF0000);
moveTo(myPicture._x, pic._y+(now*high));
lineTo(myPicture._x+myPicture._width, myPicture._y);
lineTo(myPicture._x+myPicture._width, myPicture._y+myPicture._height);
lineTo(myPicture._x, myPicture._y+myPicture._height);
lineTo(myPicture._x._width, myPicture._y);
endFill();
}
//this is just an example of the concept

So, I've tried reorder the clip creation, loading, drawing, etc and haven't been able to get a result from using the drawing api to mask a loaded .jpg.

if anyone has any trick to get around this, I would greatly appreciate any help.

Use Drawing Api To Edit Loaded Swf Then Save To Se
Right let see if i can make some sense.

I have a classroom built with FMS there is 2 levels of user, Student and mentor.
The student is able to upload files related to the class room. In most case's the files will consist of quicktime movies converted to swf (ffmpeg) on the fly.
The mentor can then play back the swf in a basic swf player with stop/start/nextframe/previuos frame buttons.

What i am looking to do being a mentor viewing these swf's is to be able to anote the swf's. This could be in the form of using flash drawing api to add notes to the swf frames and then saving a new copy of that swf or adding an audio note on each frame. Or it could be both.

My problem/questions is how would i go about using flash drawing api to markup frames of a loaded swf and then to make a new copy of that swf with that mark-ups.

I already have a basic drawing api that i can use.

Thanks for any help or input

Paul

How To: Looks Like You Are Drawing The Image
How do they do this:
http://www.tommyshanesteiner.com/
Skip the intro...I don't want to do this as extensive as they have done (look at the left hand side where the naviagation is), but it looks like a outline of the person is drawn out, and then a fade in of the real picture, I want to know how you make it look like you are drawing the outline. Thanks!

Drawing Over An Image
Hi, I'm using the following code to draw on the stage but I would like to draw over an image instead. Can anyone suggest how, thanks

stage.addEventListener(MouseEvent.MOUSE_DOWN,handl eMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP,handleM ouseUp);
clear_btn.addEventListener(MouseEvent.CLICK,delete Stage);

function handleMouseDown(event:MouseEvent):void {
var lineThickness:uint = Math.random()*5+1;
var lineColor:uint = Math.random()*0xffffff;
graphics.lineStyle(lineThickness,lineColor);
graphics.moveTo(mouseX,mouseY);
stage.addEventListener(MouseEvent.MOUSE_MOVE,start Drawing);

}
function handleMouseUp(event:MouseEvent):void {
stage.removeEventListener(MouseEvent.MOUSE_MOVE,st artDrawing);
}
function startDrawing(event:MouseEvent):void {
graphics.lineTo(mouseX,mouseY);
}
function deleteStage(event:MouseEvent):void {
graphics.clear();
}

Drawing Over An Image
I'm quite new to ActionScript (as in like 2 days new), and right now I'm attempting to create a drawing pad that would allow me to pick between a few pictures of some friends and then draw on said pictures. Unfortunately, I'm not quite sure how to make the lines drawn on top of the pictures instead of behind them. Anyone know?

Drawing On An Image
I modded some MM script example and I am wanting to draw over an image. Do you know where I have gone wrong?



import flash.display.BitmapData;
var myBitmapData:BitmapData = new BitmapData(image._width, image._height, false, 0x00CCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
myBitmapData.draw(image);

mc._x = image._width;

mc.onPress = function() {
this.onEnterFrame = sketch;
};


mc.onRelease = function() {
delete this.onEnterFrame;
};
function sketch() {
myBitmapData.setPixel(_xmouse, _ymouse, 0xAACCDD);

Drawing Order Of Curve Behind Loaded Movie
Hi,

I'm having an issue with the draw order of curve that's drawn using Actionscript. In terms of the order of execution of the function call, I have a SWF loaded first using the loadMovie function. Then I call the curveTo function with certain parameters to try to draw a curve on top of the loaded movie. However, the strange behavior is that the line is hidden behind the movie clip. I've used swapDepths, but it wasn't working for me. Also tried using the createEmptyMovieClip function with a depth number assigned, but didn't do the trick. Any suggestion?

Drawing An API Image With Actionscript
Hello everyone,

I am in the process of creating a line art pic of albert einstein for a banner. I am using the lineTO and the curveTo the only issue I am having is the animation. I want to animate the drawing, not just draw it. Would I use the onClipEvent command to animate the drawing process?

If you could possible give me a brief example I would be in your debt

PS I am working in Flash MX 2004 Pro

[CS3] Drawing Image Motion
Hey Guys,

Massive 'Noob' to Flash, and wanting to design a opening sequence.

I have an image designed within photoshop where is built up of mainly lines, I want to use this in flash and have the image seem to 'draw itself' as seen similarly in the sequence at the start of this site http://www.dananddave.com/ with the double 'Ds'

How is this done?

Tutorial?

Thanks for all of your help!
Matt

How To Convert A Drawing From SWF To Image/PDF
Hi All,
I need a help in AS 3.0. The requirement is, user needs to draw something and take a screenshot or in the PDF format from flash swf by clicking a Save button[Save button will be in the same flash file]. Is it possible in AS 3.0 with out any plug-ins?

Thanks,
Guru.

Drawing The Outline Of An Image
hi guys,

can anybody please help me, i have an image that i am using, but i want to draw the outline of the image before the image appears,

im using the drawing API to plot the co-ordinates to get the outline of the image, but i cant seem to animate it to get the illusion that it is drawing.

Can anybody please help

All help is greatly appreciated.

Many thanks again
andy

Drawing The Outline Of An Image
hi guys,

can anybody please help me, i have an image that i am using, but i want to draw the outline of the image before the image appears,

im using the drawing API to plot the co-ordinates to get the outline of the image, but i cant seem to animate it to get the illusion that it is drawing.

Can anybody please help

All help is greatly appreciated.

Many thanks again
andy

Mx2004 Cuts Loaded Image Borders - Image Format Problem?
hi mates

i know i didnt post here quite a long time (wasnt programming quite a long time too), and since i know this forum to be very helpful, i am back with one irritating problem.

i have some jpgs, all contents seem to be ok, and wanna load and rescale them (rescaling would work, thats not the problem). it seems my pictures have some format error, but i cant find it

they dont seem to get displayed completely. or better, their contents dont. that means, the content is displayed in a certain area, but not outside of it, although the image is fully loaded (at least getBytesTotal tells me so). i made a small file to test the picture loading, and it shows the same error as my real clip does.

- no, theres no mask applied
- no, the jpgs are no progressive types
- yes, i tried using baseline optimization, standard baseline, and different compressions.
- yes, when displaying the jpgs with any other tool than
- when inserting one of the pics to the stage in developing and then exporting it being inside the swf, it is displayed correctly
- btw, the pics are quite big (about 3000*2000px/300-700kB) for being able to zoom.

another issue i am noticing is that some areas inside the displayed area of the jpg are not displayed instantly when the jpg is displayed, and fadein (alpha) effects of other clips in front of these areas cause much more cpu load than they should.

anyone ever seen this problem? or anyone having an idea how to solve this one?

thx for reading, greets

self

[AS2] Automatically Drawing Outlines Of An Image
This is something I want to have ago at doing. I have CS3 but need to do it in AS2.

If I take an image of a car and trace the outlines with the pencil tool, can I get flash to draw it on screen automatically or is this not possible? I would also want it to fill in with the actual image or just solid colours.

So can this be done and where would I start with the AS?

Thanks

Drawing Lines Ontop Of An Image
OK I have an empty MC. I want to draw lines that show on top of an image, but everything I try draws the lines below my image.

This code is ran from the main timeline.

This is my code so far.


Code:
_root.attachMovie("Audiogram_Chart","Show_Audiogram",100000); //this is my MC that will hold the graphics
_root.Show_Audiogram.attachMovie("Audiogram_Chart_Pic","Audiogram_Chart_Pic1",0); //this is a graphic with linkage
_root.Show_Audiogram._x=200;
_root.Show_Audiogram._y=200;
//RIGHT EAR
_root.Show_Audiogram.lineStyle(2, 0xFF0000, 100);
_root.Show_Audiogram.moveTo(0, 0);
_root.Show_Audiogram.lineTo(200, 150);
_root.Show_Audiogram.lineTo(100, 50);
//LEFT EAR
_root.Show_Audiogram.lineStyle(2, 0x0000FF, 100);
_root.Show_Audiogram.moveTo(0, 0);
_root.Show_Audiogram.lineTo(100, 50);
_root.Show_Audiogram.lineTo(40, 150);

Drawing (Tracing An Image) And Feedback...?
I need to write some code that will enable the user to trace (using the mouse) over a shape (that I supply on the stage)--giving them feedback (like painting over the shape in a different color) and I need the mouse movements to determine whether or not they have traced (or are tracing) the shape correctly. Is this possible? Has anyone seen any tutorials that might help me accomplish this?

So say I provide a square (but the real shapes will be more complicated than that). I need the user to be able to trace with their mouse, the outline of the square. If they don't do it correctly, then I need it to reset and they have to try again. So I'd have to change the color of the square/paint over it as they move the mouse correctly and reset the color if they make a mistake. This is for a school project and any help you can offer would be great!

My thanks in advance for any advice.

Drawing Lines Ontop Of An Image
OK I have an empty MC. I want to draw lines that show on top of an image, but everything I try draws the lines below my image.

This code is ran from the main timeline.

This is my code so far.


Code:
_root.attachMovie("Audiogram_Chart","Show_Audiogram",100000); //this is my MC that will hold the graphics
_root.Show_Audiogram.attachMovie("Audiogram_Chart_Pic","Audiogram_Chart_Pic1",0); //this is a graphic with linkage
_root.Show_Audiogram._x=200;
_root.Show_Audiogram._y=200;
//RIGHT EAR
_root.Show_Audiogram.lineStyle(2, 0xFF0000, 100);
_root.Show_Audiogram.moveTo(0, 0);
_root.Show_Audiogram.lineTo(200, 150);
_root.Show_Audiogram.lineTo(100, 50);
//LEFT EAR
_root.Show_Audiogram.lineStyle(2, 0x0000FF, 100);
_root.Show_Audiogram.moveTo(0, 0);
_root.Show_Audiogram.lineTo(100, 50);
_root.Show_Audiogram.lineTo(40, 150);

Copying Loaded Image Bitmap Data To Another Image Loader
Hi,

I have an app where the user uploads an image into an image loader component. I am trying to figure out how to copy the bitmap data from that loaded image into another image loader component.

Could someone steer me in the right direction? I was looking at bitmap clone and copypixels though haven't figured out how to get this to work yet.

Thanks,

Dan

Bend An Image / Drawing Along A Motion Path
I need to animate three arrows coming in from 3 sides, top left and right , all starting straight, but I need them to come in straight and 'bend' together to form the finished image attached

Any ideas - been scratching my had all day over this one.

Nic

Drawing Board & Interactive Image Panning
Hello all,
I need to do some modifications to the following two things that I already found in kirupa tutorials:

Interactive Image Pan
I'd like to have one long image file (or a row of photos) that slowly slides in one direction when movie

loads. At the end of the slideshow it should repear ad infinitum so I always have a scrolling series of pics

while idle. When mouse rolls over movie area, it should perform those panning moves that the above

tutorial features.

Drawing Board
This one here has quite some stuff to do:

Can I have the drawing start with an onMouseOver event instead of the onMouseDown that the tutorial

uses? I wouldn't mind if it was a continuous line that was drawn instead of the MouseDown to start line

drawing and MouseUp to stop it.

Can I have the drawn lines slowly fade out and disappear after a set time?

*bonus stuff I can live without*

Can I have a small palette with colour swatches to change line colour? A slider to change line width?

After user is finished can I have a button that opens the recorded drawing in a new window so they can print it?

If anyone has links to tutorials concerning the above I would be mostly grateful.

Thanks

How To Convert A Drawing From SWF To Image/PDF Without Any Serverside Program
Hi All,

I need a help in AS 3.0. The requirement is, user needs to draw something and take a screenshot or in the PDF format from flash swf by clicking a Save button[Save button will be in the same flash file]. Is it possible in AS 3.0 without any other server-side program?

This is very urgent. Please let me know whether this is possible or not.

Thanks
Guru.

Tweening Image Container Mc Resizes Loaded Image.
Hello all.

I am having a problem with an image gallery I am writing. The basic logic is as follows:

*click* button -> Resize image container mc(img_mc) to the dimensions of the new image. This is done by passing the new dimensions as arguments to a function that uses the mx.tween property to tween the container_mc to the new dimensions.

Once the tween is complete, place the image in the container_mc .

the mc's are as follows:
img_mc.container_mc

img_mc: has a graphic with a pseudo drop shadow and on the timeline of img_mc is container_mc used as a landing place for the image.

View the example online. NOTE* you must resize the browser window in order for the site to appear properly.. I haven't setup the default yet)

Any help would be greatly appreciated.

Drawing An Image Centrally Whilst Rotating And Scaling
Hi everyone,

This is my first post here; just trying to make the awkward transition from J2ME and C++ to AS 3.0! Things aren't going too badly so far, but I've stumbled across a problem with drawing a rotated image centrally whilst scaling it. I found that you can draw an image centrally by doing this:

target.x = -(width >> 1);
target.y = -(height >> 1);

...but if I scale and rotate the image then it doesn't get draw centred around target_x, target_y. I'm guessing this is where I'm going wrong:

target.x = target_x - (target.width >> 1);
target.y = target_y - (target.height >> 1);

I've copied and pasted the entire code below - any advice would be great, thanks for your time!

Cheers,

Mike.

/////////////////////////////////////////////////

package
{
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.Stage;

public class Target extends Sprite
{
private var target:Bitmap;

private var target_x:Number;
private var target_y:Number;

[ Embed ( source = "target.png" ) ] private var targetGFXClass:Class;

public function Target ( )
{
// instantiate embedded assets
target = new targetGFXClass( );

target.scaleX = 0.0;
target.scaleY = 0.0;

// attach target to display list
addChild( target );
}

// initialization, called after parent addChild
public function init ( ):void
{
target_x = Math.random() * stage.stageWidth;
target_y = Math.random() * stage.stageHeight;

// start step triggering based on enterframe event
addEventListener( Event.ENTER_FRAME , step );
}

public function step ( event:Event ):void
{
if (target.scaleX < 1)
{
target.scaleX += 0.1;
target.scaleY += 0.1;
}
else
{
target.rotation++;
}

x = target_x - (target.width >> 1);
y = target_y - (target.height >> 1);
}
}
}

AS2 - MovieClip Drawing Methods - Adding 'border' To Image
Hello.

I am producing a standalone app which loads images from a local directory using MovieClipLoader - no problems there. I am setting the width and height (onLoadInit 200x133) so that if someone were to drop in an oversized image into the directory it wouldn't ruin the look. Finally I am adding a 'border' using the drawing methods. The border works fine if the image is exactly the right size (200x133) but if the original image is bigger then when reduced in size in the mc the border seems to scale in proportion to the original image??? There is probably a simple explanation for this...any advice? I know it will be easier to set the orignal image to the right size (which I probably will do) but I am curious how to do it the other way.


Code:
var nWidth = 134;
var nHeight = 201;
var imgLoad = new MovieClipLoader();
imgLoad.loadClip("commander.jpg", img_commander);
imgLoad.onLoadInit = function (img_commander){
img_commander._width = 133;
img_commander._height = 200;

with (img_commander) {
beginFill(0xFFFFFF, 100);
moveTo(-1, -1);
lineTo(nWidth, -1);
lineTo(nWidth, nHeight);
lineTo(-1, nHeight);
lineTo(-1, -1);
endFill();
}
}
Please don't laff at my code!

Image Scroller- Loaded Image Keeps On Scrolling
Hello. I am working on a client image scroller for my compaines website. What I want to do is once the user click on a specific client logo, a image pops up inside a " holder" MC. But when this happens, the image that appears scrolls along with the scroller nav bar.

My question: is there a way to make the image linked to button to stop scrolling?

Please see the attachment and click on the " DELL" button to see what I am talking about.

TIA

Xml Loaded Image On Rollover Loads Another Image
I have a xml flash gallery, that has thumbnails when clicked loads the image, now when a user rolls onto that loaded image I want it to load another image/swf from specified in the xml file. Anyone know how I can do this?

When Image Loaded Load Next Movieclip's Image?
i have a series of duplicated MCs, each with an image, i want them to load 1 image at a time, and when that is 100% loaded tell the next movieclip to load its images and so on.
And when the final MC has completed loading call an action.

after the 1st mc's image has loaded though, all the others seem to start?!

mc action,

ActionScript Code:
onClipEvent (enterFrame) {
    loaded = this.getBytesLoaded()/this.getBytesTotal()*100;
    loadedb = this.getBytesLoaded()/this.getBytesTotal()*100;
    _parent.percent = Math.floor(loaded) add "%";
    //
    //
    if (loadedb<99 and loadedb>80 or loadedb === 100 and _parent.xxx eq "go") {
        _parent._parent["icon" add _parent.k].load_image();
        _parent.xxx = "done";
        _root.lastv.scrollerz.scrollbar_mcy.reset();
    }
    if (_parent.i == fff and _parent.xxx eq "done") {
        _parent.xxx = "complete";
        _root.lastv.scrollerz.scrollbar_mcy.reset();
        if (loaded == 100) {
            trace(this+"· !¡! ·"+loaded);
            _root.lastv.scrollerz.scrollbar_mcy.reset();
        }
    }
}


load image action,

PHP Code:



function load_image() {
    this._visible = 1;
    ladeBild(image_main, image_path add file_name);
    per._visible = 1;
    xxx = "go";


How Do I Get A Loaded Image To Change Size Into The Next Image
ok, that probably sounded a bit wierd here's a link http://www.ronyshram.com/ what I want to do is something I see a lot but don't understand, you click a thumbnail and an image opens, you click another thumbnail and the image fades but the shape/frame resizes or changes from landscape to portrait to fit the next image when it appears.
any tips or AS ideas would be of great help please.

Web Image Not Loaded
Once again I 'm facing the same unsolved problem.

I want to load external images into my movie. I have two images (Photoshop), the first (img_Sas.jpg) is saved using the Save as... option (quality 2), the second (img_Sweb.jpg) is saved using the Save for web... option (quality 40).

The first is loading into the target but the second isn't . Anyone who had the same problem?
Attached file for anyone who wants to test it.

THX

How To Tell If An Image Has Loaded?
guys, how do you tell if an image has loaded into an MC or not.
I'm using:

img_loader.loadMovie("http://www.chewman.net/xml/_img/tn_img1.jpg");

then after wards, I'd like to say after the image has loaded, go to another function.

[F8] Hue Of Loaded Image
Hey, i'm designing a new website for myself, and it revolves around the theme of "cubes". In a 3D program I made some cubes with light shining through them, and was playing with it in photoshop, and was messing with the Hue scroller. If I slowly move it back and forth, it looks like there is a flickering changing color flame behind the cubes. So my question is, do I have to make 100 different pictures then merge it into a .gif, or is there a way to constantly change the hue back and forth to give a pulsing/multicolor effect with ActionScript? Thanks in advance!

Possible To Tell When A Certain Image Has Loaded?
When building a simple preloader, is it possible to tell when a certain image in the movie has loaded instead of just the entire movie?

Indicate What Image Is Loaded - XML
Hello,

I have made an image library based on an xml file with a row of clickable numbers where a new image can be loaded. Now when I click a number and the image loads I want to indicate the image loaded by drawing a square around the number.

This is the function that builds the thumbnails based on the nav_mc movieclip and allocating variables from the xml file to the instance of the mc:

function buildThumbs() {
nav_mc._visible = false;
aantal = images_xml.firstChild.childNodes.length ;
picHolder = images_xml.firstChild.childNodes[i];
originx = mc.nav_mc._x + 10;
for (i=0; i<aantal; i++) {
picHolder = images_xml.firstChild.childNodes[i];
horspace = 150 + (i*30);
duplicateMovieClip("nav_mc", "nav"+i, i);
//m = this["nav"+i];
this["nav"+i].pad = picHolder.attributes.jpegURL;
this["nav"+i].tekst = picHolder.firstChild.nodeValue;
this["nav"+i]._x = originx + horspace;
this["nav"+i].nummer = i+1;
}
}

Also in the root I have a variable that keeps the record of which image is loaded:

geladen = 0 ;

In the nav_mc movieclip this is the as, making the frame (kader in dutch) invisible and then making it visible only when the number variable in this instance is equal to the image loaded:

this.kader._visible = false ;
this.nummer.autoSize = true;

if (_parent.geladen == nummer) {
this.kader._visible = true ;
}
else {
this.kader._visible = false ;
}

Now, this doesn't happen and the frame is never shown and I don't have any idea why this is so. Do I have to add a listener? Did I do something wrong?

I someone knows please let me know?

Thanks and kind regards!

Tim

Drawing An Outline Of An Object In Flash And Then Animating The Drawing?
I wish to draw an outline of an object in flash? bit by bit a piece of the outline is drawn until the outline is completed, once this has finished then object then appears and the outline disppears (this part I can manage).

I do not know where to begin? So may need a lot of direction on this one.

Scrolling Drawing Board? Drawing Without Moving The Mouse
Hello, I'm new to this board and kind of a flash newbie so you could probably help me out.


What I'm trying to build is what you could call a scrolling drawing board - just like a drawing board but when the mouse comes close to the edge of the window, it scrolls and lets you continue your drawing.
I have no problem creating a drawing board with API, but i can't make it scroll. Usually when i want to scroll a background image i make it move along with the mouse when the cursor is near the edge of the window (for example, if the mouse's coordinates are above a certain number, the background image starts moving in one direction so it "scrolls" in the other direction).
So i wanted to do this with the movieclip of the drawing in a drawing board (make it move according to mouse's coordinates near the edge of the window), but when i scroll i have to stop the mouse at the edge of the window because i cant go any further :p so the drawing moves but it stops drawing. Or maybe what i need is some way to draw even when the mouse is not moving. Is that possible?

I'm sorry it may seem a bit confused (moreover english isnt my native langage :p), I'll try to post an example later. In the meantime, if any of you see how i can do that ... thanks

How To Know A Loaded Image Height ?
Hi !!
i ve a little Pb :

i am doing a loadMovie ...

parag.image.loadMovie("imageName.jpg");

... and i need to know the "new" height and width image,
(it means heigth and width of "imageName.jpg" ..)


how can i do, Pleaassse tell me !!!

Thx

Centering A Loaded Image.
My movie clip loads an external image to the screen. The image is loaded onto a movie clip located in the upper left corner of the screen xy cordinates 0,0.

code:
_root.image.loadMovie("imageName");


Now I want to center the image to the middle of the screen.

code:
_root.image._x = ( 400 - (_root.image.width/2) )


This should center the image horizontally considering that the screen is 800 pixels wide. It does not seem to work for some reason. Could anyone help?

How To Detect If A Image Is Loaded
i need to know how to be sure that flash loaded the image in the movieclip by loadmovielip()

if it is loaded, it stop and shows the image
but if the image isn`t still loaded it goes to a frame with " loading" untill it is loaded.

how can i know if the image is loaded into the mc?

How Reuse The Same Image Loaded?
I'm making a banner with a mask fx and the images will be loaded dynamicaly. I did this:

Put a MovieClip in my stage to load the image and them duplicate this to make the mask fx, well, in this step the image is loaded again.

How i can reuse the same image loaded in diferent movieclips?

Thanks!

Image Loaded From Link (how?)
hello,
im new in actionscripting so please bear me if this is stupid..

i want to load an image from a link to a specific position on the movie.. and i want to do it like adding variables in html.. (src="moviename.swf?value=link_to_image") because im having a dynamically created page..

note: all images are same size so that wont be a problem

any suggestions or help are appreciated..
thanks
Tarek

MC Size = Image Loaded ...how Do They Do It?
Frames that resize depending on what size of image?????????????
How can you do this.... does anyone have any ideas on where to point me...

Example:
http://www.loubopp.com/

How Can I Stop An Image Being Loaded?
(I'm posting this message again... something weird happedn to the last post and no message was stored in the post.)

I've got a movie with several images.
I want to have a version without the images.
All my images are stored within my Flash file in movies.

I want to have a version where the images don't get compiled (and therefore making my resultant SWF file smaller).

Is there anyway I can do this in Actionscript?

The only other way is to manualy delete the images before compiling?

Any help would be appreciated.

Thanks.


OM

Find Out If An Image Has Loaded?
Hi all,

I'm loading an image into my movie clip, dynamically, using this code:

loadMovie("image1.jpg",1);

and I want to find a way to test/find out if the image has loaded, so I can say:

"If file loaded, gotoAnyPlay(2);"

Can anybody tell me how I can do that?

Cheers.

Targeting Loaded Image
OK, so I'm loading an external .jpg into a MC( _root.image_target ) and then positioning it based on the size of the imported image. Here's what I've got so far

loadMovie("Autos/JPGs/Cl1997-00.sl.jpg", "_root.image_target");
_root.image_target._x = 395 - (_root.image_target._width)/2;
_root.image_target._y = 142.5 - (_root.image_target._height)/2;

Different colored buttons load different images, but when I load the first, it's top left corner goes to the registration point of the targeted clip (like it should) and then stays there, ignoring the next two lines telling it to center in the movie. The next time I press a button, the same one or another, it positions correctly. Any ideas on how to load the image and immediately move it, all in the same stroke. Thanks for all your continued help

-M

Masking A Loaded Image
Hey,

im trying to mask each image ive loaded through this function, ive got the mask to load it, but cant get it to, well mask hehe... any ideas?


PHP Code:



function loadImages(blankMC:MovieClip, newMask:MovieClip, amount:Number):Void {
for (var i = 0; i<amount; i++) {
//Making the BlankMC
var mc:MovieClip = blankMC.createEmptyMovieClip("img_0"+i, i);
//Looking for the images0
var img:String = "images/0"+i+".jpg";
//Loading the images into the MC
var makeMask:MovieClip = newMask.createEmptyMovieClip("mask_0"+i, i);

makeMask.attachMovie("mask", "maskee", 5)
mask_03.setMask(img_03)

mc.loadMovie(img);

}
}
//Images are loaded
loadImages(img_hold, mask_hold, 4);


stop();

Get Loaded Image Size
this should be simple but it's already 5 am..

if i do:
placer.loadMovie(image);

how do i do:

getLoadedImageWidth(image);
getLoadedImageHeight(image);

thanks...

Always Load Image On Top Of Last One Loaded
I have a gallery of thumb images that load the swf into an empty movie clip when the user presses the relevant thumb.

I'm currently loading the images using the loadMovieNum method.

I want the images to always load on top of the one the user is viewing.
So instead of seeing a blank screen (with the loading bar) while the image loads you still see the last image.

something like this site.
Press any of the gallery buttons to see what I'm talking about.

http://www.aaronbraun.com/photos/index.html

Whatever image you press the last one stays there.
Is a very cool effect and avoids people staring at a blank screen while they wait for the image to load.

Any idea how this might be done? Maybe a tutorial that might help or put me on the right track?

Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved