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




Actions For AttachMovie Items



Hi all, I hope somebody can help me with this - I have a menu that dynamically generates Buttons. The Code for this is
Code:
function attachMenu() {for (i=0; i<rubrieken.length; i++) { blockItem = followMenu.blockHolder.attachMovie("block", "block"+i, 1000+i); blockItem._href = rubrieken[i].attributes.href; blockItem.contentT = rubrieken[i].attributes.naam;
This works perfectly. Then actions for the buttons are attached with:
Code:
blockItem.onRelease = function():Void { getURL(this._href, "_blank"); trace(this._href); };
and the entries for that come from XML:
Code:
<rubriekenxml> <project naam="LABELNAME 1" image="" href=http://www.something.com/> <project naam="LABELNAME 2" image="" href="http://www.something.com"/> <project naam="LABELNAME 3" image="" href="http://www.something.com"/></rubriekenxml>
Works, too. Now I'm trying to submit different actions for the Buttons. Button 1 is supposed to open a website (like it does), while all other buttons should load an external SWF with loadMovieNum(this._href, 30); So can anybody help me with this - I don't know how to build a loop like for button number 1 --> getURL(this._href, "_blank");for button number 2,3,4,5,6 --> loadMovieNum(this._href, 30); Thanks for your help! B



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 11-06-2008, 01:09 PM


View Complete Forum Thread with Replies

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

AttachMovie Always In Front Of Placed Items.
I have some MCs that are placed in the timeline and others that are dynamically created using the attachMovie command, but no matter what level I put the attached movies in they are always on top of the placed MCs. Is there a way to attached MCs in between two layers of placed MCs?

Assigning Actions To Items In Libray
I have a movie that loads movieclips that are in the libaray in to the stage using linkage. Can I assign actions to these movieclips so when they are on stage these actions get executed?? is there a tutorial or somewhere I could get more info on this or is this not the best way of doing it??

Thanks

[CS3] Apply Actions To Multiple Items
Probably a very newbie and simple question.

Why can't I select several movieclips on stage in order to paste the same actions to them?

I need the same actions on these button clips, with slight variations.

Thank you!

[CS3] Apply Actions To Multiple Items
It's supposed to be an easy question, still I find no answer for it.

Why can't I select several movieclips on stage in order to paste the same actions to them?

Is there an alternative way of doing that?

I need the same actions on some movie clip instances, with slight variations.

Thank you!

AttachMovie Of Dynamic Created Items In MX
Hi everybody,

I have got a problem to which I cannot find the answer. If anybody could help me out, or point me in the right direction, that would be great.

What I want is the following. Based on an XML file and one empty movie clip, I create about 80 different items (menu items). By drag and dropping these menu items you can create a scene with objects.

These objects are copies of the menu items. But I want to use the attachMovie command to have control over the path of the objects. But by creating the menu items dynamically, I cannot say in the library, export for actionscript.

So my question is, how can I use the attachMovie command on items that are dynamically created.

Please help me out!

RoGe

AttachMovie Of Dynamic Created Items In MX
Hi everybody,

I have got a problem to which I cannot find the answer. If anybody could help me out, or point me in the right direction, that would be great.

What I want is the following. Based on an XML file and one empty movie clip, I create about 80 different items (menu items). By drag and dropping these menu items you can create a scene with objects.

These objects are copies of the menu items. But I want to use the attachMovie command to have control over the path of the objects. But by creating the menu items dynamically, I cannot say in the library, export for actionscript.

So my question is, how can I use the attachMovie command on items that are dynamically created.

Please help me out!

RoGe

AttachMovie Of Dynamic Created Items In MX
Hi everybody,

I have got a problem to which I cannot find the answer. If anybody could help me out, or point me in the right direction, that would be great.

What I want is the following. Based on an XML file and one empty movie clip, I create about 80 different items (menu items). By drag and dropping these menu items you can create a scene with objects.

These objects are copies of the menu items. But I want to use the attachMovie command to have control over the path of the objects. But by creating the menu items dynamically, I cannot say in the library, export for actionscript.

So my question is, how can I use the attachMovie command on items that are dynamically created.

Please help me out!

RoGe

Smart Clip Scroll Menu-attach Actions To List Items
I am using Flash 5 on a Mac platform.

I downloaded the Scroll Menu extension from Macromedia Extensions Exchange.
It works great.

What I would like to do now is attach actions to individual list items.
I have no idea how to go about that. I have been searching forums and posting the question of how to use Actionscript to accomplish this, but have received no answers.

Can you give me direction on how to attach actions. Do I need to do something like this to label the array in the smart clip first?

onClipEvent (load) {
function onMenu (item, label) {
labelArray = new Array("1", "2", "3",...)
val = labelArray[item];

And then use an
if(currentValue = "[0]")
gotoAndplay (3)

I am over my head here (not a programmer)! If you can assist me I would be very grateful.

Thank you in advance for any help you can give me
Jody

Attachmovie Actions
Could someone tell me how to assign code to a moviclip using the method attachmovie?

I have attachmovie on the first frame, but I don't know how to give it actions for example on clip event _x+=5

Thanks for any help.

AttachMovie With Actions On The Movie?
Hi,

I am looking to find out how to do the following.

I am using attachMovie to dynamically attach X number of clips to my main movie. I have the clip I am using set with a link identifier.

My problem is, I want these clips to act as buttons.. so I need a way to have an on(press) event on each of them.

How would I go about this?

[FMX] Button Actions No Go AttachMovie
Have created a button in the library with linkage on, and I'm using attachMovie to attach it to a movie and it shows where I want it to, but the over, down states dont function.

what can I do?

Drag Items Into A Target Zone - Shrink Old Items
Hello - I have been thinking about how best to handle this but thought I'd ask if anyone has seen any actual code that will get me close to where I want to be. I have attached an image that will give you the idea.

I want to have a "target area" and drag and drop items onto it. As I add new items the ones already there will need to shrink to make room for the new item. As items are removed the remaining itmes can grow a bit more again. Get the idea?

IMAGE
http://pixelfumes.com/uploads/shrinky.gif

Thanks guys!
-Sarge

Drag Items Into A Target Zone - Shrink Old Items
Hello - I have been thinking about how best to handle this but thought I'd ask if anyone has seen any actual code that will get me close to where I want to be. I have attached an image that will give you the idea.

I want to have a "target area" and drag and drop items onto it. As I add new items the ones already there will need to shrink to make room for the new item. As items are removed the remaining itmes can grow a bit more again. Get the idea?

IMAGE
http://pixelfumes.com/uploads/shrinky.gif

Thanks guys!
-Sarge

Placing Items Above Loaded Movie Items
Ok,

I have a blank page (BASE.swf) that is eventually filled with backgrounds, graphics, etc. all through Load Movie commands- they start at level 1-7. My question is:

How do I put items that show above them? It doesn't matter where I put them in the BASE file, the loaded movies always appear above them...

Ideas?

Thanks,

Joe

List Item W/ Multiple Data Items - How To Select Data Items?
I have a list component (myListBox) that is showing the labels for some data items read in from an XML file. Each item in the list has an associated name, description, and path (they're mp3 files) and they are named accordingly in the XML tags.

Using myListBox.selectedItem.label gives the correct label but myListBox.selectedItem.data is undefined. I've tried using the XML tags after the data selector (e.g. myListBox.selectedItem.data.path) but those don't work, either. All of the examples I've found in the docs show only a single data element associated with each list item.

So, if a list item has multiple data items associated with it, how do you select them using the listBox.selectedItem property?

TIA,

rgames

Actions Are Overriding Other Actions Or Being Caught In A Loop Only On Double Click
I have a movie which I use actionscript to move things on/off stage to create different pages. Everything works great unless you double click a button.
When double clicking it makes objects "stick" in place and they will not move even though another command should make them move off stage (movie gets stuck). On a single click, the objects do what they are commanded to do. I even tried setting a variable to disable the button click if it has already been clicked. What causes this?

In the code below, the objects in the function home() will not leave the stage once the services button is double clicked (they are commaned to ease off the stage once other mc's are pressed) . BUT it works if only the services mc is only single clicked...please help. I'm pulling my hair on this one and about to start pulling my teeth.


if (_global.whichMovieLoaded != "services" && _global.isMovieLoaded != "stop") {
_global.whichMovieLoaded = "services";
services.onPress = function() {
remove();
function Pause() {
// bring home
home();

clearInterval(PauseInterval);
};

PauseInterval = setInterval(Pause,1000);

valet.easeY(400, 1.09);
itinerary.easeY(425, 1.09);
dining.easeY(400, 1.09);
ground.easeY(425, 1.09);
};
};



function remove(){
valettxt.fadeOut(9);
diningtxt.fadeOut(9);
itinerarytxt.fadeOut(9);
groundtxt.fadeOut(9);

mindtxt.fadeOut(9);
nauticaltxt.fadeOut(9);
scenictxt.fadeOut(9);
terrtxt.fadeOut(9);

mind.easeY(650, 1.09);
nautical.easeY(650, 1.09);
terr.easeY(650, 1.09);
scenic.easeY(650, 1.09);

valet.easeY(650, 1.09);
itinerary.easeY(650, 1.09);
dining.easeY(650, 1.09);
ground.easeY(650, 1.09);

logo.easeX(950);

imageLoader.unloadMovie();

};
//takes objects back to the home page
function home(){
maui.easeX(200, 1.09);
con.easeX(200, 1.09);
bar.easeX(625, 1.09);
patio.easeX(400, 1.00);
patio.fadeIn(2);
discover.easeX(625, 1.09);
discover.fadeIn(1);
imageLoader._alpha = 0;
VIP.fadeIn(.9);
};

Actions On The Main Page..do They Affect Actions On Movie Buttons?
ON the home page I've created, the buttons I used with the code in my previous thread ("two questions about HTML publishing and buttons"), I added an on rollover action to the actions layer of the main timeline (not the movie button timeline) so that on rollover, a picture would change according to the button that was rolled over. I did this for all three buttons. The rollover action works great, but now the links don't work in either the html OR the swf version. Would the added action disable the movie-clip button actions? Here's the added main timeline code, edited for space: photobtn_mc.onRollOver = function() {
gotoAndStop(2);
photobtn_mc.onRollOut = function() {
gotoAndStop(1); ( Again, help is greatly appreciated!)

Actions On Clip Kill Parent Actions? Workaround?
Hello, i have a nav clip, with rollover actions. When the nav clip is rolled over, i want the nav to zoom in. Which isn't a problem,
there are 6 buttons inside the nav clip which have onRelease actions. However, since the nav clip (the parent to the buttons clip) has the rollover state, it kills the actions of the buttons. Is there a workaround for this?

here is my code, the clip structure is nav.buttons.but1 etc.

code:
Stage.scaleMode = 'noScale';
import flash.filters.*;
//------------------------------------------------------------------------------------------------------------------
this.nav.onRollOver = function() {
};
this.nav.onRollOut = function() {
};
//------------------------------------------------------------------------------------------------------------------
for (i=1; i<=6; i++) {
nav.buttons["but"+i].onRelease = function() {
trace(this._name);
};
}

[mx2004] Actions Window Won't Show Actions
Well the problem is rather annoying and stops me from doing any work...

If I open my actions window, it opens up, but I just have a gray area inside the window, I can't put any scripting in, and even funnier, if I try to put my actions window locked into place it will actually crash flash entirely without any error message.

Any help would be much appreciated, thanks in advance!

Calling Items From Library And Getting Number Of Items In Library
If i have a folder named questions in my library and i want to get the number of items in that folder how would i do that. I tried the code below but was unsucessful. Is this possible threw code? Or do i need to hard code my array.

var qst = new Array
trace(questions.length)
for(i=0;i>questions.length;i++){
qst[i] = questions.items.length
trace(qst[i])
}

Thanks
Josh

[F8] Rewriting Button Actions To This.on Actions
Evening! I could do with a little help if possible - basically I need to combine a number of different button commands into script for a movieclip button.

I want these actions

PHP Code:




on (rollOver) {    // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name.    slider.xMove = button_1._x;}on (rollOver) {    tellTarget ("_root.PC_Cursor") {        gotoAndStop("Finger");    }}on (rollOut) {    tellTarget ("_root.PC_Cursor") {        gotoAndPlay(1);    }}on (release) {    if (_root.CENTERpages.clip._currentframe == 10) {        _root.CENTERpages.clip.gotoAndPlay(11);    }}on (release) {    if (_root.world._currentframe == 2) {        _root.world.gotoAndPlay(1);    }}on (release) {    tellTarget ("_root.CENTERpages") {        gotoAndStop("name");    }}on (release) {    unloadMovieNum(1);}on (release) {    if (_root.CENTERpages.A1._currentframe == 1) {        _root.CENTERpages.A1.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A2._currentframe == 1) {        _root.CENTERpages.A2.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A3._currentframe == 1) {        _root.CENTERpages.A3.gotoAndPlay(2);    }}on (release) {    if (_root.CENTERpages.A4._currentframe == 1) {        _root.CENTERpages.A4.gotoAndPlay(2);    }}







to work like this in a movieclip:

PHP Code:




this.onRollover = function() {    // slider - Movie Clip's Instance Name. button_1 - Button's Instance Name.    slider.xMove = button_1._x;}this.onRollover = function() {    tellTarget ("_root.PC_Cursor") {        gotoAndStop("Finger");    }this.onRollout = function() {    tellTarget ("_root.PC_Cursor") {        gotoAndPlay(1);    }this.onRelease = function() {    if (_root.CENTERpages.clip._currentframe == 10) {        _root.CENTERpages.clip.gotoAndPlay(11);    }this.onRelease = function() {    if (_root.world._currentframe == 2) {        _root.world.gotoAndPlay(1);    }this.onRelease = function() {    tellTarget ("_root.CENTERpages") {        gotoAndStop("name");    }this.onRelease = function() {    unloadMovieNum(1);}this.onRelease = function() {    if (_root.CENTERpages.A1._currentframe == 1) {        _root.CENTERpages.A1.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A2._currentframe == 1) {        _root.CENTERpages.A2.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A3._currentframe == 1) {        _root.CENTERpages.A3.gotoAndPlay(2);    }this.onRelease = function() {    if (_root.CENTERpages.A4._currentframe == 1) {        _root.CENTERpages.A4.gotoAndPlay(2);    }







but it doesn't work!!! period! am I supposed to be keeping all of the functions together after I call the action? ie; all of the onrelease functions run on after a single this.onrelease call?
or have I took the wrong approach altogether on this?

Any pointers welcome!

Frame Actions Vs Object Actions
In preparation for AS3 which no longer supports object actions, I am on the process of converting flash movies created with Object actions in AS2 to Frame actions. While I understand some valid reasons for switching to Frame actions, I am discovering that converting button and clip actions to Frame actions is a very tedious process and so far, more than half the files I have tried to convert do not work. Having worked with Flash since version 3, I know about timelines, targeting and variable scope but this whole conversion process is driving me nuts! Is there a place that I can go to or tutorials available that teach how to attack this conversion? What are the main guidelines in converting from Object to Frame Actions? I have looked in the CS3 Help (from the program or Adobe online) and I have not found anything to guide me. Am I the only one experiencing this? Thanks for your help.
Yvan

AttachMovie() Within Another AttachMovie() Created Instance?
I'm still struggling away on my web site, but I've made quite a bit of progress and I think my code has cleaned up quite a bit. I still have the issue of not being able to attach my new content box movie clip when the button is pressed. I am successfully able to load the data for that instance of the tab, and can access the variables. It also is able to run the newContentBox() function inside it with success, but when it tries to run attachMovie(), nothing happens. Could this be a problem with my depth? Or is it my nesting?

I have been thinking about making a global variable for depth that will increment each time anything is created, so every movie clip is guaranteed to be on its own depth. Would this be a solution?

The site can be viewed here.
The source can be viewed here.
All the data files are located in that directory as well.

This is really driving me nuts, and I want to get something solved so I can move onto the submenu creation.

Actions Of One .swf Controlling Actions Of Another .swf
Hi,

I have a  musical jukebox on a project i am making and the way I did it was on the main timeline I have a script

stop();
unloadMovieNum(66);
loadMovieNum("song1swf",66);

Then at the end of each swf (which is each song in the jukebox) I load the next song so the swf's loop from 1,2,3 and back to 1.

But I give the option to choose each individual song by loading up each seperate swf. I have song info that is displayed on the main timeline, so the button for each song leads you to a different frame on the main timeline.

But, for example,  a person chooses song 2 and it plays and then proceeds to song 3 but the info still displays song 2. Because it has stopped on that frame. Is there a way to move to a different frame on the main timeline when one song.swf passes to the next?

Thank you for your help,
GD


AttachMovie Inside Another AttachMovie
is it possible to attach a movieclip, and then attach another inside of it? i'm trying to load in images via using loadMovie and XML (a little background) i want the image to be dropped in to have a mask applied to it so that the image appears as a rounded rectangle... here's my code for the for loop that attaches the movie clips...


PHP Code:



for (i=1; i<=totalImages; i++) {
                attachMovie("multiplebox", "box_"+i, i);
                movieNamer=_root["box_"+i];
}




is it possible to attach a movie inside of 'box_"+i'?

AttachMovie Within An AttachMovie? Not Working
So I've finished a project (let's call it Project Blue) where I use attachMovie which references a folder (of swf's) to place each page of the swf. It worked fine. Next, I made a master 'shell' to place this project (among others) into. To do that I used attachMovie again to place Project Blue in the shell.

But now my attachMovie pages for Project Blue won't show up. Does Flash have a problem with using an attachMovie within an attachMovie?

Thanks for any insight on this....

AttachMovie Nested AttachMovie...
I have in the root timeline an empty movie clip that loads other movies inside of it. Using the attachMovie function.

Inside one of these attachMovie clips I have a nest "attachMovie" clip as well but for some odd reason it's not working. Is there anything I should be aware of when nesting an attached movie?

Help, Items
And i want solicit you help with something that i'm trying to do. I
learning flash and i'd like to do a site for a restaurant, very nice,
history, rooms, maps, interactive menu... all this is ok.

I want that when you click a items from the menu list of the
entry,dessert and other... , with the name. code number, price and it go to a little bill with a total below and generate a bill number, to know how much cost a dinner a this restaurant and then print this little bill and go with it to the restaurant.

How do i do this - wen you click the list, these items go to this bill
and you can add a coffe or delete a sirloin because it's
expensive...by example.

What do i need? please.
I'll be eterny gratefully.
Thanx !

Items+
Ok I made items for my game but aint to sure how should use them.

here are the ideas of how we shoudl use them
1.assaing each "Item" to a button (a-l) and you could hit that button to use it during the level.

2.Buy the items and use it for the whole level.

3.find each item in the level and use it through the remaining of that level.
What one do you think
1 2 or 3

Interactive Items
(Hello to all, this is my first day and post.)
I can't figure out how to set up an "inventory system" for an adventure game, where you pick up items, use them, etc.

Can anyone give me some tips?

Dockable Items, How ? - Please
anyone know how to make dockable items ?

taking a icon docking it then it activates another area ?

cant seem to find anything on the site, maybe i missed it i dont know. maybe theres another site ? eh

anyhelp would be great

Export Items
When you export out of flash to a .swf file does flash only export the symbols used in the movie or everything within the library? Also, is there a way to "trim" down the library to only include what's needed in the movie without going through by hand and deleting symbols? Any help is much appreciated.Thanks.

Un-used Library Items
Do un-used library items still contribute to the final .SWF file?

Adding Items?
Please help! I have just started using MX, and was just wondering how to add items to certain frames but not the ones before it (and delete them when I'm done with them). Thanks!

Moving Several Items Together
Hello,
I have several items (buttons, graphic symbols) that I want to move on the stage at the same time, as if they were all tied together and placed on the same layer. The problem is that each item has to be on one particular layer to be able to motion tween them. How can do that? Thank you for your help.

Date And Items
OK I work for an interior design company as a flash designer. What I am doing is creating a web page for the company that has a photo slide show with many different sections (Tables, desks, lamps, etc). What I want to do is create a line of text under the pictures that says "Last updated 4/3/2003 - 216 Items online in this category" for each category but I want to actually have it write the date and number of items in the category instead of me having to write it in every time. The categories are all split into separate swf files. and all the pictures are split up within those swfs. How would I be able to do this? If I can't I'll just have to type it all in.

-= Greendog =-

Library Items
Hi,

I've got a clip, which contains 2 further clips (say 2 squares as clips, in different layers, same frame), they are not on the stage, but are setup with a name in the library ready exporting to the actionscript.

My question is, do I have to put the parent clip to the stage to be able to get the relative distances between the child square clips? or is there way of getting that data without making an instance out of the parent clip?

thanks for any help

phil.

Sum Array Items
how the hell do i simply sum all array (number) items ?

// convert each element of the array to a number
for (var i=0; i < my_arr.length; i++) {
my_arr[i] = parseInt(my_arr[i]);
}
trace(my_arr); // output: 1, 12, 34

// loop through each array element, display it's datatype
for (var i=0; i < my_arr.length; i++) {
trace(typeof my_arr[i]); // output: number
}

now i want to sum the array values (1, 12, 34)

how ???!!?!?!?!

Looping Certain Items And Not Others
I would like to make a navigation bar that has little shapes that float in the background, not even having a function, but to look good. i want it so i can have my buttons functional and staying in the same place, yet have things moving in the background, can anyone tell me how i loop certain things in a movie and leave other things so they look like they dont move once i animate them in and are functional?

Help With Menu Items
this maybe a little confusing, but ill try to explain.
i have a menu that is 5 little boxes, with smaller,lighter coloured box in the middle of each. when i rollover a menu item, i want the little box to move onto the mouse, but not exiting the bigger box (so the mouse has a magnetic effect on the smaller boxes only when rolled over the boxes they are contained in). then when i roll out i want the little box to snap back into centre with an elastic effect. i have seen this done before and would like to know how its done. its a shame i dont have an example to show you or anything decent of my site so you can get a better idea of what im after.
if any of you understand what i want, a solution would be very very very much appreciated.
cheers guys
jh

Counting Items
Hey, I need to know if this is possible with flash ... or do I need to use PHP or XML

Here is what I want to do ... I'm setting up a website for a client and they want to upload new pics when they want, to add to the site ... so I'm going to dynamically place all the pics on the site using XML ... but here is the problem .... I need to run a loop to place all the images ... but I won't know how many images are going to be in the folder at any given time ...

My question is ... can flash get the number items in a folder ... or do I have to use PHP to get the number and send that back to flash ...

If I have to that why ... could someone help me write the code ...

And if the flash way ... what are the commands ....

thanks for the help

Library Items
I have a large list of files in my library, and i've ben trying to organise them into folders. I've noticed that if i have a folder at the top and want to drag a file from the bottom up to it, it wont let me! i have to rename the file to make it go near the folder i want to put it into. surely theres a better way than this? have i missed something??

Too Many Items To Drag
I have alot it on the stage that can be drag and drip in an area but the problem is that there are too many of them . the attached is a school project of shops and item i have written the code and would like to shorten it
thank tooo many
PS exaple of the project

Items Falling
Ive tried countless times today to get items to randomly fall from the top of the screen, but only once then they stop, with a failure each time. I want the items to fall with like a minute to half minutes time between each, and then i guess like a variable or something so that they only fall once, but with everything ive tried, they just constantly fall without stopping
Help is appreciated

Reaching Through Items?
Hi,

I'm wondering if there's a way to reach through items in Flash? And here's what I mean by that: Sometimes I have an item completely covering another item. I can click on the top item, but not also the one underneath it. Now obviously I could select the layer that the item underneath it is on, but the trouble is that I want to select both items. I want to group the item on the bottom layer with the one on the layer above it IF that's possible in Flash (I really don't know). In print design, I use QuarkXpress, and there's a combination of keys I can hold down to reach through items and click whatever's behind the item. I have a Flash file where I have a couple of items (an image and an invisible button) that are EXACTLY the same size (won't bore you with the explanation why). Is there a way I can grab both of them and group them together so that I can easily move them around? I can drop the button on the same layer, but it still makes no difference (can't reach both of them at once when they're at the exact same x-y coordinates).

This might be a really basic question, I don't know. Still only on my second-ever Flash project.

Thanks, Phyllis

Duplicate Tow Items
hi all this is my problem i want to duplicate two item each one 10 time I tried but failled

Preloading Two Items
Hi All

I hope someone can help me cause I dont have any hair left. I am trying to load two items into my movie. One item is an external swf and the other is the content of the main movie. (it maybe easier to view the attachment). Both items need to be fully loaded before the second frame.

I have the following code in my preload mc

this.onEnterFrame = function() {
loadMovie ("external1.swf", "_root.container");
texty.percent = mypercent + "%";
texty._y = bar._y - mypercent;
mycontentload = _parent.getBytesLoaded();
mypictureload = _root.container.getBytesLoaded();
mycontenttotal = _parent.getBytesTotal();
mypicturetotal = _root.container.getBytesTotal();
mycontentpercent = Math.round((mycontentload/mycontenttotal)*100);
mypicturepercent = Math.round((mypictureload/mypicturetotal)*100);
mypercent = mypicturepercent + mycontentpercent;
mytotal = mypicturetotal + mycontenttotal;
bar._xscale = mypercent;
if ((mypercent == 100) and (mytotal>2000)) {
delete this.onEnterFrame;
bar._visible=1;
_root.gotoAndStop(2);
_root.container.play();
}
};

Can anybody help me please. I just want to relax for a bit and this is driving me insane in the membrain.

Thanks

DRAG ITEMS
hEY I WANTED TO KNOW HOW TO PUT MULTIPLE OBJECTS AND HAVE THE USER CLICK AND DRAG EACH ITEM.
wHENEVER I MAKE IT ALL THE OBJECTS MOVE AND DRAG......

Collecting Items
I can't really get the shooting code to work yet and I need this for my Flash class for Monday. I might try making the game work with collecting items on the ground just in case I can't get shooting to work. I want the code to randomly put in the image I called "cell" in the instance name, object name, and instance name... I also want the guy to be able to touch the "cell" picture and it will dissapear...

P.S. I'm sry I'm asking a lot from people, my teacher let us play games in school all year long so we didn't learn crap. Now she gave us a final project and I can't spend time figuring out how to code it myself... In the future I promise to try first, then ask about any errors I come accross. My apologies!

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