when i import my mc to a scene the rollover engages when i rollover the invisible blue box and not the image. any ideas would be appreciated. Thanks in advance!
Printable View
when i import my mc to a scene the rollover engages when i rollover the invisible blue box and not the image. any ideas would be appreciated. Thanks in advance!
I take it that by "invisible blue box" you mean the "hit state" of a button. Sounds like you have code associated to the button and not the mc. Of course, by not seeing any code or examples then it's strictly just a guess.
this is similar to what i have for all of the rollover mc. its not the hit state that i am referring to. Its the box that shows you how big the image is or the blue outline box you can adjust the size. that for some reason is what is engaging my rollovers.
I will also be trying upload my swf file shortly.
addEventListener(MouseEvent.CLICK, rollF);
function rollF(event:MouseEvent):void{
gotoAndPlay("end");
}
Here is the file:
http://megaswf.com/view/416d08b7a9b4...35c5fbc47.html
when i import my mc to a scene the rollover engages when i rollover the invisible blue box and not the image. any ideas would be appreciated. Thanks in advance .
- removed replica watch spam, post it again, your account will be forever removed - gerbick (supermod)
So what exactly is one supposed to look at? You provided a link and some code, great, but still have no idea what in the swf to be concentrating on, or what the code relates to in the swf.
ok. well if you go and try the rollover you will see that the action starts before the mouse even rolls over the image. whenever i play each of the image in there own swf file they work exactly as how i want them to. It seems to happen when i bring them all together in one scene is when it has issues. Some how the square invisible box that you see when in import the scene is engaging the rollover.
sorry about the other code this is what i have coded for the rollover for the folder.
addEventListener(MouseEvent.ROLL_OVER, rollE);
function rollE(event:MouseEvent):void{
gotoAndPlay("start");
}
addEventListener(MouseEvent.ROLL_OUT, rollH);
function rollH(event:MouseEvent):void{
gotoAndPlay("middle");
}
Hopefully that makes it a little more clear for you. sorry but still trying to learn flash.
To what object are the above event listeners attached? If you're speaking of the folder image, then I might guess as to say that there may be some misdirected code.
well.. to be honest i just saw the code in a tutorial.. im pretty sure that there is a misdrected code. I pretty much put that same code in all of my rollover image actions except that i changed the "function roll letters". i was hoping that it wouldve solved my problems. Im not sure but how would you go about coding the addeventlistener? The code ontop is directed towards the folder swf.
Here's my suggestion, add the event listeners to the intended objects via using instance names. Quite possible it could resolve any issues.
ugh! im sorry but can you please give me an example on how the code should look like. Im not quite sure im doing it right. I went in and put in an instance name and added it to the evenlistener but still with no success...
For example, the iPhone mc (with an instance name of iPhone),
Actionscript Code:iPhone.addEventListener(MouseEvent.CLICK, rollPhone);
function rollPhone(e:MouseEvent):void {
//actions go here
}
If this doesn't work out for try uploading an example file that I could look at.
Tried doing the instance name.. i did it for the mc and the button. but whenever i tried to preview it, it would continuously play all of the rollover animations.
And what do you mean by uploading an example file? do you mean the flash file that your helping me on?
Yes, upload the file your having trouble with and I'll have a look at it.
Can you please give me some instruction on how to upload the flash file?
If the file is under the allowed size (I think it's 300 kb), then select the "Go Advanced" button (next to "Post Quick Reply"). A new page will load, scroll down to the button "Manage Attachments", and from there I think it's quick self explanatory. If however, the file size exceeds the allotted size, upload to an external site like Media Fire.
Tried to upload the flash file but got this message:
"Your submission could not be processed because a security token was missing."
Not to sure what it mean.. I tried loading the actual flash file. Not sure if that is whats needed. Dont think that it was too big.
Oh.. sorry the file was too big. Instead i uploaded it to media fire as you suggested.. hopefully you can figure out the issue. Im not too good with flash yet and probably coded everything wrong.
http://www.mediafire.com/?lummqinomu4
It's not your code that's causing the issues, although I'd suggest employing better practices when it comes to the code, such as keeping as much of it on the main timeline. Your methods will still work, but it's a messy having code throughout the file. Now, as for the rollover issues, it has to do with the objects themselves. Go into edit mode and trace back each object to it's origin and you'll notice that they're bitmaps. If you double click on those, you should see a black dot pattern appear, even in areas of the background which essentially is causing the issues. So either erase the unneeded areas or redo the artwork. I've attached an example file with a rough idea... it's not too much different from yours. Have a look and good luck.
File
Argghh! redo the art work.. dang.. well i did the artwork in AI and i thought that flattening the images wouldnt give me those issues. I also heard that it was best to make mc and import them into the timeline so it would save space and upload time.. but not sure anymore ill take your word for it. Ive also tried opening your file but it say "decompression has failed" not too sure what that means but will definitley keep trying to look at the file. Thanks for all your help! Im sure ill be looking for your expertise in the near future.
What version of Flash are you using?
I tried uploading it again. Check this one.
File
Nevermind i just switched the name of the file.. instead of “homepage3-1.fla.txt” i just deleted the "txt" and it worked!
Oh I got to check the file.. It looks good.. just the way ive been trying to get to look like. Your right I will be using better practices in keeping the coding in the same actions window. By looking at the file I get the idea about erasing the black areas.. i traced it all the way back but and erased it but when i previewed it .. it still didnt make a difference.. maybe im missing a step.. Also im having trouble getting to erase the black area for the wallet.. it seems like it doesnt have the option when i try to click into it.
OK, had a look at the wallet image and what needs to be done is this. Once you reach the "wallet.psd" you'll need to "Break Apart" the image, shortcut of "Control B" (Windows) or "Command B" (Mac). From that point it should be editable.
Okay.. i organized and reworded my coding.. but when after i erase the black area of the bit map.. i preview it and it doesnt seem to work.. it shows the area the i have erased when i go back into the image. but it doesnt seem to have any effect.
try this,file
My question is after i go into the image and use the eraser to erase part of the black dot pattern.. how come when i preview the file the engaging point for the rollover doesnt change? I see in the file that you worked on worked perfectly but when i get into the image and erase around the image it doesnt act the same as yours. Is there another step that i am missing. Cause what i do is click into the image and erase the black dot pattern to what i need it to be and click back into the main scene..
Apparently you may be missing a step, but since I can't be there to see how you go about doing it, it's hard for me to say what it actually is.
yea thats true... so did you just use the eraser tool to erase the unneeded black dotted area of the iphone? cause thats what i did.. I dont want to be a burden to you especially since youve been helping me out alot. But do you think you could give me step by step instructions on how you did it? or know of a tutorial that can also explain this too me? Cause i really wana know how to do it.
Actually I'm not sure how I would elaborate upon what I mentioned in a previous post that would really change things... except that I didn't use the eraser tool, which by the way should work (not sure why it's not). I used the pen tool and created basic geometric shapes around the object in a new layer, then cut and pasted them into place onto the same layer as the object. Then select the shape and deleted it, leaving the object minus extra background. HTH.
Great! using your pen tool technique worked perfectly!
Thanks! abunch! you pretty much saved my life!