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








Please...anyone...I'm Asking Nicely


OK...it's supposed to be a simple task. I have a paint brush(a movie clip). I have a "pallette"(buttons) when I click on the pallette with the paint brush the tip of the brush(a button)is supposed to turn the color of the pallette piece. Then it's supposed to disperse the color to the rest of the book.

Sounds simple enough

Fat Chance.... The tip turns black and that's where it ends...it won't even go fill the colors in the rest of the book. Now it wouldn't be that bad with out the colored tip...but it would be just spiffy for the tip to turn color too....

Come on folks...anyone up for the challenge to lend me a hand with this beast?!?!?!?




FlashKit > Flash Help > Flash MX
Posted on: 12-05-2002, 11:25 PM


View Complete Forum Thread with Replies

Sponsored Links:

SharedObject Not Playing Nicely
Shared objects have always caused me to overheat a little because it seems to me that they work sometimes but not always.

At the moment I'm using ActionScript to create a sharedObject with one property and placing a number value at that property.

Code:
var my_so:SharedObject = SharedObject.getLocal("sohistory", "/");
my_so.data.pageID = page;
I'm using .flush() to save it immediately then I display the number in a text field.

Code:
my_so.flush();
receiver_txt.text = my_so.data.pageID;
So far, so good.

I have another movie with actionscript that retreives the value of the property and displays it in a text field. It's a bit tricky and uses a function to decide whether the last saved value has changed and then updates a text field

Code:
function checkPage() {
var my_so:SharedObject = SharedObject.getLocal("sohistory", "/");
newPage = my_so.data.pageID;
if(newPage != oldPage)
_root.changeNav(newPage);

oldPage = newPage;
}
The problem I'm having is that it only updates for about 15 or 16 changes on Firefox and about 5 or 6 changes on IE. At the moment I'm testing with Windows XP.

I think it must have something to do with the method I'm using to test for change and there must be a listener object I can use of some sort.

Any ideas?

Thanks,

View Replies !    View Related
How Do I Have Nicely Formatted Text In A Scroller?
Hi All,

I have a dynamic text box with the scroller component tagged onto the side of it...everything works fine...

EXCEPT

on the stage i can have really nice formatted text with different colours and bold font..it really is nice

BUT

when i preview it (ctrl > enter), it looks like excrement!! its not a fancy font...Arial Narrow??

Why is this happening??

Appreciate the help

Cheers

View Replies !    View Related
Helpa Me Popups How Are They Made Nicely ?
hey
i know this probably was answered before, (i actually saw and went ot a thread like this but it didnt help me)
but i have a nice question

in your html page, you can add javascript to open a window thats totally customized...eg.size, toolbars, etc...
how would i do that in flash?

is there some actionscripting of its own, or some crazy javascript thing that flash understands

thanks all

(ps, im usin flash 5)

View Replies !    View Related
How To Make This: Random Transitions Nicely Done.
I look to this site for inspiration and help. I look to other sites for design inspirations, but I found this neat little annimation that I would love to see the fla for...anyone have any ideas on where I can see an fla of similar nature. http://www.templatemonster.com/show....g2=&order=date

Thanks.

View Replies !    View Related
Javascript Doesn't Play Nicely
Hi,

I have a javascript menu and a flash movie on the one html page, and they aren't playing nicely. Flash overlaps the javascript drop-down menu. Anyone know how to fix it? I've searched over the web and found people with the same problem, but no solution.

cheers,
Minnn

View Replies !    View Related
Fitting Flash To Fit In Webpage Nicely
Hi,

This is a follow up after I had some great help from 'pellepiano'..

Bascially Ive attached a file so it might help people in the future and someone might be able to help me.

The flash file when published to HTML will stretch to the size of the screen keeping the main body the same pixels centered (after you set the page margin properties on dreamweaver to 0).

It has two main sets of code to do this, one to set up the initial page to fit the browser without stretching the images in the page, and the other that will stretch Instances to what you set them to....... I am looking to set the white bar to the bottom of the screen and the blue logo to the top left of screen when in IE?????? anybody help me!???

Thanks
Jp

View Replies !    View Related
Movie Clips Not Behaving Nicely
These movie clips are not behaving nicely (see attached files).

The first thing that's strange is that the rollOver/rollOut affects the last box no matter which box you roll over.

The second strange thing is that frame 5 of the movie clip doesn't ever appear, at least the text ("10" in this case) is never visible.

Any suggestions?

Thanks,
Mathminded

View Replies !    View Related
Could You Respond Nicely, Please, About This Script. It Doesn't Work.
I am trying to insert data into a DB, but it won't enter. Here is what I have for the AS:

on(release) {

if(new_player_name ne '')
{
gotoAndPlay(2);
new_player_name.loadVariables("create_player.php", "POST");
status = "Creating, please wait...";
}
else
{
status = "Enter a New Player Name";
}

}

And my PHP looks like this:

<?

include('../db/db_access.php');

$player_name = $_POST['new_player_name'];

mysql_query("insert into player set player_name='$player_name'");
$result = mysql_query("select player_id from player where player_name='$player_name'");
$player_id = mysql_result($result, 0, 'player_id');

$result = mysql_query("insert into old_position (player_id, oldx_tile, oldy_tile, on_map) values ('$player_id', '7', '7', '1')");

print "status = Created&checklog=1";

?>

What am I doing wrong? Also, I need to have it be Flash, it's the current player I have, sorry.

View Replies !    View Related
RemoveItemAt Datagrid Doesn T Work Nicely
hello everyone,
I post onthe good forum, sorry for the previous one at Flash CS3 .....

i ve a problem about my script that should show me entries of an xml file :

HTML Code:
<?xml version="1.0" encoding="utf-8" ?>
<videos>
<video name="motion 01" genre="motion" data="thumbs/motion01.jpg" />
<video name="motion 02" genre="abstrait" data="thumbs/motion02.jpg" />
<video name="motion 03" genre="art video" data="thumbs/motion03.jpg" />
<video name="motion 04" genre="motion" data="thumbs/motion04.jpg" />
<video name="motion 05" genre="abstrait" data="thumbs/motion05.jpg" />
<video name="motion 06" genre="art video" data="thumbs/motion06.jpg" />
<video name="motion 07" genre="motion" data="thumbs/motion07.jpg" />
</videos>
inside a dataGrid (myDataP1) versus their attributes "genre".
the loading in the dataGrid is ok, when i click to btSort with that script it's ok
HTML Code:
function monTri(evt:Event):void {
//myXML = new XML(evt.target.data);
var myDP = new DataProvider(myXML);
myDP.sortOn("genre");// classe les genres
if (myXML.video.(@genre=="motion")) {
for (var i:uint = 0; i < myDP.length; i++) {
myDP.removeItemAt(myXML.video.(@genre!=="motion"));
}
myDataP1.dataProvider = myDP;
}
}
btSort.addEventListener(MouseEvent.CLICK, monTri);
the problem happen when i want to click on a second button that should change entries of dataP1 with another @genre ...
HTML Code:
function monTri2(evt:Event):void {
//myXML = new XML(evt.target.data);
var myDP = new DataProvider(myXML);
myDP.sortOn("genre");
if (myXML.video.(@genre!=="abstrait")) {
for (var i:uint = 0; i < myDP.length; i++) {
myDP.removeItemAt(myXML.video.(@genre!=="abstrait"));
}
myDataP1.dataProvider = myDP;
}
}
btSort2.addEventListener(MouseEvent.CLICK, monTri2);
i m trying an other kind of script but this one can not remove Item that have !=motion ...
HTML Code:
function monTri3(evt:Event) {
var myDP = new DataProvider(myXML);
var myStyle:String = "motion";
for (var i:Number=0; i < myDP.length; i++) {
var item:XML = XML(myDP.getItemAt(i));
trace(item);
if (item.@genre !== myStyle) {
myDP.removeItemAt(i);
}
}
myDataP1.dataProvider = myDP;
}
btSort2.addEventListener(MouseEvent.CLICK, monTri2);

the last oner should work but it s not ... if anyone as an idea of what's going on it will be very helpfull.
Thanks you.

View Replies !    View Related
[CS3] How To Get A Grandchild Play Nicely With A Child? Plus, Other Questions
Ok so my lame attempt at humor may not make any sense... so here's the deal

I'm making a thumbnail grid (based on a tutorial) that feeds from an XML file and hence the grid is dynamically created. Each thumbnail has an event listener attached at runtime according to the XML data in order to add a child for the FULL image to display on top. But what I wanna add to this is to add a Movieclip child with a rollover animation to each thumbnail image on top. Here's a small illustration of what i'm trying to do (for those who didnt understand):



Here's the XML code:


Code:
<?xml version="1.0" encoding="utf-8"?>
<GALLERY COLUMNS="2" XPOSITION="30" YPOSITION="30" WIDTH="200" HEIGHT="94">
<IMAGE FULL="fullimages/1.png" THUMB="thumbs/1.png" CLIENT="SINCO" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/2.png" THUMB="thumbs/2.png" CLIENT="ARCH" DATE="01.02.2008" TYPE="POSTER/IDENTITY" />
<IMAGE FULL="fullimages/3.png" THUMB="thumbs/3.png" CLIENT="DSAF" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/4.png" THUMB="thumbs/4.png" CLIENT="KANCHO" DATE="01.02.2008" TYPE="POSTER" />
</GALLERY>
And here's the AS code

Code:
var columns:Number;
var my_x:Number;
var my_y:Number;
var my_thumb_width:Number;
var my_thumb_height:Number;
var my_images:XMLList;
var my_total:Number;

var container_mc:MovieClip;
var anim_mc:boxAnim = new boxAnim();

var x_counter:Number = 0;
var y_counter:Number = 0;

// ------ Stage Properties ------ \

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, stageResize);

// ------ URL Loader ------ \
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("gallery.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);

// ------ Process XML Data ------ \
function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);

columns = myXML.@COLUMNS;
my_x = myXML.@XPOSITION;
my_y = myXML.@YPOSITION;
my_thumb_width = myXML.@WIDTH;
my_thumb_height = myXML.@HEIGHT;
my_images = myXML.IMAGE;
my_total = my_images.length();

createContainer();
callThumbs();
}

// ------ Create Container MC ------ \
function createContainer():void{
container_mc = new MovieClip();
container_mc.x = my_x;
container_mc.y = my_y
addChild(container_mc);
addChild(anim_mc);

container_mc.addEventListener(MouseEvent.CLICK, callFull);
}

// ------ Call the thumbnails ------ \
function callThumbs():void{
for (var i:Number = 0; i < my_total; i++){
var thumb_url = my_images[i].@THUMB;
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);

thumb_loader.name = i;

thumb_loader.x = (my_thumb_width + 10) * x_counter;
thumb_loader.y = (my_thumb_height + 10) * y_counter;

if (x_counter+1 < columns){
x_counter++;
} else {
x_counter = 0;
y_counter ++;
}
}
}

// ------ Call the full image ------ \
function callFull(e:MouseEvent):void{
var full_loader:Loader = new Loader();
var full_url = my_images[e.target.name].@FULL;
full_loader.load(new URLRequest(full_url));
full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded);

container_mc.removeEventListener(MouseEvent.CLICK, callFull);
}

// ------ Place the thumbnails ------ \
function thumbLoaded(e:Event):void{
var my_thumb:Loader = Loader(e.target.loader);
container_mc.addChild(my_thumb);
}

// ------ Place the full image ------ \
function fullLoaded(e:Event):void{
var my_loader:Loader = Loader(e.target.loader);
addChild(my_loader);
my_loader.x = (stage.stageWidth - my_loader.width) / 2;
my_loader.y = (stage.stageHeight - my_loader.height) / 2;
my_loader.addEventListener(MouseEvent.CLICK, removeFull);
}

// ------ Remove the full image ------ \
function removeFull(e:MouseEvent):void{
var my_loader:Loader = Loader(e.currentTarget);
my_loader.unload();
removeChild(my_loader);

container_mc.addEventListener(MouseEvent.CLICK, callFull);
}

// ------ Stage resize ------ \
function stageResize(e:Event):void{
trace("Resize");
}
I'm also interested in making this thumbnail gallery fully resizable (hence, you'll see at the very bottom a function for the stageResize...) to make something like this:


But i have no idea how to get the grid dynamically adjusted when the Event.RESIZE event is called on the stage... hence, you'll notice the lame stageResize function i made only traces out a string of characters

If someone can give me a few tips on this i'd really appreciate it.

View Replies !    View Related
AS3 - How To Get A Grandchild Play Nicely With A Child? Plus, Other Questions
Ok so my lame attempt at humor may not make any sense... so here's the deal

I'm making a thumbnail grid (based on a tutorial) that feeds from an XML file and hence the grid is dynamically created. Each thumbnail has an event listener attached at runtime according to the XML data in order to add a child for the FULL image to display on top. But what I wanna add to this is to add a Movieclip child with a rollover animation to each thumbnail image on top. Here's a small illustration of what i'm trying to do (for those who didnt understand):



Here's the XML code:


Code:
<?xml version="1.0" encoding="utf-8"?>
<GALLERY COLUMNS="2" XPOSITION="30" YPOSITION="30" WIDTH="200" HEIGHT="94">
<IMAGE FULL="fullimages/1.png" THUMB="thumbs/1.png" CLIENT="SINCO" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/2.png" THUMB="thumbs/2.png" CLIENT="ARCH" DATE="01.02.2008" TYPE="POSTER/IDENTITY" />
<IMAGE FULL="fullimages/3.png" THUMB="thumbs/3.png" CLIENT="DSAF" DATE="01.02.2008" TYPE="IDENTITY" />
<IMAGE FULL="fullimages/4.png" THUMB="thumbs/4.png" CLIENT="KANCHO" DATE="01.02.2008" TYPE="POSTER" />
</GALLERY>
And here's the AS code

Code:
var columns:Number;
var my_x:Number;
var my_y:Number;
var my_thumb_width:Number;
var my_thumb_height:Number;
var my_images:XMLList;
var my_total:Number;

var container_mc:MovieClip;
var anim_mc:boxAnim = new boxAnim();

var x_counter:Number = 0;
var y_counter:Number = 0;

// ------ Stage Properties ------ \

stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.addEventListener(Event.RESIZE, stageResize);

// ------ URL Loader ------ \
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("gallery.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);

// ------ Process XML Data ------ \
function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);

columns = myXML.@COLUMNS;
my_x = myXML.@XPOSITION;
my_y = myXML.@YPOSITION;
my_thumb_width = myXML.@WIDTH;
my_thumb_height = myXML.@HEIGHT;
my_images = myXML.IMAGE;
my_total = my_images.length();

createContainer();
callThumbs();
}

// ------ Create Container MC ------ \
function createContainer():void{
container_mc = new MovieClip();
container_mc.x = my_x;
container_mc.y = my_y
addChild(container_mc);
addChild(anim_mc);

container_mc.addEventListener(MouseEvent.CLICK, callFull);
}

// ------ Call the thumbnails ------ \
function callThumbs():void{
for (var i:Number = 0; i < my_total; i++){
var thumb_url = my_images[i].@THUMB;
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);

thumb_loader.name = i;

thumb_loader.x = (my_thumb_width + 10) * x_counter;
thumb_loader.y = (my_thumb_height + 10) * y_counter;

if (x_counter+1 < columns){
x_counter++;
} else {
x_counter = 0;
y_counter ++;
}
}
}

// ------ Call the full image ------ \
function callFull(e:MouseEvent):void{
var full_loader:Loader = new Loader();
var full_url = my_images[e.target.name].@FULL;
full_loader.load(new URLRequest(full_url));
full_loader.contentLoaderInfo.addEventListener(Event.INIT, fullLoaded);

container_mc.removeEventListener(MouseEvent.CLICK, callFull);
}

// ------ Place the thumbnails ------ \
function thumbLoaded(e:Event):void{
var my_thumb:Loader = Loader(e.target.loader);
container_mc.addChild(my_thumb);
}

// ------ Place the full image ------ \
function fullLoaded(e:Event):void{
var my_loader:Loader = Loader(e.target.loader);
addChild(my_loader);
my_loader.x = (stage.stageWidth - my_loader.width) / 2;
my_loader.y = (stage.stageHeight - my_loader.height) / 2;
my_loader.addEventListener(MouseEvent.CLICK, removeFull);
}

// ------ Remove the full image ------ \
function removeFull(e:MouseEvent):void{
var my_loader:Loader = Loader(e.currentTarget);
my_loader.unload();
removeChild(my_loader);

container_mc.addEventListener(MouseEvent.CLICK, callFull);
}

// ------ Stage resize ------ \
function stageResize(e:Event):void{
trace("Resize");
}
I'm also interested in making this thumbnail gallery fully resizable (hence, you'll see at the very bottom a function for the stageResize...) to make something like this:


But i have no idea how to get the grid dynamically adjusted when the Event.RESIZE event is called on the stage... hence, you'll notice the lame stageResize function i made only traces out a string of characters

If someone can give me a few tips on this i'd really appreciate it.

View Replies !    View Related
Sharing, But Not Nicely - Shared Libraries And Duplicated Clips
i'm using dynamically shared libraries in my movie. currently i load the swf into its own library mc (located at _root.sharedLibrary) and ideally i would like to duplicate the clips and use them in the parent movie.

is there a way i can duplicate clips into a different movie clip other than their origin if the source mc's are loaded into a child clip?

i cannot attach the duplicated clips inside of any clip except the library mc. in the following example i'm trying to attach the mc from the shared to the _root level. it duplicates into _root.sharedLibrary instead:


Code:
//frame 1
createEmptyMovieClip("sharedLibrary", this.getNextHighestDepth());
sharedLibrary.loadMovie("sc_versa_shared.swf");

//frame 2
sharedLibrary.attachMovie("myIcon", "newIcon", this.getNextHighestDepth());
newIcon._x = 400;// does not work



much thanks,
jwt

View Replies !    View Related
Gallery Moves Forward Through Images Nicely, But Not When Going Back
Hi,

As you click on each button in this animation, a picture is shown like a gallery according to which button the user clicks on. When I click on a button to go to a picture, it follows through nicely when going forward, but if I want to go back the gallery doesn't reverse through the pictures, it just goes back to the beginning in frame 1 and then finds the picture.

I basically want to get the same effect as: http://www.deftones.com/5_2/site.html

Here is what I have done so far so you can see what i'm talking about: http://www.gamefantasy.co.uk/freeminds

On the first frame of each picture change animation I have put the following code: gotoAndPlay("home");

The last frame of each picture change animation has the following code: stop();

The following code is written for each button to go to the specific picture:

on (release)
{
gotoAndPlay("home");
}

Thanks a lot for your help.

View Replies !    View Related
Please "disappear" Nicely :)
Hello all!
I have a problem with my site and here goes:
- i have a main SWF (the index) with 5 buttons on it and 5 SWF's with the content for each button
- after clicking one button the SWF load's (with preloader and all) BUT after clicking another button, the SWF that is allready loaded instantly disappear and the next one take's its place and this happens with all the 5 SWF's.
Yes, all the content load's in a empty MovieClip but i wish so much that all the SWF's that load in the stage (index) will slowly disappear BEFORE the next one load's.
I see this on so meny sites and it look's so.... cool
Please help me to solve my problem or at least anyone give a link with a tutorial about my problem!
THANK YOU IN ADVANCE

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved