Groups | Blog | Home
all groups > flash actionscript > may 2005 >

flash actionscript : Loading... A hot topic.


MJMCrew1
5/6/2005 12:00:00 AM
As is always the case I am trying to load a movie in on a specific frame of my
main timeline. The main timeline has a layer calleg 3DOne and 3DOne contains a
movieclip symbol that I am using as a container for the movie I am loading. The
following code is what I have in the actionscript for that frame.

loadMovie("Logo1.swf",_root.3DOne.Graphic);

The following is the error I get when I compiled the movie.

**Error** Scene=Scene 1, layer=Actions, frame=145:Line 1: ')' or ',' expected
loadMovie("Logo1.swf",_root.3DOne.Graphic);

Total ActionScript Errors: 1 Reported Errors: 1

I am sure that it is something stupid but please give me some guidence. I am
kinda new to this Actionscript thing.
MJMCrew1
5/6/2005 12:00:00 AM
Thank you,

That fixed that problem. Now it seems as though the movie is not playing though. Is may dont notation seem to be in line for placing the desired clip into a movie clip?

Patrick Bay
5/6/2005 12:00:00 AM
Sorry,

I don't understand what you said there. Could you rephrase the question?

[quoted text, click to view]
MJMCrew1
5/6/2005 12:00:00 AM
Sorry, the fingers and the mind are going at two different speeds. The syntax
error went away. However... now the movie will not play. My questions is...
does my use of the dot notation seem to be fine? I am seeing my Graphic
container (which is a yellow rectangle) but the movie I am trying to load into
it is not there.
Patrick Bay
5/6/2005 12:00:00 AM
Don't forget to also change the instance name of the container clip. The dot
notation is fine but if the clip doesnt have the same name, it won't know where
to load the movie :)

Regards,
Patrick

[quoted text, click to view]
MJMCrew1
5/6/2005 12:00:00 AM
Hola,

I finally got what you were saying. I made sure that the instance name was
correct. I am still not having any luck. Post something... well yeah... there
is the problem. That is what I am currently working on. I have reduced the
movie I am working with to 24K. Would it be OK to email it to you to take a
look at?


Patrick Bay
5/6/2005 1:42:30 PM
Hi,

The problem is your movie clip name. You can't start an identifier with a
number. If you remove the number the problem should be fixed.

Regards,
Patrick

[quoted text, click to view]
Patrick Bay
5/6/2005 3:34:24 PM
Ahh,

Well, when you say _root.ThreeD it refers to a movie clip or object, not the
timeline. So, Graphic could be in a movie clip or object named ThreeD, not a
layer. Layer names are in no way accessible in Flash.

[quoted text, click to view]
Patrick Bay
5/6/2005 4:49:08 PM
You could also try something like this:

_root.Graphic.loadMovie('Logo1.swf');

Make sure that this code is on the same frame number as the Graphic movie
otherwise it won't exist when you try to load. One other thing is to make sure
that the Graphic movie actually has an instance name of Graphic, not just a name
of Graphic. This is very important. If you're still having trouble you can feel
free to post the FLA to a site or something and I could help you out. It's
sometimes difficult to fix problems due to differences in terminology :)

Regards,
Patrick

[quoted text, click to view]
MJMCrew1
5/6/2005 7:23:10 PM
Yeah,

The new layer in the master timeline is now ThreeD so the code is as follows.

loadMovie("Logo1.swf",_root.ThreeD.Graphic);

I typically did very simplistic master timeline movies. This is my first
adventure in doing something more complex.
MJMCrew1
5/6/2005 8:09:34 PM
Ok,

Well that makes perfect sence. I am going to type exacty what I did because
something I did is totally messed up. If I repeat myself from a previous post I
appologize.

In the master timeline I created a layer called ThreeD.
In that layer I inserted a rectangle that was saved as a movieclip called
Graphic.
The purpose for doing this was to contain and position the movie I am
loading.
Then in the frame where I wanted to load the movie I have the following code.
loadMovie("Logo1.swf",_root.Graphic);

The movie is 100 frames long, I generated the SWF file from Swift3D. So let
the movieclip Graphic visible for 1oo frames after the frame I am trying to
load the movie in. This is still not working. I am starting to think that I am
having a hiarchy problem more severe than just trying to access a layer.
(hehehe)Should I give up now or is there something obvious I am doing? I would
post the code but it is only that one line and I would send the file but it is
quite large. So this is the only way I can think of explaning this. Sorry if
there is confusion.

Thanks in advance.

MJMCrew1
5/9/2005 12:00:00 AM
OK,

Here is a watered down version of what I was trying to do. The idea here is to
get the logo animation to look like it is trailing a little flare animation. In
frame 6 on layer logo I added a target symbol. I would like the movie Logo1.swf
to play in that section. To make this happen I am attempting to use the
loadMovie opperator but I cant seem to have any luck. Please offere up any
comments and suggestions.

Thanks.

http://www.mjmproductionsllc.com/Web1/FlashStuff.htm
rg_rob
5/9/2005 12:00:00 AM
Hi,
Are you sure the movie is not playing? I am having what seems to be a related
problem with attachMovie. the movie I attach never appears but I can monitor
its _currentframe property and see it is actually playing, I just can't see it.
I just posted my problem with this and am waiting for a reply.
MJMCrew1
5/9/2005 12:00:00 AM
to be honest with you... I am not sure if it is even playing. The only way I
have been able to see it is to you the loadMovieNum operator but that trashes
the flare layer. I would like the SWF movie to play behind it.
AddThis Social Bookmark Button