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




BlendMode Not Working On The Imageholder MC



I have a blank mc (instance=picture) servers as image holder to load images from a .xml file.The images being pull into the image holder are mostly got white background while my stage is slight green so I'd like to apply the "screen" blendMode so they look blended right. For some reason I can't get it to work...been googling on blendMode but no luck getting the right solution. anyone? much appreciated!Attach Codepicture.loadMovie(image[p], 1);picture.blendMode = "screen";Edited: 06/12/2008 at 02:11:32 PM by ibrubru



Adobe > ActionScript 1 and 2
Posted on: 06/12/2008 01:46:12 PM


View Complete Forum Thread with Replies

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

Centering Content In An Imageholder
I'm using the following code for a picture viewing loading external pictures using xml.

_root.createEmptyMovieClip("mcImageHolder",1);
mcImageHolder._x = 10;
mcImageHolder._y = 40;

is it possible to center the pictures in the placeholder instead of using x and y values??

Thumbnails Don't Fit In Imageholder [renamed]
For anyone out there. This might be a lame *** question but I am trying to bring in an external swf inside a mc. The external swf is a image viewer or photo gallery. It works. My problem is that my thumbnails from the external swf will not fit into my imageHolder_mc box that I want it to.

Any pointers would be great cuz I am out of ideas. I am using AS 2.0 and Flash 8 if that helps at all.

Thanks

[F8] Att. Button.Onrelease And Imageholder Function To Thumbs
hello, and thanks so much for your time, Iam pretty new to this AS, but I have a little something...

I have tried Lee's tutorial on the scrolling thumbnail panel and it works great, but now I was wondering... I created McImageHolder functions, (4 total) and some textBoxes, that are being executed by the ButtonOnRelease function.

They used to work before, but that was when the thumbs where rolling in the document by themself by this command

code: onClipEvent (enterFrame) {
_root.movePiece(this)
}

My question is can I still use the ImageHolder functions with the new scroll panel? And how do I do that?

this is the code I use for the ImageHolder functions, I just name the instances Button01 to execute the code (normally)

code:
// main display picture 424 x 361
_root.createEmptyMovieClip("mcImageHolder",1);
mcImageHolder._x = 334;
mcImageHolder._y = 1;

// zoom detail picture 149 x 170
_root.createEmptyMovieClip("mcImageHolder2",2);
mcImageHolder2._x = 176;
mcImageHolder2._y = 213;

// related picture
_root.createEmptyMovieClip("mcImageHolder3",3);
mcImageHolder3._x = 176;
mcImageHolder3._y = 65;

// related picture 149 x 55
_root.createEmptyMovieClip("mcImageHolder4",4);
mcImageHolder4._x = 176;
mcImageHolder4._y = 1;

// button code

// North
Button09.onRelease = function() {
mcImageHolder.loadMovie("images/pieces/logo09.gif")
mcImageHolder2.loadMovie("images/pieces/logo09_d.gif")
mcImageHolder3.loadMovie("images/pieces/logo06_2.gif")
mcImageHolder4.loadMovie("images/pieces/logo06_1.gif")
textBox_client.text = "North"
textBox_year.text = "2006"
textBox_descr.text = "blahblahblah"
textBox_specs.text = "slice of orange represents summer"
textBox_uses.text = "flyers, registration forms, web"
textBox_progs.text = "Adobe Illustrator CS2"
;
}


and ofcourse there's code for the other 8 buttons too, but it's pretty much the same...

I hope someone is willing to help, I have been stuck with this for a few days now, but I can't find anything that would help me out, or am looking on the wrong spots.

Thanks!

BlurFilter & Blendmode
Hi,

I have a nice blur function which gradually blurs a movie clip.

I also have a blendmode on this mc.

When activating the blur function the overlay blendmode is removed?

Is this a common issue with filters and blendmodes?

How can I target a certain element in my mc with a overlayblend mode when blurring it?

Thanks.

BlendMode Problem
hey all, i've gor a small problem. I've got a gallery that is loading images dynamically through a MovieClipLoader. On my onLoadInit function i'm assigning a blendMode to the image. My problem is that it works fine when the url of the html page is like "http://mywebsite.com" but when i wirte it like "http://www.mywebsite.com" the images load correctly but the blendMode is not applied! Just by adding the "www" to the URL. Is it the way the MovieClipLoader loads data?

Anyone knows something about this? Thanks...

BlendMode Woes
I have a full screen background video and a menu on top of it with BlendMode issues.

The setup is structured like this:


ActionScript Code:
var menu:Sprite = new Sprite();var menuBackground:Sprite = new Sprite();var menuText:Sprite = new Sprite();menuBackground.alpha = 0.8;menuBackground.blendMode = BlendMode.MULTIPLY;menu.addChild(menuBackground);menu.addChild(menuText);stage.addChild(menu);


That BlendMode, however, does not show. If I apply the MULTIPLY BlendMode to the entire menu Sprite, it works fine, but the text is of course multiplied, and that's not what I want. Having them contained together is ideal because this menu is masked and animated in, so, while I could setup a second mask and do that, I'd like to find out why this isn't working and see if there is a proper way to do this.

Can anyone help?

BlendMode Trouble (Flash 8)
I'm trying to develop an additive color demonstration using the Flash drawing API and having a bit of a problem. First of all, here's where I'm at: Additive RGB (There is a button in the demo to fetch the FLA, if anyone is so inclined).

The idea is that you can draw around with R, G, or B brushes (brush size is generated randomly each time you click a color), and where the lines intersect/overlap, the colors will combine: R + G = yellow; G + B = teal; R + B makes magenta; and R + G + B = white.

However, play with the example and you'll see the problem... The colors aren't adding together! I don't seem to be able to get the "Line" MC to use the "add" blendMode. I've tried everything I can think of (some of which is still in the FLA, commented out), but I'm having no luck.

I'm thinking (hoping) there must be something really simple I'm missing here. Anyone?

[F8] “personalized" Blendmode
Hello ! I have two rectangular movieclips, a red and a blue one, which look like two bands which are crossing. I would like that the crossing zone changes color. For this I have "BlendMode" but I would like to choose the color. How can I proceed? Thanks for answer

BlendMode To A Vector Object
I've looked around but can't seem to find how I would add a blend option to my object. For example:

code:
menuBar = new Sprite();
menuBar.graphics.beginFill(0xFFFFFF, 1);
menuBar.graphics.drawRect(0, 0, loadedContent.width, barHeight);
menuBar.graphics.endFill();
addChild(menuBar);
menuBar.blendMode = blendMode.MULTIPLY;//does not work


and i get this:
1119: Access of possibly undefined property MULTIPLY through a reference with static type String.


Thanks

BlendMode Problem (Flash 8)
I'm trying to develop an additive color demonstration using the Flash drawing API and having a bit of a problem. First of all, here's where I'm at: Additive RGB (There is a button in the demo to fetch the FLA, if anyone is so inclined).

The idea is that you can draw around with R, G, or B brushes (brush size is generated randomly each time you click a color), and where the lines intersect/overlap, the colors will combine: R + G = yellow; G + B = teal; R + B makes magenta; and R + G + B = white.

However, play with the example and you'll see the problem... The colors aren't adding together! I don't seem to be able to get the "Line" MC to use the "add" blendMode. I've tried everything I can think of (some of which is still in the FLA, commented out), but I'm having no luck.

I'm thinking (hoping) there must be something really simple I'm missing here. Anyone?

CacheAsBitmap Cancels Out BlendMode?
Hi all,
I have a movieClip "myMC" with blendMode set to "multiply". nice effect, no prob.

Now I want to use a gradient mask to do a top-do-bottom reveal of this movieClip. As soon as I set myMC.cacheAsBitmap = true; the blend mode ceases to exist - uh oh!

Anyone know if and how it's possible to use a gradient mask on a MovieClip with a blend mode?

Sample code is below. Thanks in advance for any help!


Code:
// myMC is a movieClip on the stage.
// mask is also a movieClip on the stage.

myMC.blendMode = "multiply";


// The problem starts here. As soon as cacheAsBitmap is set to true,
// the blend mode effect disappears

myMC.cacheAsBitmap = true;



/*
mask.cacheAsBitmap = true;
myMC.setMask(mask);
*/

“personalized" Blendmode
Hello I have two rectangular movieclips, a red and a blue one, which look like two bands which are crossing. I would like that the crossing zone changes color. For this I have "BlendMode" but I would like to choose the color. How can I proceed?
Have a good day , Jraf

Filter Clears BlendMode
I need to tween a blur filter for my MovieClip.
The tween is fine, I'm using Fuse.

Inside the MovieClip I have 2 MovieClips.
One of these MovieClips have an "overlay" blendMode.

My problem is that the blur on the parent movieclip is deleting the blendmode on the MovieClip inside it.

Is there a way I can work around this?


Code:
import flash.filters.BlurFilter;
import com.mosesSupposes.fuse.*;

myMc.img.blendMode = "overlay";

ZigoEngine.register(Fuse,PennerEasing,FuseFMP);
blur = new BlurFilter(20, 20, 1);
myMc.filters = [ blur ];

myMc.onRollOver = function() {
var f:Fuse = new Fuse();
f.push({target:this,Blur_blur:0,time:.2,ease:"easeOutQuad"});
f.start();
}
myMc.onRollOut = function() {
var f:Fuse = new Fuse();
f.push({target:this,Blur_blur:20,time:.2,ease:"easeOutQuad"});
f.start();
}

Target Of BlendMode.OVERLAY
I'm trying to make an overlay target only a specific displayObject. I understand it natively has to do with depths, however controlling depths to direct the targeting of the blendMode isn't an option. Is there a way to control what displayobject the blend mode effects?

BlendMode For Graphics Layer?
This is a longshot, but I figured I'd ask: anyone know of a way to apply a BlendMode to the graphics layer (property) of a Sprite? It's not directly possible since the Graphics class is not a DisplayObject and has no blendMode property to manipulate.

In addition, altering the blendMode of a Sprite seems to have no effect on its graphics layer.

I'm not gonna hold my breath on this one, but if anyone here knows a clever way to emulate such an effect, I'm all ears.

For those who are curious why I'm asking, I'm using the drawing API to draw lines that are connecting two things on my stage. I don't want to use any garish colors, and any harmonious colors that I might use have a tendency to fade into the background at certain points - too dark or too light - so they're not visible enough)

Filter Clears BlendMode
I have tested this bug without Fuse and it seems to be a general Flash issue.
Possibly a bug?

I tried to tween a blur filter for my MovieClip.
Inside my MovieClip I have 2 MovieClips.
One of these MovieClips (img) has an "overlay" blendMode.
There is a textfield in this same MovieClip (img).

When I rollover the main MovieClip, I want it to tween a blur in and then onRollOut, tween to no blur.

The problem is that the blur on the parent MovieClip is deleting the blendMode on the MovieClip inside it.

Is there a way I can work around this?
I have tried every way I could think of and it seems the Fuse (or perhaps just Flash in general) is designed to clear the blendMode?

I thought I could at least place the BlendMode on the MovieClip when the blur had stopped, but for some reason it wont work. Only if I delete the filter, will it show the overlay.

That's obviously pointless though as I still have 2 issues:

1. The blendMode is lost during the blur animation.
2. The TextField goes crazy during the blur animation.

:x man this is killing me. I can't believe it won't work.

I've created an example FLA to show the above issues.
It's on as.org forums here









Attach Code

import com.mosesSupposes.fuse.*;
myMc.img.blendMode = "overlay";
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);

myMc.onRollOver = function() {
var f:Fuse = new Fuse();
f.push({target:this,Blur_blur:20,time:.4,ease:"easeOutQuad"});
f.start();
}
myMc.onRollOut = function() {
var f:Fuse = new Fuse();
f.push({target:this,Blur_blur:0,time:.4,ease:"easeOutQuad", func:animFin, scope:this});
f.start();
}
function animFin():Void {
//this.img.blendMode = "overlay"; // (doesn't work anyway)
this.filters = null;
}

























Edited: 11/29/2007 at 06:52:50 PM by seanlailvaux

Make A BlendMode Permanent?
I have a Sprite with it's blendMode set to "LAYER", I'll call this "paper". I add a solid circle to the paper sprite with a blend mode of "ERASE" in order to make it look like the paper had a hole punched in it.

This works fine except when I start to add lots of holes, the performance slows down because I have many sprites layered on each other all effecting the paper beneath it (and probably each other as well if they overlap).

So is there a way to apply the blend mode so I can get rid of the hole after it effects the bitmap of the paper?

Thanks.

BlendMode On External Jpegs
Hello,

I'm quite new to flash 8, so sorry if I'm doing something stupid. I want to load in external jpegs then change the blendMode. However I can't get it to change the loaded images.


Here a bit of the code:

this.createEmptyMovieClip("mynewclip_mc", 1);
mynewclip_mc.loadMovie("http://rosscairns.com/welcome2.jpg", 1);
mynewclip_mc.blendMode = "add";

Help would be much appreciated!
Ross

Problem Of Alpha Blendmode And A Possible Solution
Hello everyboby

I encountered a problem with Alpha blendmode which gives a vertical, 1-pixel broad stripe on the right side of any clip it applies on, considered has an "alpha=0" stripe, that is masking the backgroung.

The "solution" I found is to load the inverted image in the clip and to use the blendmode "erase" instead of "alpha", which gives the same result without the stripe (provided that one can invert the image)

Does anybody has another solution?

BlendMode.Layer And MovieClip.alpha
Make the background of your flash file black.

Create a movie clip and set it's blend mode to layer. Then set it's alpha to 0.3.

Add a bunch of child movie clips each with a green circle drawn in it.

You SHOULD see:
a transparent green circle on top of a black background

you DO see:
a very bright white circle with a tint of green

Try the attached code. (Just paste it into a new flash file with actionscript 3) Drawing 22 green circle works fine. Drawing 23 green circles completely changes the result. Ideas for workarounds on this issue? Thanks, andrew.









Attach Code

var backMC = new MovieClip();
backMC.blendMode = BlendMode.LAYER;
backMC.graphics.beginFill(0x000000);
backMC.graphics.drawRect(0,0,400,400);
backMC.graphics.endFill();
stage.addChild(backMC);

var alphaMC = new MovieClip();
alphaMC.blendMode = BlendMode.LAYER;
for (var i=0;i<23;i++)
{
var lineMC = new MovieClip();
lineMC.graphics.lineStyle(50, 0x00ff00);
lineMC.graphics.moveTo(200,200);
lineMC.graphics.lineTo(201,201);
alphaMC.addChild(lineMC);
}
alphaMC.alpha = 0.3;
stage.addChild(alphaMC);

External Images/movies And BlendMode
Has anyone had any success with setting blendModes to external movies or images? More specifically, I have an external image loading into a MC on the stage and cannot add myMc.blendMode="lighten". Any help?

Passing BlendMode To Draw Method
I couldn't find any examples of how to pass a blendMode of a clip to a draw method. Can someone help me out?

I tried passing only the String, i.e: "add" , but that didn't work. "Help" says it accepts an object, but I guess it has to get an Object typed var.

I even tried to create a typed variable foo:Object and assign it to "add", but that didn't work either.

I'm going to search around in the interim, and see if I can find out anything from different places.

Thanks anyone.

Bitmapdata Draw Cannt Set Erase Blendmode
hello

i have found the problem of bitmapdata draw a bitmapdata with blendmode erase

here is code


PHP Code:



import flash.display.Bitmap;  
import flash.display.BitmapData;  
import flash.display.Shape;  
import flash.display.BlendMode;  
  
var dst1:BitmapData = new BitmapData(100,100, true, 0xFF000000);  
var dst2:BitmapData = dst1.clone();  
  
var src:BitmapData = new BitmapData(100,100, true, 0);  
var shape:Shape = new Shape();  
shape.graphics.beginFill(0xcc);  
shape.graphics.drawCircle(50,50,50);  
shape.graphics.endFill();  
  
src.draw( shape );  
  
dst1.draw( shape, null, null, BlendMode.ERASE );  // erase
dst2.draw( src, null, null, BlendMode.ERASE );   // NO erase
  
var bmp1:Bitmap = new Bitmap(dst1);  
var bmp2:Bitmap = new Bitmap(dst2);  
bmp2.x = 100;  
  
addChild(bmp1);
addChild(bmp2);




you can copy it directly in flashcs3 and test movie.

i don't know why it is happend. is that a bug?

i looking for the document of BlendMode.ERASE.
i don't understand what is the relation with BlendMode.LAYER if used ERASE or ALPHA, but others not.

Setting BlendMode To Only Effect Object Inside Of A DisplayObjectContainer
I have a couple object inside of a DisplayObjectContainer (Sprite). Of these object, 1 is at the top of the display list and I want it to create a blendMode of OVERLAY on all the other objects inside of this DisplayObjectContainer... BUT I don't want it to effect anything outside of the DisplayObjectContainer. As is just setting it's blendmode effects everything on the stage that is below it in the DisplayList.

Does anyone know of a way to do this?

Flash MX TabIndex Only Working With Text Fields, Movies And Buttons Not Working :(
hey, has anyone heard of this, is it a known bug, or am i doing something wrong?

im using the following code to tab index a page, with text fields, buttons and movies that i would like to highlight to the visitor.

arrTabIndex = new Array("butAddress", "movEmail", "txtCC", "txtTelephoneNumber", "txtMobileNumber", "txtSubject", "txtSubject", "txtRealName", "txtBody");

for (var Count = 0; Count < arrTabIndex.length; Count++) {
eval(arrTabIndex[Count]).tabIndex = Count;
//eval(arrTabIndex[Count]).tabEnabled = 1;
//eval(arrTabIndex[Count])._focusrect = 1;
}

my problem is, that if i include movie clips or buttons, the first in the series does focus and show the colored square but the tab key does not move the focus to the next object.
if i only include text fields, the tab key works as normal
is this a bug, or am i doing something wrong?

many thanks, in advance
clive

LoadMovie - Working In Debug Mode, Not Working Otherwise
Hello,

I have a main swf, which must load other 2 swfs (PHP data involved).
I made it work in debug mode, but in normal mode, a movie is not loading at all. What should I check to find the problem?
(the paths are OK)

I would be really thankfull if someone could help soon.

Thanks

Site Working Perfectly In A Server, Not Working In Other
Hi
I have a strange problem with a site I've done recently. It works perfectly in one server, but the same files don't work properly in some other server(both servers are Linux). The site loads correctly and all, and it runs fine for a while, but after you have clicked the buttons of the menu for 5 o 6 times the buttons doesn't load anything anymore. The rest of the movie runs fine, it's only the buttons that are supposed to load the sections (external swfs) that just do nothing.
See it for yourself:

Here the site works as it should:
http://www.avanzasoluciones.es/celeste

Here the buttons stop working after a while:
http://www.limpiezasceleste.com

I'll be glad to answer any question you may have regarding the coding of the site or anything that may lead to a solution.
Thanks for your time

Contact Form Not Working In IE But Working In Mozilla
got a problem that I just can't figure out.
I have a feedback that was working fine. Key word "was".
I added a frame in the form MC to include a Thank You screen. But then it stopped sending in IE, but works in Mozilla.
I tried taking the extra frame out but still doesn't work in IE anymore.

any suggestions?
button

Code:
on (release) {
form.loadVariables("email.php", "POST");
}
script on the php page

Code:
<?php
$sendTo = "alvin@diggy.com.au";
$subject = "Gisler contact";
$headers = "From: " . $_POST["name"] ." <" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = "Phone:" . $_POST["phone"] ."
Country: " . $_POST["country"] ."
Message: ".$_POST["message"]." ";
mail($sendTo, $subject, $message, $headers);
?>

Fading Text Only Half-working (so It's Not Working At All)
Here's one for ya...I'm making some fading text. I made a movie clip of the text and did the alpha tweening and all that, and when I play the clip on-stage, it works perfectily. However, when I run a movie test, the text does not fade in but rather just suddenly appears. This is also the condition when the graphic is loaded onto a webpage. Has anyone else seen this happen before and can tell me why this is happening? Thanks.

Full Screen Tiling Working, But Not Working Right?
am using bitmapdata to make me a nice lil' background image, and it works great...until it's resized. Whats happening is it's creating a new bgHolder clip on the resize, NOT resizing the current empty clip "bgHolder"

Here's the code(taken from various posts)


import flash.display.BitmapData;
#include "mc_tween2.as"
Stage.align = "TL";
Stage.scaleMode = "noScale";
var myListener:Object = new Object();
myListener.onResize = function() {
createBG();
};
Stage.addListener(myListener);
var bgHolder:MovieClip = _root.createEmptyMovieClip("bgHolder", _root.getNextHighestDepth());
var BG_LINKAGE:String = "bg";
function createBG():Void {
var tile:BitmapData = BitmapData.loadBitmap(BG_LINKAGE);
with (bgHolder) {
beginBitmapFill(tile);
moveTo(0,0);
lineTo(Stage.width,0);
lineTo(Stage.width,Stage.height);
lineTo(0,Stage.height);
lineTo(0,0);
endFill();
}
}
createBG();

Working Locally - Not Working Online
Having a nightmare with this.

On my project I have made use of both named anchors and frame labels for the navigation - both of which work fine when testing locally, in all browsers.

Problem is, soon as I upload, the frame labels stop working in FireFox, and they only working on 2nd load in IE. Im publishing Player 6, using AS2. The named anchors work great, across the board.

Any ideas?

AS 2 Button Not Working Not Working Properly
I've got a problem with a button dynamically attached to an mc within an as 2 class script. This is the button code:


ActionScript Code:
this.mc.butt.onRelease = function(){          
            current=true;
            this._parent.checkFocus();
        }

this code is inside the class constructor while current is declared at the start of the class and set to false previously in the constructor. The mc is the movieclip attached to the class and butt is the button attached to that. checkFocus is called ok but i'm confused how cos the "this._parent" should reference the "mc" movieclip but this has not got a checkFocus method on it. If i use "this._parent._parent" however, which should be correct, it does not work. I don't know what's up there. Anyway, checkFocus is here:

ActionScript Code:
public function  checkFocus(){
       
        for(var mcname:String in _root){
           
            if(_root[mcname] instanceof Layer){
               
                if(_root[mcname].focus==true){
                    //_root[mcname].gainFocus(20);
                    _root[mcname].loseFocus(20);
                } else {
                   
                    if(_root[mcname].current==true){
                        trace("waaahhhhh");
                        _root[mcname].gainFocus(20);
                    }      
                }
            }   
        }
    }


the aim of this code is to unfocus the Layer object (this is the name of the class) currently in focus, denoted by its focus attribute being true, and focus the new Layer object that has been clicked on - denoted by its current attribute being true. The currently focused layer is unfocused ok, but the new layer is not focused because, it seems, the change in the current attribute has not happened - there is no waaaaaahhhh coming up! I think this is because i am not reference it properly from within the button event. How can i reference properly from within the button? I've tried using _target and targetPath() but i'm not getting anywhere. I'm pretty sure this is the problem cos things work fine when i declare button events from outside the class, inside the fla. But i'd much rather do things dynamically within the calss if possible. Anyone got any ideas? I've been staring tooooo long at this.

Rollover Working But Rollout Not Working?
i have attached my small fla...

basically i have 5 buttons, each with a rollover and a rollout statement.

when the buttons are rolled over, they tween in scale.

when the buttons are rolled out they are supposed to tween return to normal scale - but for some reason they do not tween, they just pop straigh back into normal size....

any ideas???

AttachMovie Working, CreateEmptyMovieClip Not Working
Anyone have an idea just by quickly looking at this? I know it's taken out of context but I just can't see why it shouldn't work!


ActionScript Code:
// this line aperantly does not create the clips I need within a for loopvar photo:MovieClip = container.photoContainer.slide.createEmptyMovieClip("photo"+i, i+200);// while this line does, any idea why?var photo:MovieClip = container.photoContainer.slide.attachMovie("placeholder", "photo"+i, i+200);

Why Is My Php Email Form Not Working Here, But Working Elsewhere?
Hey everyone,

I wonder if you might be able to answer what is potentially a stupid question..

On this site I created a php email contact form and it's working fine: http://japanese-acupuncture.110mb.com/main.html

The contact form is in the clinic info tab on the side bar.

I've just set up a new site, and I copied the movie clip I used for the above site straight into the new one before adjusting how it looks to fit the layout of the new site. I'm going to use it in two places, and I know that I'll need to duplicate the movie clip for that. The site it's up on doesn't support sendmail, but I'm not worried about that yet.

What I can't figure out is why my text fields no longer let me input text, even though the movieclip is exactly the same as on the above site. The new site address is here: http://www.users.on.net/~davidgardner/

The contact form on the new site is on the 'register for a course now' tab, and on the 'contact us' page.

The only thing I can think of, is that the problem is caused by the contact form being buried in a series of movieclips.

If anyone has any idea what the problem is I'd be very appreciative!

Thanks,
David

Sound Effect Working Fine In Stanalone Movie Not Working As Part Of Loaded Movie
I have loaded in a movie via a loadMovie method of a movie clip.

In the loaded movie there is a sound effect generated in script via a sound object that works great when played in a standalone version of the loaded movie, but when I load it into the main movie the sound effect will not play.

Anyone any ideas?

I Have Been Working On It For A Week But It Still Not Working
I have this code in the 1st frame::


function mover (velocity, stopper) {
leaderX = _root.spot._x;
leaderY = _root.spot._y;
if (user._x != leaderX || user._y != leaderY) {
deltaX = _root.user._x-leaderX;
deltaY = _root.user._y-leaderY;
dist = math.sqrt((deltaX*deltaX)+(deltaY*deltaY));

_root.user.speed = velocity - stopper;
moveX = _root.user.speed*(deltaX/dist);
moveY = _root.user.speed*(deltaY/dist);
if (_root.user.speed>=dist) {
_root.user.stop();
_root.user._x = leaderX;
_root.user._y = leaderY;
} else {
_root.user.play();
_root.user._x -= moveX;
_root.user._y -= moveY;
}
}
}

//code end

and a ball with these code::

onClipEvent (enterFrame) {
_root.mover(4, 0);
if (this.hitTest(_root.rightbound)) {
_root.rightbound.gotoAndStop(2);
} else {
_root.rightbound.gotoAndStop(1);
}
if (this.hitTest(_root.rightbound)) {
_root.mover(4, 4);
}
}

//code end

and an empty movie clip call spot with this code::

onClipEvent (mouseDown) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}

//code end

I just want the ball to move where ever I click but not to move over or hit the object. I have an square call "rightbound" with 2 frame different in color and test a script. When the ball hit the square , the color of a square does change(frame 2) but the ball still keep going. The question is how would I make it stop when its hit the square?

Strange- Working In V5 Not Working In V6
look in attached mx file
there is simple roll over menu
why working when export like v5 and not workin when like v6
i have one button and one mc subf
on (rollOver) {
_root.subf.gotoAndStop(2);
}

subf movie has 3 frames first and last are empty
midlle has my menu

SendAndLoad Working/Not Working
I have a sendAndLoad connecting to a separate server that works when in testing mode, but not when uploaded to the web. When I change it from a sendAndLoad to just a send, it works.

sendAndLoad in testing mode - WORKS
sendAndLoad online - DOES NOT WORK
send online - WORKS

This seems strange to me. If anything I would think it wouldn't work in the testing mode. Does anyone know what is going on?

Thanks.

Working In Firefox, Not Working In IE 7
Hi,

just basic code. I have an enter page, which includes a flash movie. In flash there's a button, which calls a Javascript, which is in enter page and it opens a new window. Basic stuff. But why does it work in Firefox, but not in IE 7?

Here's the code:

Flash:

function openPopUp()
{

getURL("javascript:Launch('full-screen.html')");
} // End of the function


enterWebsite.bt.onRelease = function ()
{
openPopUp();
};



HTML / Javascript:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Launch(page) {
OpenWin = this.open(page, "", "toolbar=no,menubar=no,location=yes,scrollbars=no,resizable=yes,width=screen.width,height=screen.height");
}
// End -->
</SCRIPT>

THX for your help

LoadClip Working And Not Working
I have a ver simple loadClip that loads a picture. I noticed that if I execute the same SWF several times, sometimes the loadClip works, sometimes it doesn't without giving me any sort of error message. Here's the code.







Attach Code

var mcLoader:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
mcLoader.addListener(mclListener);
mclListener.onLoadStart = function(mc:MovieClip)
{
// Show ProgressBar
};

mclListener.onLoadError = function(mc:MovieClip, errorCode:String)
{
mx.controls.Alert.show("Error!", "ERROR", Alert.OK, null, null, "Warning", Alert.OK);
}

mclListener.onLoadProgress = function(loadedBytes:Number, totalBytes:Number)
{
// Update ProgressBar
}

mclListener.onLoadComplete = function(mc:MovieClip)
{
// ProgressBar disappears
}

mclListener.onLoadInit = function(mc:MovieClip)
{
mc._x = 0;
mc._y = 0;
mc._width = Stage.width;
mc._height = Stage.height;
mc._alpha = 100;
}
mcLoader.loadClip("image.jpg", _root.myMC);

LoadClip Working And Not Working
I have a ver simple loadClip that loads a picture. I noticed that if I execute the same SWF several times, sometimes the loadClip works, sometimes it doesn't without giving me any sort of error message. Here's the code.







Attach Code

var mcLoader:MovieClipLoader = new MovieClipLoader();
var mclListener:Object = new Object();
mcLoader.addListener(mclListener);
mclListener.onLoadStart = function(mc:MovieClip)
{
// Show ProgressBar
};

mclListener.onLoadError = function(mc:MovieClip, errorCode:String)
{
mx.controls.Alert.show("Error!", "ERROR", Alert.OK, null, null, "Warning", Alert.OK);
}

mclListener.onLoadProgress = function(loadedBytes:Number, totalBytes:Number)
{
// Update ProgressBar
}

mclListener.onLoadComplete = function(mc:MovieClip)
{
// ProgressBar disappears
}

mclListener.onLoadInit = function(mc:MovieClip)
{
mc._x = 0;
mc._y = 0;
mc._width = Stage.width;
mc._height = Stage.height;
mc._alpha = 100;
}
mcLoader.loadClip("image.jpg", _root.myMC);

Timer Working But Not Working
Hello all.

I have a timer in an include file called A5SecTimer.as

Code:
//A FIVE SECOND TIMER THAT GOES TO THE NEXT FRAME
function A5SecTimer(){
setTimeout(this, "gotoAndPlay", 5000, nextFrame());
}
A5SecTimer();

In my movie i reference the file in frame one of my movie as such
#include "A5SecTimer.as"
This works great, goes to the next frame but, when I include a new timer in the second frame
Code:
//A TWO SECOND TIMER THAT GOES TO THE NEXT FRAME
function A2SecTimer(){
setTimeout(this, "gotoAndStop", 2000, nextFrame());
}
A2SecTimer();
The movie skips the second frame and goes to the third.

This is what I'm trying to accomplish:
-Fade in movie clip while movie is paused for 5 seconds
-go to the next frame
-Fade the movie clip while movie is paused for 5 seconds
-go to next frame and stop.

I hope this isn't too confusing to understand.

BOOYAKASHA!

-Atris

Preload Is Working And Not Working
hey there,

i made the tutorial you can find here but when i published my website on the web, it takes some seconds before you see the preloader... Normally you shouldn't see a white screen (i'm talking about the popup-window here...) but immediately the preloader. So, the preloader is working, but not immediately. How can I fix this?
Thanks...

lampe
ps: the website is not finished yet, duuh...

Mp3 Player, Working And Not Working
hey guys, i have a question. My mp3 i built with lees tutorial works ok. But i have looked at various posts and modified it to have a volume bar, previous button and a playlist. The problem is that when i click on previously button, the next song plays and not the previous one. When i click on the song in the list, again the next song plays and not the one i click. But that problem occurs when i click on the song again or if i am currently on the first song and i click to listen to the third song. Third problem is the volume, It keeps reseting to its original max volume when a new song is played. If anyone can help it will be great, if not thats ok.

Code:

//Setup sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(100);

//Array of songs
var sa:Array = new Array();
var display:Array=new Array();

//Currently playing song
var cps:Number=-1;

//position of music
var pos:Number;

//Load the Songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
   var nodes:Array = this.firstChild.childNodes;
   for(var i=0;i<nodes.length;i++)
   {
      sa.push(nodes[i].attributes.url);
      display.push(nodes[i].attributes.display);
   }
   playSong();
}

xml.load("songs.xml");

//play mp3 file
function playSong():Void
{
   s= new Sound();
   s.onSoundComplete = playSong;
   preloadloadBar._xscale = 1;
   if(cps==sa.length-1)
   {
      cps=0;
      s.loadSound(sa[cps],true);
   }
   else
   {
      s.loadSound(sa[++cps],true);
   }
   pause.gotoAndStop("pause");
}
   
//pauses the music
function pauseIt():Void
{
   pos=s.position;
   s.stop();
}

function unPauseIt():Void
{
   s.start(pos/1000);
}

//Music Controls
//play pause toggle
pause.onRollOver = function()
{
   if(this._currentframe==1)this.gotoAndStop("pauseover");
   else this.gotoAndStop("playover");
}

pause.onRollOut = pause.onReleaseOutside = function()
{
   if(this._currentframe==10)this.gotoAndStop("pause");
   else this.gotoAndStop("play");
}

pause.onRelease = function()
{
   if(this._currentframe==10)
   {
      this.gotoAndStop("playover");
      this._parent.pauseIt();
   }
   else
   {
      this.gotoAndStop("pauseover");
      this._parent.unPauseIt();
   }
}



//next button
next.onRollOver = function()
{
   this.gotoAndStop("nextover");
}

next.onRollOut = next.onReleaseOutside=function()
{
   this.gotoAndStop("next");
}

next.onRelease = function()
{
   this._parent.playSong();
}


//Display Time.
function setTime() {
var totalSeconds:Number = s.duration/1000;
var s_seconds:Number = s.position/1000;

var minutes:Number = Math.floor(totalSeconds/60);
var seconds = Math.floor(totalSeconds)%60;
var e_minutes:Number = Math.floor(s_seconds/60);
var e_seconds = Math.floor(s_seconds%60);

//format time
if (seconds<10) {
seconds = "0"+seconds;
}
if (e_seconds<10) {
e_seconds = "0"+e_seconds;
}

timeDisplay.tt.text = minutes+":"+seconds;
timeDisplay.et.text = e_minutes+":"+e_seconds;
}
var timeRoutine = setInterval(setTime, 100);


   



//next
next.onRelease = function() {
s.stop();
s = new Sound();
this._parent.playSong();
setInterval(setTime, 100);
};

function playSong():Void {
s=new Sound();
s.onSoundComplete=playSong;

if (cps == sa.length-1) {
cps = 0;
s.loadSound(sa[cps], true);
displayTags();
} else {
s.loadSound(sa[++cps], true);
displayTags();
}
}

//display ID3 tags
function displayTags() {
s.onID3 = function() {
display_Artist.text = " "+s.id3.artist+"
";
display_Song.text = (cps+1)+". "+s.id3.songname+"
";
};
}

   // initial x position fo the dragger
dragger._x = line_mc._x+line_mc._width-2;

// volume slider release function
dragger.onRelease = dragger.onReleaseOutside =  function() {
   this.stopDrag();
   delete dragger.onEnterFrame;
}

// volume slider on press and drag function
dragger.onPress = function() {
   this.startDrag(false, line_mc._x, this._y, line_mc._width+line_mc._x-2, this._y);
   dragger.onEnterFrame = function() {
      var Volume:Number= dragger._x-line_mc._x;
      s.setVolume(Volume);
   }
}

   //-----------------------------------------------------------------------Preloadbar
preloadBar.onEnterFrame = function() {
   var t:Number = Math.round(theTime/1000);
   this._xscale = (s.getBytesLoaded()/s.getBytesTotal())*100;
   sTotal.text =s.duration/1000;
};
//----------------------------------------------------------- ---------Progress bar
function soundProgress() {
   progressBar._xscale = (s.position/s.duration)*100;
   sProgress.text = ((_root._xmouse - preloadBar._x)/preloadBar._width)*10;
};

//prev button
prev.onRollOver = function()
{
   this.gotoAndStop("prevOver");
}

prev.onRollOut = prev.onReleaseOutside=function()
{
   this.gotoAndStop("prev");
}

prev.onRelease = function()
{
   this._parent.playSong();
}

function prevSong():Void {
   s = new Sound();
   s.onSoundComplete = playSong;
   if (cps == 0) {
      cps = songArray.length - 1;
      s.loadSound(songArray[cps].earl, true);
   } else {
      s.loadSound(songArray[--cps].earl, true);
   }
   trackInfo.text = songArray[cps].artist + " - " + songArray[cps].track;
   playPause.gotoAndStop("pause");
}

formatTime = function (millisecs){
   var secs = Math.floor(millisecs/1000);
   var mins = Math.floor(secs/60);
   secs %= 60;
   if (secs < 10) secs = "0"+ secs;
   if (mins < 10) mins = "0"+ mins;
   return mins +":"+ secs;   
}








var alist:XML = new XML();
alist.ignoreWhite = true;

alist.onLoad = function(){
   var songs:Array = this.firstChild.childNodes;
   for(i=0;i<songs.length;i++){
      audiolist.addItem(songs[i].attributes.display,songs[i].attributes.url);
   }
   
   playSong.play(audiolist.getItem(0).data);
   audiolist.selectedIndex = 0;
}

var aulist:Object = new Object();

aulist.change = function(){
   playSong(audiolist.getItemAt(audiolist.selectedIndex).data);
}

audiolist.addEventListener("change",aulist);

alist.load("songs.xml");

If/else Statment Working But Not Working?
Hi,

I have tree component witch is populating the data grid component. I have 9 if/else statments to see if particular file is loaded to change datagrid heder but it changes only on last if/else statment.

Here is my code for tree listener

Code:

var myTreeL:Object = new Object();
var ukupni:String = ("poredakRally2.csv");
var ukupni1:String = ("poredakRally.csv");
var ukupni2:String = ("poredak2002.csv");
var ukupni3:String = ("poredak200.csv");
var ukupni4:String = ("poredakGT1.csv");
var ukupni5:String = ("poredakGT2.csv");
var ukupni6:String = ("poredakGT.csv");
var ukupni7:String = ("poredakC2.csv");
var ukupni8:String = ("poredakC.csv");
myTreeL.change = function(){
   var item = myTree.selectedItem;
   var earl = item.attributes.url;
   if(earl){
      raceResultsCSV.load(earl);
   }
   else{
      trace("kliknuto je na folder");
   }
   if(earl==ukupni){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni1){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni2){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni3){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni4){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni5){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni6){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni7){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
   if(earl==ukupni8){
      myDG.getColumnAt(5).headerText = "Vrijeme";
      myDG.getColumnAt(6).headerText = "Voznja";
      myDG.getColumnAt(7).headerText = "Najbolji krug";
      myDG.getColumnAt(8).headerText = "Najbolja V.";
   }else{
      myDG.getColumnAt(5).headerText = "Diff";
      myDG.getColumnAt(6).headerText = "Gap";
      myDG.getColumnAt(7).headerText = "Ukupno Vrijeme";
      myDG.getColumnAt(8).headerText = "Klub";
   }
}

myTree.addEventListener("change",myTreeL);

How could I get this thing working properly?

Or is there different aproach to solve my problem?

Thanks

Working Area? Not The Stage Size....but The Working Area Lol
You know how there is a little white square that represents the stage size? And then, if you zoom out all the way, you have only a certain amount of working area and stuff dissapears. Is there a way to make this area larger? I have huge movie clips I need to work with...thanks!

GetURL Working In Flash Player 8 / Not Working In Player 9
Here I have the portfolio system I'm working at:
http://www.vamapaull.dxwebs.com/portfolio.html

when you click on the big image it should open a URL in a new window
When I test it on my computer is working fine(Flash Player 8), but when I test it in Firefox or IE (Flash Player 9) is now opening any URL... I think is some thing about the Flash Player 8 and Flash Player 9 compatibility... or some thing...
I don't know how to correct this problem... I need my portfolio working on Flash Player 8 and Flash Player 9 because now alot of users have Flash Player 9 on computers. :roll:

Any idea how to fix this issue? :?

XML NOT WORKING
okay this should be simple it seems like i did this before
but damn
i can't get this working

here is the example

http://users.pandora.be/dreams/guest.swf
so this works fine

and this is the same damn thing but loaded into another
movie clip

http://users.pandora.be/dreams/loader.swf
as you see it doesn't display the text

the fla is here
http://users.pandora.be/dreams/guest.fla

i'm just loading the xml data into the guest.swf basicly
i even created a new object
wich also didn't work
you'll see in the fla


if someone could tell me what i'm forgetting here
would be great

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