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








To Share Libraries Or Not To Share Libraries This Is The Problem


if i have a library of 77k does it deserve to have it shared all over a site if the elements in it r themselves
with small sizes about 6k each or it will bring problems more than saving time, plz give me your opinion




FlashKit > Flash Help > Flash ActionScript
Posted on: 04-17-2002, 01:02 PM


View Complete Forum Thread with Replies

Sponsored Links:

Experts? To Share Libraries Or Not To Share Libraries This Is The Problem
if i have a library of 77k, does it deserve to have it shared all over a site, if the elements in it r themselves
with small sizes about 6k each or it will bring problems more than saving time.
in fact i would like to know all the defects of using shared libraries to deside, plz give me your opinion as experts.


note: i think i wont edit this library frequently, but the site is gonna be realy big and using this elements in it over and over again.
thanks in advance

View Replies !    View Related
Share Libraries And Components (AS2)
Hi,

I have made a series of basic components; scroll bar, listbox, combo box... and am trying to manage skinning. What I would like to do is create a shared_library.swf which will house all of the elements that are used in the components (buttons, draggers...) and then access those shared mc's in the when the component is used.

I have no problem doing this outside the component realm but as soon as I convert to a component it stops importing the objects.

Any thoughts?

Much much thanks,
John

View Replies !    View Related
Dynamic Libraries(shared Libraries)
Hi,

I'm a total AS3 noob, so bare with my learning curve please.

I would be interested to load multiple swf files in the main movie and use the libraries from each swf file.

Can I do that with AS3. I know it's impossible to do that in AS2, where you can have only one shared library, but how about AS3 and FP9?

I've found some threads + posts on the internet, but they are not really helping as I need to understand the foundation and how to and what it means, so I'm hoping for a really helpful soul out there to enlighten me...
Pages I read:
http://www.flash-db.com/Tutorials/lo...ata.php?page=1
http://www.ultrashock.com/forums/act...swf-92007.html
http://www.scottgmorgan.com/blog/ind...-swf-with-as3/



Thanks in advance,
Eddie

View Replies !    View Related
Something I Would Like To Share
Hey guys,

I have here a pretty simple little piece of code, but one that comes in real handy. Ever publish a movie with a lot of button events, only to realize that someone can easily cycle through those using the "tab" button? The ensuing yellow box looks pretty ugly and unweildy, huh?

Here's a simple way to bypass that:


Code:
for(var i in _root){
_root[i].tabEnabled = false;
}
This will get rid of that for you.

Cheers!

-carmire

View Replies !    View Related
Let Me Share My Stupidity.....please Help.
I have this site and its in flash (duh). I have noticed that on a pc set at 800x600 (like mine), the site looks the way it's suppose to. On a pc set at say 1024x768 it looks funky, its smaller and to the left. Now for the question......(drumroll please) I want to know if there is some kind of default or setting I can put in that will make the movie look the same no matter what the users settings? Do I make any sense?

Please help. Thanks in advance....

View Replies !    View Related
Share Some Knowledge
http://www.were-here.com/forums/show...hreadid=154446

View Replies !    View Related
Share Variables.
Hi. I'm trying to get 2 banners to work in real time with eachother. (There's a kitty hopping on top and I want it to fall down).

I've tried it with SharedObject but I found out it doesn't actually "share", it just saves the variables only for the specific swf files

Can anyone help me how to do this?

This is my current code, which doesn't work:

Kittybanner1:
code: _root.sync = 1
_root.pos = SharedObject.getLocal("kittybanner")
_root.pos.data.sync = _root.sync

Kittybanner2:
code: function kittysync() {
_root.pos = SharedObject.getLocal("kittybanner")
_root.sync = _root.pos.data.sync
if (_root.sync == 1) {
gotoAndStop(2)
}
}
Kittybanner2 has an enterFrame code. Frame 2 sets _root.sync = 2. But the dynamic text shows undefined, so it doesn't see the _root.pos.data.sync that Kittybanner1 did define

Thanks in advance,
-Shin

View Replies !    View Related
How To Share Flv Video?
Just made a website with a movie trailer in it, FLV. Used a standard video component but the person I'm doing the site for wants their to be a button to allow other people to share and links to embed the video.

Is there a component that has this built in (for Flash 8) or is there another easy way to provide this info? Or what would be the code to embed just an FLV?

thanks

View Replies !    View Related
Just Want To Share Some Experience
I had some problem with AMFPHP, actually all of my works, when tested on the remote servers, seem not to work on everything exept IE. And finally my last site worked only on my computer.

While checking my server logs I've found that when users tried to enter my site, their browsers hitted the strange 'mysite/crossdomain.xml' file. I've asked my help panel about 'crossdomain' and in five seconds the mysite/crossdomain.xml had been created with the following inside:

<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*.mysite" />
</cross-domain-policy>

Doing this helped me. I never met the same as mine problems here, but maybe it could help someone.

View Replies !    View Related
Share Desktop
Hi Guys,

Im just throwing this out there to see what comes back and Im not sure if this is the right place to look.
Here goes:
Does anyone know of any open source desktop sharing software that can be bolted into or work along side flash?
I have a project that will need this facility built into it.
Any help or direction would be really appreciated.

Thanks in advace.

View Replies !    View Related
Just Had To Share This Site With You All
This is my first post here -hey everyone!

Anyway, this is one of my favourite Flash sites: www.andyfoulds.co.uk

Check out the 'folding' effect inside the main site. I love it!

View Replies !    View Related
Can Anyone Share Sound Fx?
maybe you have collection or smth... i need for web interface, such rollovers, clicks and so on... flashkit.com is too old there are good sounds at soundrangers.com, but it cost and i'm not in US

View Replies !    View Related
Just Had To Share This Site With You All
This is my first post here -hey everyone!

Anyway, this is one of my favourite Flash sites: www.andyfoulds.co.uk

Check out the 'folding' effect inside the main site. I love it!

View Replies !    View Related
[as] Best Way To Share Code
What is the proper way to share code between movieclips? I have the same enterFrame code that I am going to use for several movieclips. In ASP I would use #include, which I see is also available in Flash. Is that considered the best way to do it?

thanks!
michelle

View Replies !    View Related
Anyone Willing To Share Their .fla Files?
I know how to do the basic things, but i have no idea how to put it together to make into a big flash site.

I was wondering if anyone's willing to upload their site, or an old design, or basically, just an old flash site, or a flash idea (you get the idea) as a .fla for us newbies to get an idea?

Thx a lot

View Replies !    View Related
Please Share Your Knowlede :)
Is anyone here know how to make a search engine in flash?

Just a basic search engine without using a database.

Please help.

Thank you in advance.

God bless...

View Replies !    View Related
Please Share Your Knowlede :)
Greetings!

Can someone teach / share me some search tutorial? What I mean is a search for my website.

Hope you help me.

Thanks in advance.

God bless.

View Replies !    View Related
Share Variables Between Swf's?
I have this to load my swf from my nav on _level100:
Code:

_level0.mcl.loadClip ("sub.swf", 50);


The sub.swf loaded into _level50 need two variables that is already declared in my nav system to load the proper xml file and they are;

1) _root.num
2) itemnum

Is there a way for me to send these two fellows to my swf on _level50?

Ok, I solved the _root.num variable bu setting it to _global, but where is really itemnum defined so I can do the same?

Code:

// FUNCTIONS
_global.$tweenManager.broadcastEvents = true;
// Main menu
function createMainMenu() {
   var a = 1;
   var total = mm_array.length;
   while (a<=total) {
      ypos = ((a-1)*homm)+1;
      attachMovie("mainnav_mc", "mainnav"+a+"_mc", this.getNextHighestDepth()+100, {_x:0, _y:ypos});   // attach the movieClip
      var nc = this["mainnav"+a+"_mc"];
      nc.menutext = mm_array[(a-1)];   // set the title text for each button
      nc.itemnum = a;   // set the menu #
      a++;
   }
}
function moveMenu(num) {
   if ((_root.collapsed == true) || (_root.selectedmenu != num)) {
      var array = "sm"+num+"_array";
      var totalsm = eval(array).length;
      var totalmm = mm_array.length;
      var a = 1;
      while (a<=totalmm) {
         mc = this["mainnav"+a+"_mc"];
         if (a>num) {
            var ypos = (((a-1)*homm)+1)+totalsm*(hosm+1);
            mc.tween("_y", ypos, speed, ease);
         } else {
            var ypos = ((a-1)*homm)+1;
            if (a == num) {
               nypos = ypos;
               mc.tween("_y", ypos, speed, ease, 0, onEnd(num, nypos));
            } else {
               mc.tween("_y", ypos, speed, ease);
            }
         }
         a++;
      }
      _root.collapsed = false;
   } else {
      contractMenu()
      _root.collapsed = true;
   }
}
function moveMenuStart(num) {
   var num = 1;
   if ((_root.collapsed == true) || (_root.selectedmenu != num)) {
      var array = "sm"+num+"_array";
      var totalsm = eval(array).length;
      var totalmm = mm_array.length;
      var a = 1;
      while (a<=totalmm) {
         mc = this["mainnav"+a+"_mc"];
         if (a>num) {
            var ypos = (((a-1)*homm)+1)+totalsm*(hosm+1);
            mc.tween("_y", ypos, speed, ease);
         } else {
            var ypos = ((a-1)*homm)+1;
            if (a == num) {
               nypos = ypos;
               mc.tween("_y", ypos, speed, ease, 0, onEnd(num, nypos));
            } else {
               mc.tween("_y", ypos, speed, ease);
            }
         }
         a++;
      }
      _root.collapsed = false;
   } else {
      contractMenu()
      _root.collapsed = true;
   }
}
function onEnd(num, nypos) {
   _global.num = num;
   createSubMenu(num, nypos);
}
function contractMenu() {
   var c = 1;
   while (c<=submenu_array.length) {
      removeMovieClip("subnav"+c+"_mc");
      c++;
   }
   var g = 1;
   while (g<=mm_array.length) {
      ypos = ((g-1)*homm)+1;
      this["mainnav"+g+"_mc"].tween("_y", ypos, speed, ease);
      g++;
   }
}
function createSubMenu(num, nypos) {
    var array = "sm"+num+"_array";
    var totalsm = eval(array).length;
    var ypos = nypos+4;
    var c = 1;
    while (c<=submenu_array.length) {
        removeMovieClip("subnav"+c+"_mc");
        c++;
    }
    submenu_array = [];
    var a = 1;
    while (a<=totalsm) {
        ypos = ypos+hosm+1;
        attachMovie("subnav_mc", "subnav"+a+"_mc", a+30, {_x:0, _y:ypos});
        nc = this["subnav"+a+"_mc"];
        nc._alpha = 0;
        nc.itemnum = a;
        nc.menutext = eval(array)[(a-1)];
        nc.alphaTo(100, 2);
        submenu_array.push("subnav"+a+"_mc");
        a++;
      }
}
function createSubMenuStart(num, nypos) {
   var num = 1;
   var nypos = 0;
    var array = "sm"+num+"_array";
    var totalsm = eval(array).length;
    var ypos = nypos;
    var c = 1;
    while (c<=submenu_array.length) {
        removeMovieClip("subnav"+c+"_mc");
        c++;
    }
    submenu_array = [];
    var a = 1;
    while (a<=totalsm) {
        ypos = ypos+hosm;
        attachMovie("subnav_mc", "subnav"+a+"_mc", a+30, {_x:0, _y:ypos});
        nc = this["subnav"+a+"_mc"];
        nc._alpha = 0;
        nc.itemnum = a;
      subnav1_mc.colorTo(0x000000);
        nc.menutext = eval(array)[(a-1)];
        nc.alphaTo(100, 2);
        submenu_array.push("subnav"+a+"_mc");
        a++;
      }
}

// Over & Out on buttons
function over () {
   this.tween("_x", 2, .5, 'easeOutExpo');
}
function out () {
   this.tween("_x", 0, .5, 'easeOutExpo');
}

function loadSubOne () {
   _level0.mcl.loadClip("main1/sub1.swf",50);
}


// BUILD MENU
_root.collapsed = true;

var loadFunctions:Fuse = new Fuse();
   loadFunctions.push(
   {scope:this, func:"createMainMenu"}
   {scope:this, func:"moveMenuStart", delay:2},
   {scope:this, func:"createSubMenuStart"},
   {scope:this, func:"loadSubOne", delay:.5}
);
loadFunctions.start();

View Replies !    View Related
Thought I Would Share
Just thought I would share this, I made it as my intro, and although I am pleased with it as it is my first actual animation rather than website made with flash it is mainly built frame by frame and I was curious to whether this kind of thing could be done with action script.

http://www.itsmy-space.co.uk/folio/webdesignhome.htm

View Replies !    View Related
Can U Share Varibles Between 2 Swf Files?
Ok...I'm making a shopping cart...and I want to share a varible (Total Cost) between 2 movies using the loadmovie command...is this possible?If yes...then how??if no...what other way can I do this??

Thank u in advanced.
Moe

View Replies !    View Related
A Questionaire About Using Flash Mx: Plz Share All
hello everybody,


i need your opinion here, i need to decide whether to use flash mx or flash 5, in an online project ( tutorial simulation) off coarse i know mx is better , and is a good step forward, but i have some points i need to make sure of before deciding





IS FLASH MX NOW FULLY STABLE AND TRUSTED ( AS IT IS RELATIVELY NEW) ???

, IS THERE ANY KIND OF PROBLEMS I MAY FACE IN FUTURE USING MX ??

WHAT ABOUT FLASH PLAYER 6 SUPPORT,.... WILL THESE MAKE ME FACE ANY KIND OF PROBLEMS ????
thanks in advance

View Replies !    View Related
How Do You Share Variables Between Scenes?
Im having trouble passing variables between scenes. I was thinking of storing the varible in the symbols since they are shared between all scenes, but i couldn't get it to work. any help will be greatly appreciated... thanks

justin

View Replies !    View Related
Can't Share With My Shared Object
Hi I am trying to set up an offline game and am having trouble with the information for the sharedObject scoreboard.

At present the scoreboard only shows two lots of data (name & score) I want it to show more (name, score, email, company, position & tel). In the attached .fla I have added the extra input fields but I can't make them display in the scoreboard.

I have renamed the variables for input text and thought that I had changed the AS and the fields in the scoreboard correctly but it would seem that I haven't!

This is the code for the high score object:

highScoreList = function (dir, tot, insertion) { this.order = dir;this.totalScores = tot;this.insertionType = insertion;};

highScoreList.prototype.loadScores = function(sharedOb) {

this.infoOb = SharedObject.getLocal(sharedOb);

this.info = [];

if (this.infoOb.data.scores != undefined) {

this.info = this.infoOb.data.scores;

}

};

highScoreList.prototype.saveScores = function(sharedOb) {

this.infoOb.data.scores = this.info;

this.infoOb.flush();

};

highScoreList.prototype.deleteList = function(sharedOb) {

this.info = null;

this.infoOb.data.scores = this.info;

this.infoOb.flush();

};

highScoreList.prototype.addScore = function(playerName, playerScore, extraData) {

if (this.insertionType == 1) {

// allow repeated names

this.info.push({namelayerName, score:Number(playerScore), extra:extraData});

} else if (this.insertionType == 2) {

// a name can only appear 1 time, better score is taken

this.nameFound = false;

var i = -1;

while (++i<this.info.length) {

if (this.info[i].name.toUpperCase() == playerName.toUpperCase()) {

this.nameFound = true;

if ((this.order == "desc" && Number(playerScore)>Number(this.info[i].score)) || (this.order == "asc" && Number(playerScore)<Number(this.info[i].score))) {

this.info[i].score = Number(playerScore);

break;

}

}

}

if (!this.nameFound) {

this.info.push({namelayerName, score:Number(playerScore), extra:extraData});

}

}

this.sortScore();

this.limit();

};

highScoreList.prototype.limit = function() {

this.info = this.info.slice(0, this.totalScores);

};

highScoreList.prototype.sortScore = function() {

this.tempInfo = [];

var i = -1;

while (++i<this.info.length) {

var j = -1;

while (++j<=this.tempInfo.length) {

if ((this.info[i].score>this.tempInfo[j].score)) {

this.tempInfo.splice(j, 0, {name:this.info[i].name, score:this.info[i].score, extra:this.info[i].extra});

j = this.tempInfo.length+1;

}

}

}

this.info = [];

this.info = this.tempInfo;

if (this.order == "asc") {

this.info.reverse();

}

};

highScoreList.prototype.traceScores = function() {

var j = -1;

while (++j<this.info.length) {

trace("----");

for (i in this.info[j]) {

trace(i+"="+this.info[j][i]);

}

}

};

_global.highScoreList = highScoreList;


And this is the code for the example usage:

stop();
list.bar._visible = false;
function clearList() {
i = -1;
while (++i<=list.totalScores) {
list["bar"+(i+1)].removeMovieClip();
}
}
function updateVisualList() {
clearList();
v = 0;
i = -1;
while (++i<scores.info.length) {
list.totalScores = i;
++v;
name = "bar"+v;
list.bar.duplicateMovieClip(name, v);
list[name]._y = i*30;
list[name].num = (i+1);
list[name].name = scores.info[i].name;
list[name].score = scores.info[i].score;
}
}
function submit() {
scores.addScore(myName, myScore, myEmail, myCompany, myPosition, myTel);
scores.saveScores("fake_game");
upDateVisualList();
}
scores = new highScoreList("desc", 4, 2);
scores.loadScores("fake_game");
scores.sortScore();
// sort score is not exactly necessary to call since the score is automatically sorted when a name is added.
// but if you load a score list and want to reverse the sorting it will then be useful.
upDateVisualList();
[b]

How can I put it right? Any ideas will be most welcome!

View Replies !    View Related
Share Object Limit
hello.

im having trouble with share objects in flash.

the file i am making will only every be played locally not through a browser.

i am saving a very large amount of data (over the 100k default share object limit).

I can't seem to change the maximum. I've tried flush but I can't seem to get it working.

Also it would be great to set the limit without having to bring the shared object box up.

any ideas

thanks.

View Replies !    View Related
Can Two Swfs Share A Varible?
hey everybody...
im making two different swfs that are going to go on the same page... and i have an input text on one of the swfs and an dynamic text on the other

now they have the same varible(_root.name)... but they dont corrispond... is there something i can put in the html or some way to get them to corrispond?

View Replies !    View Related
Possible For Two Dynamic MCs To Share _level0?
Hi,
I'm trying to keep all of my Flash project on _level0 for my Content Management System's purposes. I'm trying to have two movie clips containing all the project on _level0, but the new movie always bumps the other.

Can anyone explain to me if I can have two dynamic movie clips coexist on _level0 and if so, how? Thanks!

View Replies !    View Related
Anyone Have As3 Videogame Code To Share?
Something like tetris, breakout, asteroids-ish, whatever. Maybe I can look at the code and get the slightest clue how to do this stuff, especially in the object oriented multiple-class way which I have a very weak grasp of.

View Replies !    View Related
Can I Share Fonts With Those Who Don't Have That Font?
My question is about cross-platform development, not cross-platform viewing.

We have a base swf file that loads several external swf files.

We have developers and designers on Mac and on Windows.

Is there a way to embed a font in the base file and share that font with an swf that was published on a machine that doesn't have that font installed?

Shared library requires that the font is installed on all machines that publish the swf's. This isn't possible in our situation.

View Replies !    View Related
Share Animation Between More Objects
Is it possible to share the same animation in a library object in order to use it with different text content?

In other words, is it possible to have more text that use the same animation, so I don't have to change all of them?

Is maybe this only possible in actioscript?

View Replies !    View Related
How To Share Movieclip Objects With FCS
I would like to know how to stream a movie clip to multiple clients.
I want the flash comm server to change the movie clip every once in a while and then have the clients automatically update when the server movie clip object is changed. I want to do something like:

//Server-side
application.onFirstClientConnection () { start slide show and keep looping}
application.onLastDisconnect() { stop slide show }

//Client-side
get connection to FCS
create a movieclip object that syncs with the FCS movieclip object

View Replies !    View Related
Network Share With FMS03
Hi,
I have ah problem, with using a nas filesystem on FMS03 under windows 2003 R2 standard edt. 32 bit. ( mounted with cifs )
If i change, the "VHOST.APPSDIR" variable to a network drive, i get an error while connecting to the vhost on the server.
Like: "[Connect], NetConnection.Connect.Rejected, NetConnection.Connect.Closed"
Edgelog : Connection rejected by server. Reason : [ Server.Reject ] : (adaptor3, _defaultVHost_) : Application (applXX) is not defined
If i undo the change back to a local directory, everything works.

Is it possbile, that the FMS Server have no rights on the File System.
FMS Server runs with the system acc.

greets Dani

View Replies !    View Related
HELP : How To Share Library Items?
Hello,

I have many movies that have the same buttons. What I did was copy every button to every movie. Does making it difficult for me whenever I change the button because I will have to change every button in every movie. Takes time.....

My question is, How do you make a button then save it so that it can be used by all the other movies. So if there are any changes, I will only have to change the LINK BUTTON and everything else will be changed automatically.


Thanks

View Replies !    View Related
Share Xml Object Between Movies
Hi there

I have a site that has 3 seperate swf's embedded into a page.

I want them to share an xml file which is stored on the server but its quite a bit file so I don't want to have to request it 3 times.

i hope this is clear???

View Replies !    View Related
Possible For Two Dynamic MCs To Share _level0?
Hi,
I'm trying to keep all of my Flash project on _level0 for my Content Management System's purposes. I'm trying to have two movie clips containing all the project on _level0, but the new movie always bumps the other.

Can anyone explain to me if I can have two dynamic movie clips coexist on _level0 and if so, how? Thanks!

View Replies !    View Related
This Is Nice,Just Thought I Should Share It
I made a AS file that allows you to create scripted animation, I thought you guys might wanna check it out:
http://blog.hunsonhunsonhunson.com/?p=257

tell me what you think!

View Replies !    View Related
HELP : How To Share Library Items?
Hello,

I have many movies that have the same buttons. What I did was copy every button to every movie. Does making it difficult for me whenever I change the button because I will have to change every button in every movie. Takes time.....

My question is, How do you make a button then save it so that it can be used by all the other movies. So if there are any changes, I will only have to change the LINK BUTTON and everything else will be changed automatically.


Thanks

View Replies !    View Related
I Want To Share My Flash Intro
Hello everyone, I just wanted to share this flash intro I just made and also to get opinions from you experts. Basically my customer wanted the crowd-wave you see in stadiums for the sports bar, and I had no luck getting a good quality video, so I had to build this animation over a photo....please give me your thoughts, thanks and here is the link....well I can't post links yet! so just go to courtsidesportsbar . com / intro . html

Regards,

View Replies !    View Related
I Want Share A Class But I Need An Help To Finish It..
Hello rigaz..

I want to share my first class .. but is incomplete.. it doesnt' work and i don't know why..

Someone help me to adjust this little class ?

Code:

class it.leodido.TextAnimation {
   
   private var field:TextField;
   private var str:String;
   private var strlen:Number;
   private var textanim_mc:MovieClip;
   private var rndstr:String;
   private var duration:Number;
   private var time:Number;   
   private var i:Number;
   
   function TextAnimation( string:String, textfield:TextField, animDuration:Number, animTime:Number ) {
      
      field = textfield;
      field.text = "";
      
      str = string;
      strlen = str.length;
      
      duration = animDuration;
      time = animTime;
      
      textanim_mc = field._parent;
      Animation( textanim_mc, str, strlen, duration, time);
   }// End Constructor
   
   private function Animation( mc:MovieClip, str:String, strlen:Number, duration:Number, time:Number ) {
         mc.onEnterFrame = function() {
            rndstr = "";
            
            if ( (duration - time) < strlen ) {
               rndstr += str.substr( 0, strlen - (duration - time) );
               for ( i=0; i<(duration - time); i++ ) {
                  rndstr+= String.fromCharCode ( random(50) + 20 );
               }
            }
            else {
               for ( i=0; i<strlen; i++ ) {
                  rndstr+= String.fromCharCode( random(50) + 20 );
               }
            }
         
            field.text = rndstr;
         
            if ( time++ > duration ){
               field.text = str;
               time = 0;
               delete this.onEnterFrame;
            }
      }// End onEnterFrame
      
   }



Where are the errors ? please help me.. or tell me the errors..

To apply...
Code:

import it.leodido.TextAnimation;
var ta:TextAnimation = new TextAnimation( "string string", labelTxt, 10, 1 );


i hope in an help.. thanks..
..leo..

View Replies !    View Related
AS That Detects The End Of A Song? Share Your Secret....
I am making a presentation cd using a Flash "exe" file. I'm loading in full MP3's. I'm placing the songs in a seperate movie and loading it into the main movie. Is there a way for action script to read when the song comes to the end and launch an MC with a control panel for the user to select the next song.

I can do this by draging the frame accross the whole layer till it ends but I would like to avoid doing this since there will be around 5 full songs in the same movie..

So in short can AS detect the end of the song? Or do I need to do it another way?


k

View Replies !    View Related
How Do You Share Variables In Different Movie Clips...
you see, i have 2 MCs, and i load a variable.txt on one of them and i don't really want to load them on both cause of some reason of mine...

so my problem is, i need to load them on one, and let that clip transfer it to another clip...

i hope you guys understood what i'm trying to say..

plz help

View Replies !    View Related
File Share And Video Chat
can this be done? if so how or is there a app already done ?

View Replies !    View Related
Variables And Share Values In Movie
I have a movie where I load a text file with image names and descriptions. I have loaded the variables into my movie and get the correct values. I now want to share the data based on the users interaction with an associated button. If the user clicks on button 2 I want to take the value from the associated text "image2text" and now insert that into the title of the screen. The title field is named "title". So when I click on button 2 take the value from the text field named image2 and put that in the title field.

When the user clicks on the button I pass a variable to my function telling the function what button and text field is being triggered.
whattext = 2;

How do I write in the code to call the correct text field.
Here is what I have tried but it didn't work.

_root.title.text = _root.getText["Image" + whichPic];

So I want to take the text from the text field named Image? and insert it in the title field.

Thanks

View Replies !    View Related
Runtime Share Cashing (a Techie One)
how does flash handle runtime sharing?

I want to know if i will have any loading time benefits if i use runtime sharing to share assets that a number of movies use - these movies may be viewed one after the other.

Are the assets cashed and therefore available immediately when next needed. If not is there any speed gain when viewing over a slow connection.

Also how does flash access the shared library. Can it extract individual assets from one .swf file without downloading the whole file. I.e. will having a big library SWF file actually slow down a movie that shares assets from it. If this is the case is it better to have multiple library SWF files - one for each asset.

View Replies !    View Related
Combo Box Need Two Boxes To Share Info
I am trying to figure out how to make two combo boxes on the same page that one you choose the State and the second box you choose City from that state....like this website listed here has on there...


http://www.lennar.com/findhome/search.aspx?type=qm

I can not figure out how to do this in flash or if it is possible..Any help greatly appreciated..I am very knew to this...thanks

View Replies !    View Related
[CS3] Share Social Sites From Flash
how do i provide links to social sites (myspace, facebook..) etc in flash in case user wants to click the link, go to the site and share my site there.. any components we have for AS 2??

View Replies !    View Related
Share Your OOP+XML Scrolling Window Ideas
Maybe you won't if you have a very special way of doing scrolling windows that puts you a cut above the rest. For me, it's a drag every single time I've had to make one. (well, it's only 2 time so far) I HATE making scrolling windows from scratch. Scrolling windows I'm talking about here are like tables. They get populated with repeating entries (like, pic of item: name of item: price) with a scroll bar.

Basically, I'm looking for a good way to make scrolling windows that use XML for visual formatting (size, position, scrollbar goes there, make movieclip here, etc) and to generate all the appropriate movie clips. And then, I have another XML that has all the data in it. (path to pic, item name, item price, and so on) Plug them together somehow, and then add all the interactive controls (scroll bar, up and down scroll arrows, clickable items, etc).

Well, I guess it's sort of pointless for me to be blabbering about this since there's so much detail I can't simply write out.. I was just wondering if anyone's got a "this is the perfect way to do it" idea on scrolling tables.

I also need to figure out a way to disentangle my code from the project specific code so I can reuse it somehow.. I can't spend 2 days every time writing the scroller... and spend 1 day teakin'g it! arrrrghhhh!

View Replies !    View Related
Something Cool With The Date Class That I Just Want To Share
Hi,

A while back I wanted to be able to find the day of the week from any date. For example, you pass 11/28/2006, and it returns "Monday".

It took a while to do, and I'm sure other people out there would find this useful, so I'm putting it up so people can use it.

cDateExtension.as:

ActionScript Code:
class cDateExtension extends Date
{
    private static var m_aDayNames:Array        = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" );
    private static var m_aDaysInMonths:Array    = new Array ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
   
    /** GetDayOfWeekFromDate
    *   @author Alexander Cook, cook at propellingsolutions.com
    *   @description takes any date, and gives you the day of the week (ie Monday, Sunday)
    *   Code adapted from algorithm on [url]http://jonathan.rawle.org/hyperpedia/day_calculation.php[/url]
    *   
    *   @param NYear   - an XXXX formatted date.  For example, 2006
    *   @param NMonth  - a XX formatted month.  January = 1, December = 12
    *   @param NDay     - a date (ie, 1-31)
    *   
    *   @return the day of the week (Sunday-Saturday)
    **/
    public static function GetDayOfWeekFromDate ( NYear:Number, NMonth:Number, NDay:Number )
    {
        var nMonthCode:Number;
        switch ( NMonth )
          {
            case 1:  nMonthCode = 0;    // January
                break;
               
            case 2:  
            case 3:  nMonthCode = 3;    // Feb, March
                break;
               
            case 4:  nMonthCode = 6;  // April
                break;
               
            case 5:  nMonthCode = 1;    // May
                break;
               
            case 6:     nMonthCode = 4;        // June
                break;
               
            case 7:     nMonthCode = 6;        // July
                break;
               
            case 8:  nMonthCode = 2;    // August
                break;
               
            case 9:     nMonthCode = 5;        // September
                break;
               
            case 10:    nMonthCode = 0;      // October
                break;
               
            case 11:    nMonthCode = 3; // November
                break;
               
            case 12:    nMonthCode = 5; // December
                break;
               
            default:    return ( "ILLEGAL MONTH" );
          }
        
       
        var nValue:Number = NYear + int ( NYear / 4 );
        nValue -= int ( NYear / 100 );
        nValue += int ( NYear / 400 );
        nValue += NDay;
        nValue += nMonthCode;
        nValue -= 1;
        var nDay:Number = nValue % 7;
        return m_aDayNames [ nDay ];
    }
}

You can access the method by doing something like the following:


ActionScript Code:
trace ( cDateExtension.GetDayOfWeekFromDate ( 2006, 11, 28 ) );

You should get back Tuesday for that Date.

Anyways, could be useful, and it isn't built into Flash.

A zip file with example and MX '04 file is attached.

View Replies !    View Related
How To Share A Drawpad With Red5 Server
Hello,

I've made a sketchpad using this tutorial :

http://lukamaras.com/tutorials/cool-...awing-pad.html

It works perfectly.

I've installed a working red5 server on my own PC.

How can I share this sketchpad, I want users to see and interact between each others ... I know I have to use sharedobjects but I can't find a detailed tutorial about this specific request. How configuring the red5 server ? A main.asc with loading copnonents.asc ? Or WEB-INF etc.. editing ?

Sorry this is noob questions, but I'm not a developper

Thx

View Replies !    View Related
Can't Seem To Share An External .as Doc As Document Class.
I have two documents (both placed in a third doc) which I'd like to share the same external .as doc as the document class, but doing so produces a ReferenceError: Error #1056.

Any idea what I am doing wrong?

I have a main movie (Main.swf) that contains two Scroll Pane components.

Each scroll pane has a separate source swf -- SkyMenu.swf and MoonMenu.swf respectively. SkyMenu and MoonMenu each contain a number of SimpleButtons. For simplicity we'll say they each have one button. SkyMenu.swf has sky1_bt and MoonMenu has moon1_bt. Those instance names are named on the stage using the property inspector.

I have created a custom class file (BgndMenuClass.as) defining the behavior of the buttons and have defined it as the document class for each of the two files (but NOT Main.swf). The code is included below.

I have checked "Automatically declare stage instances" in each file.

When I export each of the two menu files the class works.

If I have only ONE menu (either SkyMenu OR MoonMenu) in Main.swf it works fine. A soon as I add BOTH menus to Main.swf I get the the Reference Error seen below. Any help is greatly appreciated.

BgndMenuClass.as


Code:
package

{
import flash.display.MovieClip
import flash.display.SimpleButton
import flash.events.MouseEvent
import flash.text.TextField
import flash.net.LocalConnection

public class BgndMenuClass extends MovieClip
{
public var outgoing_lc:LocalConnection = new LocalConnection();
public var folderName:String;

public function BgndMenuClass()
{
trace("BgndMenu is working");
}
public function makeButt(butt_bt:SimpleButton,itemName:String)
{
butt_bt.addEventListener(MouseEvent.CLICK, itemSend);
function itemSend(event:MouseEvent):void
{
outgoing_lc.send("menu_connection", "bgndItemsExecute", itemName, folderName);
}
}
public function toggleVis(event:MouseEvent):void
{
outgoing_lc.send("menu_connection", "toggleBackVis", folderName);
}

}
}

SkyMenu.fla code:

Code:
//Folder for these items
folderName = "sky";

//Make the buttons
makeButt(sky1_bt,"sky1");
ReferenceError:

Code:
ReferenceError: Error #1056: Cannot create property sky1_bt on BgndMenuClass.

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at BgndMenuClass/makeButt()
at BgndMenuClass/frame3()

View Replies !    View Related
Share Timer To Different Movie Clip
I'm trying to create a game which is time-bound.The user has to finish 5 missions within one hour to win. If the user doesn't finish it within the time limit, a popup appears and time will reset.

The time starts with the first mission. i've used getTimer for this. However, each mission is placed in a different swf file. how do i pass the minutes passed from one swf file to another? Also, I've tried storing it in a .sol file. But i couldn't retrieve it.

Here's the code

Code:
var startTime;
var currentTime;
startTime = getTimer();

this.onEnterFrame = function() {
num=1;
currentTime = getTimer();
/* 12 f = 1 s;
/*
/*if(num == 1){
timer = (currentTime-startTime)+ so.data.users[i][66]["ncr"];
num++;
}*/
num++;
else timer = currentTime-startTime;
so.data.users[i][66]["ncr"] = timer;
trace(Math.floor(so.data.users[i][66]["ncr"]/1000));
if (so.data.users[i][66]["ncr"]>200000) {
// do something cause 5 seconds have passed
delete this.onEnterFrame;
loadMovie("0 PDA.swf", popupBox);
this.popupBox._visible = true;
this.popupBox._x = 157.9;
this.popupBox._y = 95.9;
}
}

View Replies !    View Related
Create Library To Share Our Classes
Hi,

How to create library to share or distribute our classes to work with as3 or flex...

Any idea or samples or tutorials..

Thankx in advance...

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