Join 109,337 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,039 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
I'm trying to run your code, and getting the following error against your playlist.as: ActionScript 2.0 class scripts may only define class or interface constructs. The error continues to appear when the include directive from frame 1 for dock20_throwaway.fla is removed, so I'm guessing that you are calling to playlist.as somewhere else as a class rather than a code snippet. Thing is, so far I can't see where you're doing it.
Any ideas?
This post has been edited by thehat: 18 Mar, 2008 - 01:20 PM
Right, I'm still now 100% sure of how this all works, but here are some things for you to look at:
Where do you attach home.playlistHolder_mc that you use as a load target for Playlist.swf (dock20_throwaway.fla, frame 84, line 103)?
On line 177 (same move and frame) you say var lastMC = menuHolder["item"+(numOfItems-1)]; but the items are attached to home, not menuHolder. This is also a problem in scrollMenu.as. line 71.
Something about the playlist.as file causes errors, and although they don't seem to be site breaking it might be as well to just put that code on the timeline instead.
I hope this gives you something to go on, I will give this thing more thought tomorrow if you're still stuck. Good luck!
Right, I'm still now 100% sure of how this all works, but here are some things for you to look at:
Where do you attach home.playlistHolder_mc that you use as a load target for Playlist.swf (dock20_throwaway.fla, frame 84, line 103)?
On line 177 (same move and frame) you say var lastMC = menuHolder["item"+(numOfItems-1)]; but the items are attached to home, not menuHolder. This is also a problem in scrollMenu.as. line 71.
Something about the playlist.as file causes errors, and although they don't seem to be site breaking it might be as well to just put that code on the timeline instead.
I hope this gives you something to go on, I will give this thing more thought tomorrow if you're still stuck. Good luck!
Hey thanks alot dude,
I checked out your web sites. Really cool. I have the reservoir dog game. I'm stuck in that game too. HaHa don't worry I'll figure that out myself.
Well back 2 flash. I tried making everything; home.menuHolder. and nothing will shows up. It's kinda important to have it inside the menuHoler because thats what makes everything float around when the screen is resized. But I guess you already know that.
I have this inside the scrollMenu.as, but I'm not sure if it's the right code because I call the xml also at FRAME 84 LINE 23 in dock20-throwaway
The reason nothing shows up when you make everything home.menuHolder is that on frame 1 you position menuHolder a long way off stage. If you use the debugger you can see all the items attached to it. You should probably add menuHolder to your positioning code on frame 1 to keep it where you want it.
Adding everything to the menuHolder has another problem, it breaks the carousel action. This is because the scope within the mover function shifts, and it is now looking inside the menuHolder for a load of variables that are on the root. This mover function fixes that:
For me, this makes the selected icon leave the carousel and move to the top right.
Finally for now, in Playlist.fla Move tracklistContainer line 37 you create an infinite loop if the trackLists Array is empty. Put in a check for that before starting the loop:
as
if(_root.playlistTracks.length > 0) { for (i=1; i<=_root.playlistTracks.length; i++){ if (i>0){ removeMovieClip(_pl); } } }
I now get the playlist displayed, but with no info because I don't have the XML files, and it seems to display too soon. Hope that sets you on the right path!
I'm just having trouble still intergrating what your telling me. I had that playlist.fla line 37 commented out.
So now I've uncommented it and it doesn't like how I've placed my code.
CODE
function loadPlaylist(num:Number):Void{
_root.XMLtrackListing.ignoreWhite = true;
_root.XMLtrackListing.onLoad = function(success){
if(_root.playlistTracks.length > 0) { for (i=1; i<=_root.playlistTracks.length; i++)} if (i>0){ removeMovieClip(_pl); } for (var i:Number=0; i<_root.playlistTracks.length; i++) { //removes the previous elements from the playlist _root.playlistTracks.pop(); }
var AlbumRoot =_root.XMLtrackListing.firstChild; var tracksNB = AlbumRoot.childNodes.length;
Could you send me the file so that I can see what you did?
I also tried putting the whole code of the carousel in the menuHolder MC and the carousel works and I got the plLoader to show but still the playlist doesn't show.
I also attached that file if you wanna take a look.
Thanks so much, bmcc
Attached File(s) dock20_MINE.zip ( 111.36k )
Number of downloads: 38
I think that's because you are attaching the items in your carousel to the root (or home as you call it on frame 84), but in the function that is called when you click an item you refer to menuHolder. Make sure every call to one of those items, including the attachMovie, uses menuHolder, not home or _root.
Then, if you can't see the carousel, look in the debugger and check a- if the items are attached to menuHolder, and b- the x and y position of menuHolder. You will probably want to remove the absolute position values you give menuHolder on frame 1 and add it to your positioning code near the bottom of that frame.
I'm at work right now, but I'll post the version I have with that error fixed later on if you're still having problems.
This post has been edited by thehat: 25 Mar, 2008 - 10:53 AM
As promised, here are the versions of the files I have that I've made changes to. They're far from perfect, but it gets as far as needing the albums XML file. The playlist box still appears far to soon.
As promised, here are the versions of the files I have that I've made changes to. They're far from perfect, but it gets as far as needing the albums XML file. The playlist box still appears far to soon.
But could you send the old files I sent you, cause I'm getting undefined in the text box's and the play list doesn't show ups still. I guess I changed stuff that I shouldn't have. Also when I click on it it shrinks super small and goes into the top left hand corner, I then have to pull the window open to scale it bigger. Still away off but getting allot closer though thanks.
But it does know find the xml I can see that it does.
Sure, this is the whole content of my folder minus the empty swfs I had to create for about, contact, etc. I really want to see this thing working now!
Download Link (DIC's upload keeps timing out so it's a direct link)