Simple Flash Question

  • Thread starter Shannon
  • 25 comments
  • 1,422 views
There is a trick to doing this. First you need to draw a square the size of your canvas. Next, select the new square and the object that you want centered on the canvas. Click on the alignment tool and select the vertical-center and the horizontal-center. You will now notice that your object is centered on the canvas. You can now delete your square as it is no longer needed.

Hope this helps......, it's a work-around, but it does work.

:cheers:

P.S., I will check at home where I have MX installed, at work here, I only have Flash 4.0, which doesn't not have a "Center to Canvas" type of option.
 
Originally posted by Pako
There is a trick to doing this. First you need to draw a square the size of your canvas. Next, select the new square and the object that you want centered on the canvas. Click on the alignment tool and select the vertical-center and the horizontal-center. You will now notice that your object is centered on the canvas. You can now delete your square as it is no longer needed.

Hope this helps......, it's a work-around, but it does work.

:cheers:

P.S., I will check at home where I have MX installed, at work here, I only have Flash 4.0, which doesn't not have a "Center to Canvas" type of option.
I'll give it a try. Thanks Pako.
 
Eddy did you ever go through the tutorial in Flash MX? The red car ad? I'm doing it now and am totally stuck on one part, the loadVariable part. If you've done it or think you could help let me know please. You too Pako. It's the same question I made a seperate thread about a while back. Now I'm back to it and still stuck.
 
Maybe I'll take a look at it tonight! The last Flash tutorial I took was back in version 4. ;)
 
Originally posted by Pako
Maybe I'll take a look at it tonight! The last Flash tutorial I took was back in version 4. ;)

Thank you.:) It's so frustrating to be sailing along and then hit a wall. :banghead:

It's the part where the text is supposed to load and you type in the path to the .txt file. All the files are wherever the instalation put them by deault.
 
Alright, here goes. The problem is with the path name "../assets/copy.txt" The problem is that this style of relative path addressing only works from the browser side, but is not reletive to previewing your test image. Trying uploading this project to your site with the same directory structure, and I bet it works. For the sake of this tutorial, try the exact path in the variable statement as follows:

Code:
loadVariablesNum("G:\\Program Files\\Macromedia\\Flash 
MX\\Tutorials\\FlashIntro\\assets\\copy.txt", 0);

where the drive letter G: is the drive where you have flash installed, for your example, C: would probably be the case.

This will allow you to preview dynamic text within flash. The other way should work, but I think it's a bug in the MX Version.

Hope this helps...

:cheers:
 
Originally posted by milefile
Eddy did you ever go through the tutorial in Flash MX? The red car ad? I'm doing it now and am totally stuck on one part, the loadVariable part. If you've done it or think you could help let me know please. You too Pako. It's the same question I made a seperate thread about a while back. Now I'm back to it and still stuck.
Tutorial, no. I done all the lessons in Flash MX though if that's what you mean.
 
milefile,

Well, have you had any luck with your "Dynamic Text" yet?
 
Pako I have not had a chance to work with it again. Hopefully tonight. I spent last ngiht pulling weeds and spending an hour and a half buying paint at Home Depot :irked: My mom is in town so tonight we're going out to dinner with her, and I still haven't played with my camcorder yet either. I think the world is prepping me for fatherhood.

But I did check out how you did it. I had a feeling that might work and thought of trying it. But I really wanted to be sure I wasn't making some obvious mistake. I've struggled with code for hours only to find out it was a misspelling :banghead:

I also agree with you assesment of loading the text. Seems better to just make it part of the background (that is what you meant, right?). I will upload this tonight and put the link up here.

I wish I still had that "PC Anywhere" thingy. I could do it now...
 
An update on this....

I tried it again this morning under a different method of uploading the copy.txt file. Before, I was using Dreamweaver to edit and upload the new copy.txt file. In using this method, the problem was as discribed with the edited text in the copy.txt not showing up unless I cleared my cache.

Well, I tried a new method of accessing the file through a standard FTP program (actually using Internet Explorers FTP) to access, edit, and re-upload the copy.txt file. When I did this, the change took effect upon reloading the page WITHOUT having to clear my cache.

Try the link above now, and see if you can see the change I made in the copy.txt file.
 
Originally posted by Pako
An update on this....

I tried it again this morning under a different method of uploading the copy.txt file. Before, I was using Dreamweaver to edit and upload the new copy.txt file. In using this method, the problem was as discribed with the edited text in the copy.txt not showing up unless I cleared my cache.

Well, I tried a new method of accessing the file through a standard FTP program (actually using Internet Explorers FTP) to access, edit, and re-upload the copy.txt file. When I did this, the change took effect upon reloading the page WITHOUT having to clear my cache.

Try the link above now, and see if you can see the change I made in the copy.txt file.

Yes. I didn't realize the way you uploaded something could affect the way the browser displays it. But is sounds like an IE thing...?
 
Probably an IE thing for sure. From what it seems, IE doesn't recognize the newly uploaded copy.txt file as a "new" file, and therefore, loads the text from cache when the file is uploaded using Dreamweaver. IE, however, does recognize it as a "new" updated file when using an external FTP program to upload the file, and thus displays the updated text from the file. Which is quasi-acceptable. ;)

Hope that all makes sence.....
 
Originally posted by milefile
Do you think that had anything to do with my problem? I'd think not because it did show an error.

Probably not, but I would say that it could be a problem down the road. Just some info to stuff in the back of your head as you progress towards using the loadvariable command accross different domains. For example, a document.txt from your vacation site domain to your baby domain.
 
Originally posted by Pako
Probably an IE thing for sure. From what it seems, IE doesn't recognize the newly uploaded copy.txt file as a "new" file, and therefore, loads the text from cache when the file is uploaded using Dreamweaver. IE, however, does recognize it as a "new" updated file when using an external FTP program to upload the file, and thus displays the updated text from the file. Which is quasi-acceptable. ;)

Hope that all makes sence.....

I'll be using WS FTP Pro. You can FTP in IE?
 
You can connect to any FTP site using IE by simply typing "ftp://www.yoursite.com/" and a login window should appear. At that point, it should display the contents just like any other folder, allowing you to drag-n-drop to and from the browser window.
 
I just tried that and we're behind a proxy server firewall here at work so it wouldn't work. I can't do anything from here. And it's not really a thing I want to ask the boss about. He's the only one allowed to touch the network.

Ah... the vacation pictures. One of my flash projects will be to re-do that site so that all the thumbnails horizontally scroll and the full sized image appears with a mouseover.
 
:lol: I was just thinking the exact same style for my site as well. How cool is that anyways, eh? :D

Anyhow, let me know if you have any problems with this..., I'm sure we can figure it out.

:cheers:
 
I just realized I have no idea how to make a flash movie work in a web page :rolleyes:. Do you just do like a picture?

I'm so stupid with Flash. Besides the lessons and as far as I've gotten in this tutorial, I know nothing.

Pako, thank you for your help. I owe you one... two if you tell me how to get it up on the net.
 
Ah, the red car tutorial. I had a look at that and gave it a go. The thing I can't do is getting the buttons to open up a webpage. The Dynamic Text was easy.
 
Originally posted by Eddy
Ah, the red car tutorial. I had a look at that and gave it a go. The thing I can't do is getting the buttons to open up a webpage. The Dynamic Text was easy.

If you got it to work using "test movie," please do share...:confused:

Also, regarding getting a Flash movie to appear in a web page... I'll bet if I just went ahead with the tutorial, it'd tell me how. But if anyone wants to give me a head start...

I'm going to guess you do it like a picture? Or not. I tried to drag it into a table in Dreamweaver and it said "document failed to open" or something like that.
 
I forgot how I got the Dynamic Text working. I should read over the tutorial again. Where you specify the location of the text document, make sure you type in C:\Program Files\Macromedia\Flash\Tutorials\FlashIntro\assets\copy.txt

As for getting something to align in the middle of the canvas, I worked out how to do it! Select the shape or symbol with the arrow tool. Then open up the Align panel and select the followring:
 
I always just cut whatever needs to be centered, then I paste it. It centers it in the middle of the screen, but that might just be with Flash5...
 
Back